Dans tous ces transparents on se place sur un espace probabilisé $(\Omega, \mathcal{A}, \mathbb{P})$.
On dispose d'observations sur une population de grande taille. On veut estimer un paramètre inconnu $\theta$ à partir d'un échantillon de petite taille.
🏭 Exemple fil rouge
Une usine produit des composants électroniques. On veut estimer la proportion $p$ de composants défectueux. Tester tous les composants est trop coûteux : on prélève $n$ pièces au hasard.
On modélise par des v.a.r. i.i.d. de Bernoulli : $X_i = 1$ si défectueux, $0$ sinon.
Estimation naturelle : $\hat{p} = \bar{X}_n = \frac{1}{n}\sum_{i=1}^n X_i$
Paramètres typiques à estimer
Espérance $m = \mathbb{E}[X]$
Proportion $p$ (cas Bernoulli)
Variance $\sigma^2 = \text{Var}(X)$
6.2 — Échantillon et estimateur
Définition — Échantillon
Un échantillon de taille $n$ d'une variable aléatoire $X$ est la donnée de $n$ variables aléatoires indépendantes $X_1, \ldots, X_n$ de même loi que $X$.
Définition — Estimateur
Un estimateur de $\theta$ est une fonction $\hat{\theta}_n = g(X_1, \ldots, X_n)$ calculée à partir de l'échantillon.
C'est une variable aléatoire qui approche le paramètre inconnu $\theta$.
$\hat{\theta}_n$ est consistant si pour tout $\varepsilon > 0$ :
$$\mathbb{P}[|\hat{\theta}_n - \theta| > \varepsilon] \xrightarrow[n \to +\infty]{} 0$$
($\hat{\theta}_n$ converge en probabilité vers $\theta$)
Définition — Biais
Le biais de $\hat{\theta}_n$ est $\mathbb{E}[\hat{\theta}_n] - \theta$.
$\hat{\theta}_n$ est sans biais si $\mathbb{E}[\hat{\theta}_n] = \theta$.
6.3 — Critère de consistance
Théorème — Critère de consistance
Si $\mathbb{E}[\hat{\theta}_n] \xrightarrow{} \theta$ et $\text{Var}[\hat{\theta}_n] \xrightarrow{} 0$, alors $\hat{\theta}_n$ est consistant.
Écart quadratique moyen (EQM)
$$\mathbb{E}[(\hat{\theta}_n - \theta)^2] = \text{Var}[\hat{\theta}_n] + \text{biais}^2$$
Un bon estimateur minimise à la fois le biais et la variance.
On parle de compromis biais-variance.
Illustration
Sans biais, grande variance → dispersé autour de $\theta$
Biaisé, faible variance → concentré mais décalé de $\theta$
Le meilleur estimateur minimise l'EQM global.
6.3 — Estimateurs classiques
Moyenne empirique
$$\bar{X}_n = \frac{1}{n}\sum_{i=1}^n X_i$$
Consistante (LGN)
Sans biais : $\mathbb{E}[\bar{X}_n] = m$
$\text{Var}[\bar{X}_n] = \dfrac{\sigma^2}{n}$
Si $X \sim \mathcal{N}(m,\sigma^2)$ : $\bar{X}_n \sim \mathcal{N}\!\left(m, \dfrac{\sigma^2}{n}\right)$
$z_{1-\alpha/2}$ est le quantile d'ordre $1-\alpha/2$ de $\mathcal{N}(0,1)$ : $\mathbb{P}[Z \leq z_{1-\alpha/2}] = 1-\alpha/2$.
Par symétrie de la loi normale : $\mathbb{P}[-z_{1-\alpha/2} \leq Z \leq z_{1-\alpha/2}] = 1-\alpha$.
$z^* = z_{1-\frac{\alpha}{2}}$Aire centrale $= 1-\alpha$$z^* = z_{1-\frac{\alpha}{2}}$
On a $\sqrt{n}\dfrac{\bar{X}_n - m}{\sigma} \sim \mathcal{N}(0,1)$.
Soit $z_{1-\alpha/2}$ le quantile d'ordre $1-\alpha/2$ de $\mathcal{N}(0,1)$.
Alors $\mathbb{P}\!\left[-z_{1-\alpha/2} \leq \sqrt{n}\dfrac{\bar{X}_n-m}{\sigma} \leq z_{1-\alpha/2}\right] = 1-\alpha$.
$$\text{IC}_{95\%}(m) = \left[\bar{x}_n - \frac{1.96\,\sigma}{\sqrt{n}},\;\; \bar{x}_n + \frac{1.96\,\sigma}{\sqrt{n}}\right]$$
Pour $n$ grand sans hypothèse normale, le TCL garantit la validité asymptotique.
6.5 — IC pour la moyenne (variance inconnue)
On remplace $\sigma$ par son estimateur $S_n$. La statistique suit alors une loi de Student.
$\bar{x}_n = 21/1500 = 0.014$, $z_{97.5\%} = 1.96$
$$\text{IC}_{95\%}(p) = [0.0081,\; 0.0199]$$
Avec 95% de confiance : entre 0.81% et 1.99% de pièces défectueuses.
🎛️ Simulation — IC pour la moyenne
$X \sim \mathcal{N}(m=5, \sigma^2=4)$. On génère un échantillon de taille $n$ et on compare les IC à $1-\alpha$.
Échantillon (n=10)
6.7 — IC pour la variance
Si $X_i \sim \mathcal{N}(m,\sigma^2)$ : $\dfrac{(n-1)S_n^2}{\sigma^2} \sim \chi^2_{(n-1)}$.
Construction
Soient $v_{\alpha/2}$ et $v_{1-\alpha/2}$ les quantiles de $\chi^2_{(n-1)}$.
$$\mathbb{P}\!\left[v_{\alpha/2} \leq \frac{(n-1)S_n^2}{\sigma^2} \leq v_{1-\alpha/2}\right] = 1-\alpha$$
La densité du $\chi^2$ n'est pas symétrique (contrairement à $\mathcal{N}(0,1)$), donc $v_{\alpha/2} \neq -v_{1-\alpha/2}$.
On lit les deux quantiles séparément dans les tables.
Un estimateur $\hat{\theta}_n$ est sans biais si :
$\hat{\theta}_n \to \theta$ en probabilité
$\mathbb{E}[\hat{\theta}_n] = \theta$
$\text{Var}(\hat{\theta}_n) \to 0$
$\hat{\theta}_n = \theta$ p.s.
Q3.
On observe 200 composants, 14 sont défectueux. Donner un IC à 95% pour la proportion $p$.
$[0.035,\; 0.105]$
$[0.07,\; 0.14]$
$[0.04,\; 0.11]$
$[0.014,\; 0.028]$
Q4.
$\hat{\theta}_n$ est consistant si :
$\mathbb{E}[\hat{\theta}_n] = \theta$
$\mathbb{P}[|\hat{\theta}_n - \theta| > \varepsilon] \to 0$ pour tout $\varepsilon > 0$
$\text{Var}(\hat{\theta}_n) = 0$
$\hat{\theta}_n \geq \theta$ p.s.
✅ Correction du Quiz
Q1 — Réponse : a)
$\sigma$ connu, loi normale : on utilise $z_{97.5\%} = 1.96$.
$$\text{IC}_{95\%}(m) = \left[\bar{x}_n - \frac{1.96\,\sigma}{\sqrt{n}},\; \bar{x}_n + \frac{1.96\,\sigma}{\sqrt{n}}\right]$$
Q2 — Réponse : b) $\mathbb{E}[\hat{\theta}_n] = \theta$
Sans biais = la moyenne des estimations est égale à la vraie valeur. Attention : sans biais n'implique pas consistant (et vice-versa) !
Q3 — Réponse : a) $[0.035,\; 0.105]$
$\hat{p} = 14/200 = 0.07$, donc $1 - \hat{p} = 0.93$. L'IC pour une proportion utilise la variance de Bernoulli $\hat{p}(1-\hat{p})$ :
$$\text{IC}_{95\%}(p) = \hat{p} \pm z_{0.975}\sqrt{\frac{\hat{p}(1-\hat{p})}{n}} = 0.07 \pm 1.96\sqrt{\frac{0.07 \times 0.93}{200}} = 0.07 \pm 0.035.$$
Q4 — Réponse : b)
Consistant = converge en probabilité vers $\theta$. Par Chebychev : si $\mathbb{E}[\hat{\theta}_n] \to \theta$ et $\text{Var}(\hat{\theta}_n) \to 0$, alors $\hat{\theta}_n$ est consistant.
Transparents réalisés avec l'assistance de Claude AI