Aller au contenu principal

Variables aléatoires discrètes

Introduction et généralités​

Définition. Soit (Ω,P(Ω),p)(\Omega, \mathcal{P}(\Omega), p) un espace de probabilité ; une variable aléatoire sur Ω\Omega est une application de Ω\Omega dans R\mathbb{R}, notée (en général) X:Ω→RX : \Omega \to \mathbb{R}.

Exemple.

  1. Pour un dé, on a Ω={1,2,3,4,5,6}\Omega = \{1, 2, 3, 4, 5, 6\} et p({k})=16p(\{k\}) = \frac{1}{6}.

    X:{Ω={1,2,…,6}→Rk→kX : \begin{cases} \Omega = \{1, 2, \dots, 6\} \to \mathbb{R} \\ k \to k \end{cases}

    XX est une variable aléatoire (v.a.) sur Ω\Omega.

  2. Lancer de 2 pièces de monnaie successivement : Ω={PP,PF,FF,FP}\Omega = \{PP, PF, FF, FP\}.

Définition (variables discrètes). N\mathbb{N} est un ensemble discret ; Q\mathbb{Q} n'est pas un ensemble discret car ∀a,b\forall a, b, on a ]a,b[∩Q≠∅]a, b[ \cap \mathbb{Q} \neq \emptyset. Tout ensemble fini de R\mathbb{R} est discret.

Remarque. Soit Ω={x1,x2,…,xn}\Omega = \{x_1, x_2, \dots, x_n\} un univers fini et XX une variable aléatoire X→RX \to \mathbb{R}. XX est appelée variable aléatoire discrète car X(Ω)X(\Omega) est un ensemble discret dans R\mathbb{R}.

Loi d'une variable aléatoire​

Théorème et démonstration. Soit (Ω,P(Ω),p)(\Omega, \mathcal{P}(\Omega), p) un espace de probabilité et XX une variable aléatoire. La loi de XX est la probabilité, notée pXp_X, définie par :

pX:{X(Ω)→[0,1]x→pX(x)=p({ω∈Ω,X(ω)=x})p_X : \begin{cases} X(\Omega) \to [0, 1] \\ x \to p_X(x) = p(\{\omega \in \Omega, X(\omega) = x\}) \end{cases}

Démonstration. Ω={ω1,ω2,…,ωn}\Omega = \{\omega_1, \omega_2, \dots, \omega_n\}, X(Ω)={x1,x2,…,xk}={X(ω1),X(ω2),…,X(ωn)}X(\Omega) = \{x_1, x_2, \dots, x_k\} = \{X(\omega_1), X(\omega_2), \dots, X(\omega_n)\} avec xi≠xjx_i \neq x_j pour i≠ji \neq j.

pX(xi)=p{ω∈Ω,X(ω)=xi}pX({x1,x2,…,xk})=pX(x1)+pX(x2)+⋯+pX(xk)=p({ω∈Ω,X(ω)=xi,i=1,…,k})=p(ω∈Ω;X(ω)∈X(Ω))=p(Ω)=1\begin{aligned} &p_X(x_i) = p\{\omega \in \Omega, X(\omega) = x_i\} \\ &p_X(\{x_1, x_2, \dots, x_k\}) = p_X(x_1) + p_X(x_2) + \dots + p_X(x_k) = p(\{\omega \in \Omega, X(\omega) = x_i, i = 1, \dots, k\}) = p(\omega \in \Omega ; X(\omega) \in X(\Omega)) = p(\Omega) = 1 \end{aligned}

⇒pX\Rightarrow p_X est une probabilité sur X(Ω)X(\Omega).

Exemple. Ω={PP,PF,FP,FF}\Omega = \{PP, PF, FP, FF\}, lancer de deux pièces de monnaie. XX = nombre de P, X(Ω)={0,1,2}X(\Omega) = \{0, 1, 2\}.

PX(0)=p({ω∈Ω,X(ω)=0})=p({FF})=14PX(1)=p({ω∈Ω,X(ω)=1})=p({FP,PF})=12PX(2)=p({ω∈Ω,X(ω)=2})=p({PP})=14\begin{aligned} P_X(0) &= p(\{\omega \in \Omega, X(\omega) = 0\}) = p(\{FF\}) = \tfrac{1}{4} \\ P_X(1) &= p(\{\omega \in \Omega, X(\omega) = 1\}) = p(\{FP, PF\}) = \tfrac{1}{2} \\ P_X(2) &= p(\{\omega \in \Omega, X(\omega) = 2\}) = p(\{PP\}) = \tfrac{1}{4} \end{aligned}

Fonction de répartition​

Définition. Soit (Ω,P(Ω),p)(\Omega, \mathcal{P}(\Omega), p) un espace de probabilité et XX une variable aléatoire sur Ω\Omega. On définit une application sur R\mathbb{R}, appelée fonction de répartition, par :

F:{R→[0,1]x→F(x)=p({ω∈Ω,X(ω)≤x})F : \begin{cases} \mathbb{R} \to [0, 1] \\ x \to F(x) = p(\{\omega \in \Omega, X(\omega) \leq x\}) \end{cases}

Théorème. Soit (Ω,P(Ω),p)(\Omega, \mathcal{P}(\Omega), p) un espace de probabilité et FF la fonction de répartition associée à XX. On a :

  1. lim⁡x→−∞F(x)=0\displaystyle\lim_{x \to -\infty} F(x) = 0, lim⁡x→+∞F(x)=1\displaystyle\lim_{x \to +\infty} F(x) = 1
  2. FF est une fonction croissante.
  3. ∀a,b∈R,a<b\forall a, b \in \mathbb{R}, a < b, F(b)−F(a)=p({ω∈Ω:a<X(ω)≤b})F(b) - F(a) = p(\{\omega \in \Omega : a < X(\omega) \leq b\})

Démonstration. Soit X(Ω)={x1,x2,…,xk}X(\Omega) = \{x_1, x_2, \dots, x_k\} avec x1<x2<⋯<xkx_1 < x_2 < \dots < x_k. On a F(x)=p({ω∈Ω,X(ω)≤x})F(x) = p(\{\omega \in \Omega, X(\omega) \leq x\}).

  • x<x1x < x_1 : F(x)=0F(x) = 0 car X(ω)≥x1X(\omega) \geq x_1.

  • x≥xkx \geq x_k : F(x)=p{ω∈Ω,X(ω)≤x}=p{ω∈Ω;X(ω)≤xk}=p(Ω)=1F(x) = p\{\omega \in \Omega, X(\omega) \leq x\} = p\{\omega \in \Omega ; X(\omega) \leq x_k\} = p(\Omega) = 1.

  • x=xix = x_i, i=1,2,…,ki = 1, 2, \dots, k :

    F(xi)=p({ω∈Ω,X(ω)≤xi})=p({ω∈Ω,X(ω)=xj,j=1,…,i})=∑j=1ip({ω∈Ω,X(ω)=xj})=∑j=1ipX(xj)F(x_i) = p(\{\omega \in \Omega, X(\omega) \leq x_i\}) = p(\{\omega \in \Omega, X(\omega) = x_j, j = 1, \dots, i\}) = \sum_{j=1}^{i} p(\{\omega \in \Omega, X(\omega) = x_j\}) = \sum_{j=1}^{i} p_X(x_j)
  • Si x∈]xi,xi+1[x \in ]x_i, x_{i+1}[ :

    F(x)=p({ω∈Ω;X(ω)≤x})=p({ω∈Ω;X(ω)≤xi})+p({ω∈Ω,xi<X(ω)≤x})=p({ω∈Ω,X(ω)≤xi})=F(xi)F(x) = p(\{\omega \in \Omega ; X(\omega) \leq x\}) = p(\{\omega \in \Omega ; X(\omega) \leq x_i\}) + p(\{\omega \in \Omega, x_i < X(\omega) \leq x\}) = p(\{\omega \in \Omega, X(\omega) \leq x_i\}) = F(x_i)

Notations. Soit (Ω,P(Ω),p)(\Omega, \mathcal{P}(\Omega), p) un espace de probabilité et XX une variable aléatoire. On note :

p(X=a)=p({ω∈Ω,X(ω)=a})p(a<X<b)=p({ω∈Ω,a<X(ω)<b})\begin{aligned} p(X = a) &= p(\{\omega \in \Omega, X(\omega) = a\}) \\ p(a < X < b) &= p(\{\omega \in \Omega, a < X(\omega) < b\}) \end{aligned}

En particulier, PX(x)=p(X=x)P_X(x) = p(X = x) et F(x)=p(X≤x)F(x) = p(X \leq x).

Espérance d'une variable aléatoire​

Définition. Soit (Ω,P(Ω),p)(\Omega, \mathcal{P}(\Omega), p) un espace de probabilité et XX une variable aléatoire. On suppose que Ω={ω1,ω2,…,ωn}\Omega = \{\omega_1, \omega_2, \dots, \omega_n\} et X(Ω)={x1,…,xk}X(\Omega) = \{x_1, \dots, x_k\}. On définit le réel noté E(X)E(X), que l'on appelle l'espérance de XX :

E(X)=∑i=1kxi p({ω∈Ω,X(ω)=xi})=∑i=1kxi p(X=xi)E(X) = \sum_{i=1}^{k} x_i\,p(\{\omega \in \Omega, X(\omega) = x_i\}) = \sum_{i=1}^{k} x_i\,p(X = x_i)

Propriétés sur les variables aléatoires. Soient (Ω,P(Ω),p)(\Omega, \mathcal{P}(\Omega), p) un espace de probabilité, XX et YY deux variables aléatoires sur Ω\Omega, aa et bb deux réels. Alors aX+bYaX + bY est aussi une variable aléatoire.

Théorème. Soient (Ω,P(Ω),p)(\Omega, \mathcal{P}(\Omega), p) un espace de probabilité, XX et YY deux variables aléatoires sur Ω\Omega. Alors :

E(aX+bY)=aE(X)+bE(Y),∀a,b∈RE(aX + bY) = aE(X) + bE(Y), \forall a, b \in \mathbb{R}

Variance d'une variable aléatoire​

Définition. Soit (Ω,P(Ω),p)(\Omega, \mathcal{P}(\Omega), p) un espace de probabilité et XX une variable aléatoire. On définit la variance de XX, que l'on note V(X)V(X), comme le réel positif :

V(X)=E((X−E(X))2)V(X) = E((X - E(X))^2)

Théorème VIII.1.

V(X)=E(X2)−(E(X))2V(X) = E(X^2) - (E(X))^2

Démonstration. (X−E(X))2=X2−2E(X)X+E2(X)(X - E(X))^2 = X^2 - 2E(X)X + E^2(X), donc V(X)=E(X2−2E(X)X+E2(X))=E(X2)−2E(X)E(X)+E2(X)=E(X2)−E2(X)V(X) = E(X^2 - 2E(X)X + E^2(X)) = E(X^2) - 2E(X)E(X) + E^2(X) = E(X^2) - E^2(X).

Définition. Soit (Ω,P,p)(\Omega, \mathcal{P}, p) un espace de probabilité et XX une variable aléatoire sur Ω\Omega. On appelle écart type de XX, que l'on note σ(X)\sigma(X), le nombre σ(X)=V(X)\sigma(X) = \sqrt{V(X)}, où V(X)=E(X2)−(E(X))2V(X) = E(X^2) - (E(X))^2 est la variance de XX.

Théorème VIII.2. Soit (Ω,P,p)(\Omega, \mathcal{P}, p) un espace de probabilité et XX une variable aléatoire sur Ω\Omega. Alors ∀a,b∈R\forall a, b \in \mathbb{R}, on a :

  1. V(aX+b)=a2V(X)V(aX + b) = a^2 V(X)
  2. σ(aX+b)=∣a∣σ(X)\sigma(aX + b) = |a|\sigma(X)

Démonstration.

V(aX+b)=E((aX+b)2)−(E(aX+b))2=E(a2X2+2abX+b2)−(aE(X)+b)2=a2E(X2)+2abE(X)+b2−(a2(E(X))2+2abE(X)+b2)=a2[E(X2)−(E(X))2]=a2V(X)\begin{aligned} V(aX + b) &= E((aX + b)^2) - (E(aX + b))^2 = E(a^2X^2 + 2abX + b^2) - (aE(X) + b)^2 \\ &= a^2E(X^2) + 2abE(X) + b^2 - (a^2(E(X))^2 + 2abE(X) + b^2) = a^2[E(X^2) - (E(X))^2] = a^2V(X) \end{aligned}

On a donc σ(aX+b)=V(aX+b)=a2V(X)=∣a∣σ(X)\sigma(aX + b) = \sqrt{V(aX + b)} = \sqrt{a^2V(X)} = |a|\sigma(X).

Remarque. Si X=1X = 1, E(X)=1E(X) = 1 car si X(Ω)={x1,x2,…,xn}X(\Omega) = \{x_1, x_2, \dots, x_n\}, alors :

E(X)=∑i=1nxiP(X=xi)E(X) = \sum_{i=1}^{n} x_i P(X = x_i)

Si X(ω)=1,∀ω∈ΩX(\omega) = 1, \forall \omega \in \Omega, alors :

E(X)=∑i=1np(X=xi)=p(Ω)=1E(X) = \sum_{i=1}^{n} p(X = x_i) = p(\Omega) = 1

Définition. Soit XX une variable aléatoire. La variable aléatoire Y=X−E(X)σ(X)Y = \dfrac{X - E(X)}{\sigma(X)} est appelée variable aléatoire centrée réduite associée à XX.

Théorème VIII.3. Soit XX une variable aléatoire et YY la variable aléatoire centrée réduite associée à XX. Alors :

E(Y)=0,V(Y)=1E(Y) = 0, \quad V(Y) = 1

Démonstration.

E(Y)=E(X−E(X)σ(X))=1σ(X)[E(X)−E(E(X))]=1σ(X)[E(X)−E(X)]=0E(Y) = E\left(\frac{X - E(X)}{\sigma(X)}\right) = \frac{1}{\sigma(X)}[E(X) - E(E(X))] = \frac{1}{\sigma(X)}[E(X) - E(X)] = 0
V(Y)=E(Y2)−(E(Y))2=E(Y2)=E((X−E(X)σ(X))2)=E(1σ(X)2(X−E(X))2)=1σ(X)2E(X−E(X))2=V(X)σ(X)2=1V(Y) = E(Y^2) - (E(Y))^2 = E(Y^2) = E\left(\left(\frac{X - E(X)}{\sigma(X)}\right)^2\right) = E\left(\frac{1}{\sigma(X)^2}(X - E(X))^2\right) = \frac{1}{\sigma(X)^2}E(X - E(X))^2 = \frac{V(X)}{\sigma(X)^2} = 1

Théorème VIII.4 (Inégalité de Tchebychev). Soit (Ω,P(Ω),p)(\Omega, \mathcal{P}(\Omega), p) un espace de probabilité et XX une variable aléatoire sur Ω\Omega. On pose m=E(X)m = E(X). Alors ∀ϵ>0\forall \epsilon > 0, on a :

p(∣X−m∣≥ϵ)≤σ2(X)ϵ2=V(X)ϵ2p(|X - m| \geq \epsilon) \leq \frac{\sigma^2(X)}{\epsilon^2} = \frac{V(X)}{\epsilon^2}

avec la notation p(∣X−m∣≤ϵ)=p({ω∈Ω,∣X(ω)−m∣≤ϵ})p(|X - m| \leq \epsilon) = p(\{\omega \in \Omega, |X(\omega) - m| \leq \epsilon\}).

Démonstration. Supposons que X(Ω)={x1,x2,…,xn}X(\Omega) = \{x_1, x_2, \dots, x_n\}. On a donc :

V(X)=E((X−E(X))2)=∑i=1n(xi−E(X))2p(X=xi)=∑i=1n(xi−m)2p(X=xi)V(X) = E((X - E(X))^2) = \sum_{i=1}^{n} (x_i - E(X))^2 p(X = x_i) = \sum_{i=1}^{n} (x_i - m)^2 p(X = x_i)

Soit J={i,∣xi−m∣≥ϵ}J = \{i, |x_i - m| \geq \epsilon\}. Ainsi

V(X)=∑i=1n(xi−m)2p(X=xi)≥∑i∈J(xi−m)2p(X=xi)≥ϵ2∑i∈Jp(X=xi)=ϵ2∑j∈Jp{ω∈Ω,X(ω)=xj}=ϵ2p({ω∈Ω,∣X(ω)−m∣≥ϵ})⇔V(X)≥ϵ2p(∣X−m∣≥ϵ)\begin{aligned} V(X) &= \sum_{i=1}^{n} (x_i - m)^2 p(X = x_i) \geq \sum_{i \in J} (x_i - m)^2 p(X = x_i) \geq \epsilon^2 \sum_{i \in J} p(X = x_i) \\ &= \epsilon^2 \sum_{j \in J} p\{\omega \in \Omega, X(\omega) = x_j\} = \epsilon^2 p(\{\omega \in \Omega, |X(\omega) - m| \geq \epsilon\}) \Leftrightarrow V(X) \geq \epsilon^2 p(|X - m| \geq \epsilon) \end{aligned}

En effet, {ω∈Ω;∣X(ω)−m∣≥ϵ}=⋃j∈J{ω∈Ω,X(ω)=xj}\{\omega \in \Omega ; |X(\omega) - m| \geq \epsilon\} = \displaystyle\bigcup_{j \in J} \{\omega \in \Omega, X(\omega) = x_j\}, d'où p(∣X−m∣≥ϵ)≤V(X)ϵ2=σ2(X)ϵ2p(|X - m| \geq \epsilon) \leq \dfrac{V(X)}{\epsilon^2} = \dfrac{\sigma^2(X)}{\epsilon^2}.

Exercice. Un sac contient 3 boules rouges et 3 boules vertes. On tire une à une les 6 boules (sans remise). Soit XX la variable aléatoire qui, à chaque tirage des six boules, associe le nombre de boules vertes tirées avant l'apparition pour la première fois d'une boule rouge.

  1. Quelles sont les valeurs prises par XX ?
  2. Quelle est la loi de XX ?
  3. Déterminer la fonction de répartition associée à XX.

Solution. XX peut prendre les valeurs 0,1,2,30, 1, 2, 3. Tirer 6 boules ⇔\Leftrightarrow ordonner 6 éléments ; Ω\Omega = l'univers de cette expérience. Ainsi card(Ω)=6!\text{card}(\Omega) = 6! et X(Ω)={0,1,2,3}X(\Omega) = \{0, 1, 2, 3\}, X:Ω→X(Ω)X : \Omega \to X(\Omega), p(X=x)p(X = x).

X=0⇔X = 0 \Leftrightarrow le premier tirage donne une boule rouge. E0E_0 = tirer une boule rouge la première fois, card(E0)=C31 5!\text{card}(E_0) = C_3^1\,5!. Ainsi p(X=0)=card(E0)card(Ω)=C31⋅5!6!=12p(X = 0) = \dfrac{\text{card}(E_0)}{\text{card}(\Omega)} = \dfrac{C_3^1 \cdot 5!}{6!} = \frac{1}{2}.

X=1⇔X = 1 \Leftrightarrow le premier tirage est une boule verte et le second tirage une boule rouge. E1E_1 = avoir une boule verte au premier tirage et une boule rouge au deuxième tirage. On a card(E1)=C31C31 4!\text{card}(E_1) = C_3^1 C_3^1\,4! et donc p(X=1)=310p(X = 1) = \frac{3}{10}.

X=2⇔{premier tirage = boule vertedeuxieˋme tirage = boule vertetroisieˋme tirage = boule rouge=E2X = 2 \Leftrightarrow \begin{cases} \text{premier tirage = boule verte} \\ \text{deuxième tirage = boule verte} \\ \text{troisième tirage = boule rouge} \end{cases} = E_2

On a card(E2)=A32C31 3!=108\text{card}(E_2) = A_3^2 C_3^1\,3! = 108 et donc p(X=2)=320p(X = 2) = \frac{3}{20}.

X=3⇔{premier tirage = boule vertesecond tirage = boule vertetroisieˋme tirage = boule verte=E3X = 3 \Leftrightarrow \begin{cases} \text{premier tirage = boule verte} \\ \text{second tirage = boule verte} \\ \text{troisième tirage = boule verte} \end{cases} = E_3

On a card(E3)=A33A33=3! 3!\text{card}(E_3) = A_3^3 A_3^3 = 3!\,3! et donc p(X=3)=120p(X = 3) = \frac{1}{20}.