Eclats de vers : Matemat : Statistiques
Table des matières
\( \newcommand{\parentheses}[1]{\left(#1\right)} \newcommand{\crochets}[1]{\left[#1\right]} \newcommand{\accolades}[1]{\left\{#1\right\}} \newcommand{\ensemble}[1]{\left\{#1\right\}} \newcommand{\identite}{\mathrm{Id}} \newcommand{\indicatrice}{\boldsymbol{\delta}} \newcommand{\dirac}{\delta} \newcommand{\moinsun}{{-1}} \newcommand{\inverse}{\ddagger} \newcommand{\pinverse}{\dagger} \newcommand{\topologie}{\mathfrak{T}} \newcommand{\ferme}{\mathfrak{F}} \newcommand{\img}{\mathbf{i}} \newcommand{\binome}[2]{ \left\{ \begin{array}{c} #1 \\ #2 \\ \end{array} \right\} } \newcommand{\canonique}{\mathfrak{c}} \newcommand{\tenseuridentite}{\boldsymbol{\mathcal{I}}} \newcommand{\permutation}{\boldsymbol{\epsilon}} \newcommand{\matriceZero}{\mathfrak{0}} \newcommand{\matriceUn}{\mathfrak{1}} \newcommand{\christoffel}[2]{ \left\{ \begin{array}{c} #1 \\ #2 \\ \end{array} \right\} } \newcommand{\lagrangien}{\mathfrak{L}} \newcommand{\sousens}{\mathfrak{P}} \newcommand{\partition}{\mathrm{Partition}} \newcommand{\tribu}{\mathrm{Tribu}} \newcommand{\topologies}{\mathrm{Topo}} \newcommand{\setB}{\mathbb{B}} \newcommand{\setN}{\mathbb{N}} \newcommand{\setZ}{\mathbb{Z}} \newcommand{\setQ}{\mathbb{Q}} \newcommand{\setR}{\mathbb{R}} \newcommand{\setC}{\mathbb{C}} \newcommand{\corps}{\mathbb{K}} \newcommand{\boule}{\mathfrak{B}} \newcommand{\intervalleouvert}[2]{\left] #1 , #2 \right[} \newcommand{\intervallesemiouvertgauche}[2]{ \left] #1 , #2 \right]} \newcommand{\intervallesemiouvertdroite}[2]{\left[ #1 , #2 \right[ } \newcommand{\fonction}{\mathbb{F}} \newcommand{\bijection}{\mathrm{Bij}} \newcommand{\polynome}{\mathrm{Poly}} \newcommand{\lineaire}{\mathrm{Lin}} \newcommand{\continue}{\mathrm{Cont}} \newcommand{\homeomorphisme}{\mathrm{Hom}} \newcommand{\etagee}{\mathrm{Etagee}} \newcommand{\lebesgue}{\mathrm{Leb}} \newcommand{\lipschitz}{\mathrm{Lip}} \newcommand{\suitek}{\mathrm{Suite}} \newcommand{\matrice}{\mathbb{M}} \newcommand{\krylov}{\mathrm{Krylov}} \newcommand{\tenseur}{\mathbb{T}} \newcommand{\essentiel}{\mathfrak{E}} \newcommand{\relation}{\mathrm{Rel}} \DeclareMathOperator*{\strictinferieur}{\ < \ } \DeclareMathOperator*{\strictsuperieur}{\ > \ } \DeclareMathOperator*{\ensinferieur}{\eqslantless} \DeclareMathOperator*{\enssuperieur}{\eqslantgtr} \DeclareMathOperator*{\esssuperieur}{\gtrsim} \DeclareMathOperator*{\essinferieur}{\lesssim} \newcommand{\essegal}{\eqsim} \newcommand{\union}{\ \cup \ } \newcommand{\intersection}{\ \cap \ } \newcommand{\opera}{\divideontimes} \newcommand{\autreaddition}{\boxplus} \newcommand{\autremultiplication}{\circledast} \newcommand{\commutateur}[2]{\left[ #1 , #2 \right]} \newcommand{\convolution}{\circledcirc} \newcommand{\correlation}{\ \natural \ } \newcommand{\diventiere}{\div} \newcommand{\modulo}{\bmod} \DeclareMathOperator*{\pgcd}{pgcd} \DeclareMathOperator*{\ppcm}{ppcm} \newcommand{\produitscalaire}[2]{\left\langle #1 \vert #2 \right\rangle} \newcommand{\scalaire}[2]{\left\langle #1 \| #2 \right\rangle} \newcommand{\braket}[3]{\left\langle #1 \vert #2 \vert #3 \right\rangle} \newcommand{\orthogonal}{\bot} \newcommand{\forme}[2]{\left\langle #1 , #2 \right\rangle} \newcommand{\biforme}[3]{\left\langle #1 , #2 , #3 \right\rangle} \newcommand{\contraction}[3]{\left\langle #1 \odot #3 \right\rangle_{#2}} \newcommand{\dblecont}[5]{\left\langle #1 \vert #3 \vert #5 \right\rangle_{#2,#4}} \DeclareMathOperator*{\major}{major} \DeclareMathOperator*{\minor}{minor} \DeclareMathOperator*{\maxim}{maxim} \DeclareMathOperator*{\minim}{minim} \DeclareMathOperator*{\argument}{arg} \DeclareMathOperator*{\argmin}{arg\ min} \DeclareMathOperator*{\argmax}{arg\ max} \DeclareMathOperator*{\supessentiel}{ess\ sup} \DeclareMathOperator*{\infessentiel}{ess\ inf} \newcommand{\dual}{\star} \newcommand{\distance}{\mathfrak{dist}} \newcommand{\norme}[1]{\left\| #1 \right\|} \newcommand{\normetrois}[1]{\left|\left\| #1 \right\|\right|} \DeclareMathOperator*{\adh}{adh} \DeclareMathOperator*{\interieur}{int} \newcommand{\frontiere}{\partial} \DeclareMathOperator*{\image}{im} \DeclareMathOperator*{\domaine}{dom} \DeclareMathOperator*{\noyau}{ker} \DeclareMathOperator*{\support}{supp} \DeclareMathOperator*{\signe}{sign} \newcommand{\abs}[1]{\left| #1 \right|} \newcommand{\unsur}[1]{\frac{1}{#1}} \newcommand{\arrondisup}[1]{\lceil #1 \rceil} \newcommand{\arrondiinf}[1]{\lfloor #1 \rfloor} \DeclareMathOperator*{\conjugue}{conj} \newcommand{\conjaccent}[1]{\overline{#1}} \DeclareMathOperator*{\division}{division} \newcommand{\difference}{\boldsymbol{\Delta}} \newcommand{\differentielle}[2]{\mathfrak{D}^{#1}_{#2}} \newcommand{\OD}[2]{\frac{d #1}{d #2}} \newcommand{\OOD}[2]{\frac{d^2 #1}{d #2^2}} \newcommand{\NOD}[3]{\frac{d^{#3} #1}{d #2^{#3}}} \newcommand{\deriveepartielle}[2]{\frac{\partial #1}{\partial #2}} \newcommand{\PD}[2]{\frac{\partial #1}{\partial #2}} \newcommand{\dblederiveepartielle}[2]{\frac{\partial^2 #1}{\partial #2 \partial #2}} \newcommand{\dfdxdy}[3]{\frac{\partial^2 #1}{\partial #2 \partial #3}} \newcommand{\dfdxdx}[2]{\frac{\partial^2 #1}{\partial #2^2}} \newcommand{\gradient}{\mathbf{\nabla}} \newcommand{\combilin}[1]{\mathrm{span}\{ #1 \}} \DeclareMathOperator*{\trace}{tr} \newcommand{\proba}{\mathbb{P}} \newcommand{\probaof}[1]{\mathbb{P}\left[#1\right]} \newcommand{\esperof}[1]{\mathbb{E}\left[#1\right]} \newcommand{\cov}[2]{\mathrm{cov} \left( #1 , #2 \right) } \newcommand{\var}[1]{\mathrm{var} \left( #1 \right) } \newcommand{\rand}{\mathrm{rand}} \newcommand{\variation}[1]{\left\langle #1 \right\rangle} \DeclareMathOperator*{\composante}{comp} \DeclareMathOperator*{\bloc}{bloc} \DeclareMathOperator*{\ligne}{ligne} \DeclareMathOperator*{\colonne}{colonne} \DeclareMathOperator*{\diagonale}{diag} \newcommand{\matelementaire}{\mathrm{Elem}} \DeclareMathOperator*{\matpermutation}{permut} \newcommand{\matunitaire}{\mathrm{Unitaire}} \newcommand{\gaussjordan}{\mathrm{GaussJordan}} \newcommand{\householder}{\mathrm{Householder}} \DeclareMathOperator*{\rang}{rang} \newcommand{\schur}{\mathrm{Schur}} \newcommand{\singuliere}{\mathrm{DVS}} \newcommand{\convexe}{\mathrm{Convexe}} \newcommand{\petito}[1]{o\left(#1\right)} \newcommand{\grando}[1]{O\left(#1\right)} \)
\( \newenvironment{Eqts} { \begin{equation*} \begin{gathered} } { \end{gathered} \end{equation*} } \newenvironment{Matrix} {\left[ \begin{array}} {\end{array} \right]} \)
\label{chap:stat}
1. Indépendance
On dit que les variables aléatoires \(X_1\), \(X_2\), …, \(X_N\) sont indépendantes si :
\[\esperof{\prod_i X_i} = \prod_i \esperof{X_i}\]
On en déduit que :
\[\cov{X_i}{X_j} = \var{X_i} \ \indicatrice_{ij}\]
et donc :
\[\var{\sum_i X_i} = \sum_i \var{X_i}\]
2. Echantillons
Nous nous intéressons dans la suite de ce chapitre à des échantillons de \(N\) variables aléatoires indépendantes \(X_1,...,X_N\) telles que :
\( \esperof{X_i} = \mu \)
\( \cov{X_i}{X_j} = \sigma \ \indicatrice_{ij} \)
3. L'inégalité de Markov
Soit une variable aléatoire \(X\). On définit la variable associée :
\( Y = \begin{cases} a^2 & \mbox{ si } \abs{X-b} \ge a \)
\( 0 & \mbox{ si } \abs{X-b} < a \end{cases} \)
\( \)
Comme :
\[Y \le (X-b)^2\]
on a \(\esperof{Y} \le \esperof{(X-b)^2}\). D'un autre coté :
\[\esperof{Y} = a^2 \ \probaof{\abs{X-b} \ge a}\]
Rassemblant ces deux résultats, on obtient la propriété :
\[\probaof{\abs{X-b} \ge a} \le \unsur{a^2} \ \esperof{(X-b)^2}\]
connue sous le nom d'inégalité de Markov.
Le cas particulier \(b = \esperof{X}\) nous donne :
\[\probaof{\abs{X-\esperof{X}} \ge a} \le \unsur{a^2} \ \var{X}\]
4. La loi des grands nombres
Soit la moyenne :
\[M_N = \unsur{N} \sum_{i=1}^N X_i\]
On a :
\[\esperof{M_N} = \unsur{N} \ N \ \mu = \mu\]
L'indépendance entre les variables nous amène à :
\begin{align} \var{M_N} &= \unsur{N^2} \var{\sum_i X_i} \) \( &= \unsur{N^2} \sum_i \var{X_i} \) \( &= \unsur{N^2} \ N \ \sigma^2 \end{align}et donc :
\[\var{M_N} = \frac{\sigma^2}{N}\]
Soit \(a > 0\). L'inégalité de Markov nous dit que :
\[\probaof{\abs{M_N - \mu} \ge a} \le \frac{\sigma^2}{a^2 N}\]
Soit à présent \(\epsilon > 0\). Si on veut :
\[\probaof{\abs{M_N - \mu} \ge a} \le \frac{\sigma^2}{a^2 N} \strictinferieur \epsilon\]
il suffit de choisir :
\[N > \frac{\sigma^2}{a^2 \epsilon}\]
On en conclut que :
\[\lim_{N \to +\infty} \probaof{M_N = \mu} = 1\]
5. Fréquence et probabilité
Appliquons la loi des grands nombres à la fonction indicatrice \(\indicatrice_A\). On a alors \(X_i = 1\) lorsque \(\omega \in A\) et \(X_i = 0\) lorsque \(\omega \notin A\). La moyenne s'écrit donc :
\[M_N = \frac{n(A)}{N}\]
où \(n(A)\) est le nombre de \(X_i\) valant 1, autrement dit le nombre d'événements \(\omega\) appartenant à \(A\). Comme :
\[\mu = \esperof{\indicatrice_A} = \probaof{A}\]
on en déduit que la fréquence \(n(A) / N\) converge vers la probabilité de \(A\) :
\[\lim_{N \to +\infty} \probaof{\frac{n(A)}{N} = \probaof{A}} = 1\]
6. Estimateurs non biaisés
Soit une fonction \(G : \setR^n \mapsto \setR\) :
\[G : (X_1,...,X_N) \mapsto G(X_1,...,X_N)\]
On dit que \(\hat{G} : \setR^n \mapsto \setR\) est un estimateur non biaisé de \(G\) si :
\[\esperof{\hat{G}} = \esperof{G}\]
7. Estimation des espérance et des variances
Soit :
\[M_N(X_1,...,X_N) = \unsur{N} \sum_{i=1}^N X_i\]
La loi des grands nombres nous dit que :
\[\esperof{M_N} = \mu\]
La moyenne \(M_N\) est donc un estimateur non biaisé de l'espérance \(\mu\).
Soit les variables à espérances nulles :
\( X_i^* = X_i - \mu \)
\( M_N^* = M_N - \mu \)
On obtient directement :
\[M_N^* = \unsur{N} \sum_i X_i^*\]
On voit également que :
\[X_i - M_N = X_i - \mu + \mu - M_N = X_i^* - M_N^*\]
Donc :
\[\esperof{\sum_i (X_i - M_N)^2} = \esperof{\sum_i \left( X_i^* - M_N^* \right)^2}\]
En développant, on obtient successivement :
\begin{align} \esperof{\sum_i (X_i - M_N)^2} &= \esperof{ \sum_i \left( X_i^* \right)^2 } - 2 \ \esperof{M_N^* \sum_i X_i^*} + \esperof{ \left( M_N^* \right)^2 } \) \( &= \sum_i \esperof{ \left( X_i^* \right)^2 } - 2 \ N \ \esperof{ \left( M_N^* \right)^2 } + \esperof{ \left( M_N^* \right)^2 } \end{align}Mais comme :
\( \var{M_N^*} = \esperof{ \left( M_N^* \right)^2 } = \frac{\sigma^2}{N} \)
\( \esperof{ \left( X_i^* \right)^2 } = \var{X_i} = \sigma^2 \)
l'expression devient :
\[\esperof{\sum_i (X_i - M_N)^2} = (N - 2 + 1) \ \sigma^2 = (N-1) \ \sigma^2\]
On en conclut que :
\[S^2 = \unsur{N-1} \sum_{i=1}^{N} (X_i - M_N)^2\]
est un estimateur non biaisé de la variance :
\[\esperof{S^2} = \sigma^2\]
8. Maximum de vraisemblance
Il s'agit de trouver les paramètres \(\hat{\theta}\) (espérance, variance, …) qui maximisent la vraisemblance :
\[V(\hat{\theta}) = \prod_i \probaof{ \{\omega : X_i(\omega) = x_i \} | \theta = \hat{\theta} }\]
Notons que cela revient à maximiser :
\[\ln\prod_{i=1}^N \probaof{ \{\omega : X_i(\omega) = x_i \} | \theta = \hat{\theta} } = \sum_{i=1}^N \ln\probaof{ \{\omega : X_i(\omega) = x_i \} | \theta = \hat{\theta} }\]
ce qui est souvent plus facile.
En pratique, lorsque la fonction de densité \(f_\theta\) est connue, on maximise :
\[\phi(\theta) = \sum_i \ln f_\theta(x_i)\]
en imposant :
\[\deriveepartielle{\phi}{\theta}(\hat{\theta}) = 0\]
9. Echantillon de densité donnée
Il s'agit d'un algorithme permettant de générer \(N\) nombres aléatoires :
\[\{ x_1, ..., x_N \}\]
suivant la densité \(f\). Soit \(\epsilon \ge 0\) une erreur maximale et \([a,b]\) tel que :
\[\int_a^b f(x) \ dx = 1 - \epsilon\]
Soit :
\[M = \sup_{x \in [a,b]} f(x)\]
et la génératrice :
\[\rand(a,b)\]
qui renvoie des variables aléatoires de densité uniforme sur \([a,b]\).
On part de \(A_0 = \emptyset\). A chaque itération, on génére deux nombres de densités uniformes :
\( x = \rand(a,b) \)
\( y = \rand(0,M) \)
Afin de modifier cette densité, on n'ajoute \(x\) à la liste déjà obtenue :
\[A_i = A_{i-1} \cup \{ x \}\]
que si \(y < f(x)\). Autrement, on ne fait rien et on passe à l'itération suivante.
La comparaison de \(y\) et de \(f(x)\) sert donc de filtre à l'algorithme.