summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--PBS2/.jupyter_ystore.dbbin0 -> 151552 bytes
-rw-r--r--PBS2/Cours1.md11
-rw-r--r--PBS2/TD1.md16
-rw-r--r--PBS2/Untitled.ipynb90
4 files changed, 117 insertions, 0 deletions
diff --git a/PBS2/.jupyter_ystore.db b/PBS2/.jupyter_ystore.db
new file mode 100644
index 0000000..bb9aa7e
--- /dev/null
+++ b/PBS2/.jupyter_ystore.db
Binary files differ
diff --git a/PBS2/Cours1.md b/PBS2/Cours1.md
new file mode 100644
index 0000000..40204d5
--- /dev/null
+++ b/PBS2/Cours1.md
@@ -0,0 +1,11 @@
+def ensembliste de l'évènement impossible
+
+**Probabilité conditionnelle** : $$P[E | A]$$ (E sachant A) = Probabilité de l'évènement E sachant que A est sur
+
+**Fonction de répartition** : Probabilités cumulées $$F_X(t) = P[X \leq t]$$
+
+Différence espérance - moyenne
+Espérance : Résultat espéré sur un grand nombre d'expériences = théorique
+Moyenne : résultat moyen sur les expériences = pratique
+
+**Variance** Espérance des écarts à l'espérance pour $X$
diff --git a/PBS2/TD1.md b/PBS2/TD1.md
new file mode 100644
index 0000000..8e8fb4a
--- /dev/null
+++ b/PBS2/TD1.md
@@ -0,0 +1,16 @@
+# Exercice 1
+$$
+n>=2, n \in \mathbb{N}, X_1, X_2,\dots, X_n des VAR mutuellement indépendantes de loi \mathcal{B}(p),
+p \in ]0;1[
+$$
+
+## 1
+$$
+S_n = \sum_{i=1}^{N}X_i
+$$
+$S_n$ suit une loi Binomiale
+
+## 2
+$S_n \approx \mathcal{P}(1)$
+
+## 3
diff --git a/PBS2/Untitled.ipynb b/PBS2/Untitled.ipynb
new file mode 100644
index 0000000..4a1f52c
--- /dev/null
+++ b/PBS2/Untitled.ipynb
@@ -0,0 +1,90 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "9b604e23-db98-4106-b0c0-74e72625dfd5",
+ "metadata": {},
+ "source": [
+ "# Exercice 1\n",
+ "$n>=2, n \\in \\mathbb{N}, X_1, X_2,\\dots, X_n$ des VAR mutuellement indépendantes de loi $\\mathcal{B}(p)$, $p \\in ]0;1[$\n",
+ "\n",
+ "## 1\n",
+ "$$\n",
+ "S_n = \\sum_{i=1}^{N}X_i\n",
+ "$$\n",
+ "$S_n$ suit une loi Binomiale\n",
+ "\n",
+ "## 2\n",
+ "$S_n \\approx \\mathcal{P}(1)$\n",
+ "\n",
+ "## 3\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "id": "da4ff45a-49e3-4b51-904d-2cdd31a1b2ff",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "[0.7 0. 0.9 0.4 0.8 0.5 0.2 1. 0.7 0.3 0.1 0.3 0. 0. 0. 0.1 0. 0.3\n",
+ " 0.8 0.2 0.1 0.9 0.2 0.5 0.3 0.3 0.8 0.4 0.5 1. 0.4 0.3 0.2 0.9 0.4 0.6\n",
+ " 0.7 0.7 1. 0.1 0.5 0.4 0. 0.7 0. 0.2 0.3 0. 0.1 0.6]\n",
+ "18\n"
+ ]
+ }
+ ],
+ "source": [
+ "import random\n",
+ "import numpy as np\n",
+ "\n",
+ "n = 50 #int(input(\"nombre essais\"))\n",
+ "p = 0.3 #float(input(\"proba succès générique\"))\n",
+ "def binom(n, p):\n",
+ " U = np.zeros(n)\n",
+ " for k in range(n):\n",
+ " U[k] = random.randint(0,10) / 10\n",
+ " S = sum([U[i] < p for i in range(n)])\n",
+ " return S"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "id": "f89c7bbe-ad75-4c23-a504-4b9c36df0895",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "def poiss(l):\n",
+ " n = 1e6\n",
+ " p = l/n\n",
+ " X = Binom(n,p)\n",
+ " return X"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3 (ipykernel)",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.13.11"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}