class: center, middle, inverse, title-slide .title[ # Statistiques computationnelles ] .author[ ###
Charlotte Baey
] .date[ ###
M1 MA - 2025/2026
] --- <style> .remark-slide-content { background-color: #FFFFFF; border-top: 80px solid #16A085; font-size: 20px; line-height: 1.5; padding: 1em 2em 1em 2em } .my-one-page-font { font-size: 20px; } .remark-slide-content > h1 { font-size: 38px; margin-top: -85px; } .inverse { background-color: #16A085; border-top: 80px solid #16A085; text-shadow: none; background-position: 50% 75%; background-size: 150px; font-size: 40px } .title-slide { background-color: #16A085; border-top: 80px solid #16A085; background-image: none; } .remark-slide-number { position: absolute; } .remark-slide-number .progress-bar-container { position: absolute; bottom: 0; height: 4px; display: block; left: 0; right: 0; } .remark-slide-number .progress-bar { height: 100%; background-color: grey; } .left-column { width: 20%; height: 92%; float: left; } .left-column h2:last-of-type, .left-column h3:last-child { color: #000; } .right-column { width: 75%; float: right; padding-top: 1em; } .left-column2 { width: 60%; height: 92%; float: left; } .right-column2 { width: 35%; height: 92%; float: left; } </style> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ TeX: { Macros: { yellow: ["{\\color{yellow}{#1}}", 1], orange: ["{\\color{orange}{#1}}", 1], green: ["{\\color{green}{#1}}", 1] }, loader: {load: ['[tex]/color']}, tex: {packages: {'[+]': ['color']}} } }); </script> <style type="text/css"> .left-code { width: 40%; height: 92%; float: left; } .right-plot { width: 59%; float: right; padding-left: 1%; } </style> <style type="text/css"> .left-plot { width: 59%; float: left; } .right-code { width: 40%; float: right; padding-left: 1%; } </style> # Quelques informations pratiques ### Plan du cours 1. Méthodes de ré-échantillonnage 2. Méthodes de Monte-Carlo 3. Introduction aux statistiques bayésiennes 4. Algorithme EM (s'il reste du temps) ### Organisation - 2 séances de cours d'1h30 par semaine (`\(\times\)` 11 semaines) - 2 séances de TD/TP de 2h par semaine (`\(\times\)` 12 semaines) ### Evaluation - 1 DS intermédiaire d'une durée de 2h - 1 Projet **à effectuer en binôme** - 1 DS final d'une durée de 3h .red[**Aucun document autorisé lors des examens.**] --- # Sommaire <!-- .pull-left[ --> **1. Méthodes de ré-échantillonnage** - [Cours 1](#c1) (12/01/2026) - [Cours 2](#c2) (12/01/2026) --- name: c1 class: inverse, middle, center # Introduction --- class: my-one-page-font # C'est quoi les statistiques computationnelles ? <br> <br> - C'est le recours (plus ou moins) intensif à l'ordinateur pour répondre à des questions statistiques que l'on ne sait pas (ou difficilement) résoudre autrement. - On utilise/développe/étudie des algorithmes, des astuces numériques/statistiques/computationnelles - L'objectif est de faire de l'inférence, d'étudier la robustesse de méthodes statistiques, de traiter de grands jeux de données, ... --- class: inverse, middle, center # I. Méthodes de ré-échantillonnage --- # Notion d'échantillon Qu'est-ce qu'un échantillon ? - une suite de variables aléatoires `\(\mathcal{X} = (X_1, \dots, X_n)\)` - dont on observe une réalisation `\(\mathcal{X}(\omega) = (X_1(\omega), \dots, X_n(\omega))\)` --- # Notion d'échantillon Qu'est-ce qu'un échantillon ? - une suite de variables aléatoires `\(\mathcal{X} = (X_1, \dots, X_n)\)` - dont on observe une réalisation `\(\mathcal{X}(\omega) = (X_1(\omega), \dots, X_n(\omega))\)` Que représente `\(\omega\)` ? - l'aléa autour de l'expérience (ex. : `\(n\)` lancers d'une pièce de monnaie) - cet aléa `\(\omega \in \Omega\)` est transporté dans `\(\mathbb{R}\)` via `\(X_i\)` <!-- - on a seulement accès à la variabilité sur `\(\mathbb{R}\)` --> - en général, on ne dispose que d'une seule réalisation, pour un `\(\omega\)` donné --- # Statistique paramétrique <img src="slides_25_files/figure-html/unnamed-chunk-4-1.png" width="2000px" /> --- # Statistique paramétrique <img src="slides_25_files/figure-html/unnamed-chunk-5-1.png" width="2000px" /> --- # Statistique paramétrique <img src="slides_25_files/figure-html/unnamed-chunk-6-1.png" width="2000px" /> --- # Statistique paramétrique <img src="slides_25_files/figure-html/unnamed-chunk-7-1.png" width="2000px" /> --- # Statistique paramétrique <img src="slides_25_files/figure-html/unnamed-chunk-8-1.png" width="2000px" /> --- # Statistique paramétrique <img src="slides_25_files/figure-html/unnamed-chunk-9-1.png" width="2000px" /> --- # Statistique paramétrique <img src="slides_25_files/figure-html/unnamed-chunk-10-1.png" width="2000px" /> --- # Statistique paramétrique <img src="slides_25_files/figure-html/unnamed-chunk-11-1.png" width="2000px" /> --- # Statistique paramétrique <img src="slides_25_files/figure-html/unnamed-chunk-12-1.png" width="2000px" /> --- # Statistique paramétrique <img src="slides_25_files/figure-html/unnamed-chunk-13-1.png" width="2000px" /> --- # Un exemple simple Soit `\((X_1,\dots,X_n)\)` un échantillon gaussien i.i.d. de loi `\(\mathcal{N}(\theta,1)\)`, et `\(\hat{\theta}\)` l'EMV de `\(\theta\)`. Quelle est la loi de `\(\hat{\theta}\)` ? -- .pull-left[ ``` r theta_vrai <- 2; n <- 100; N <- 500 hat_theta <- rep(0,N) for (i in 1:N){ ech_i <- rnorm(n,theta_vrai,1) hat_theta[i] <- mean(ech_i) } hist(hat_theta,freq=F) curve(dnorm(x,theta_vrai,1/sqrt(n))) ``` ] .pull-right[ <img src="slides_25_files/figure-html/unnamed-chunk-15-1.png" width="432" /> ] --- class: my-one-page-font # Jackknife Comment construire de nouveaux échantillons ? <img src="slides_25_files/figure-html/unnamed-chunk-16-1.png" width="720" /> --- class: my-one-page-font # Jackknife Comment construire de nouveaux échantillons ? <img src="slides_25_files/figure-html/unnamed-chunk-17-1.png" width="720" /> --- # Jackknife #### 1. Réduction du biais - Estimation du biais : `$$\hat{b}_{jack} = (n-1)(\hat{\theta}_{jack} - \hat{\theta}),$$` avec `\(\hat{\theta}_{jack} = \frac{1}{n}\sum_{i=1}^n \hat{\theta}_{(i)}\)`. - Pseudo-valeurs : `$$\tilde{\theta}_{(i)} = n\hat{\theta} - (n-1)\hat{\theta}_{(i)}$$` <!-- Sur l'exemple précédent, cela donne : --> <!-- \tilde{\theta}_{(1)} = \tilde{\theta}_{(2)} = \tilde{\theta}_{(3)} = \tilde{\theta}_{(7)} = \tilde{\theta}_{(8)} = \tilde{\theta}_{(10)} = \tilde{\theta}_{(12)} = 13\times0.5384 - 12\times0.50 = 0.9992 \tilde{\theta}_{(4)} = \tilde{\theta}_{(5)} = \tilde{\theta}_{(6)} = \tilde{\theta}_{(9)} = \tilde{\theta}_{(11)} = \tilde{\theta}_{(13)} = 13\times0.5384 - 12\times0.5833 = -0.0004 --> - Estimateur jackknife corrigé du biais : `$$\hat{\theta}^*_{jack} = \hat{\theta} - \hat{b}_{jack} = \frac{1}{n}\sum_{i=1}^n \tilde{\theta}_{(i)}$$` .red[**Réduire le biais n'implique pas nécessairement une amélioration de l'estimateur (au sens du risque quadratique)**] --- # Jackknife #### 2. Estimation de la variance `$$\hat{s}^2_{jack} = \frac{n-1}{n} \sum_{i=1}^n \big(\hat{\theta}_{(i)} - \hat{\theta}^*_{jack}\big)^2$$` avec les pseudo-valeurs : `\(\hat{s}^2_{jack} = \frac{1}{n(n-1)} \sum_{i=1}^n \big(\tilde{\theta}_{(i)} - \tilde{\theta}\big)^2\)` -- #### 3. Construction d'intervalles de confiance Si existence d'un TCL : - en utilisant l'estimateur jackknife de la variance : `$$\hat{I}_{jack} = \left[\hat{\theta} - q^{\mathcal{N(0,1)}}_{1-\alpha/2} \hat{s}_{jack} ; \hat{\theta} + q^{\mathcal{N(0,1)}}_{1-\alpha/2} \hat{s}_{jack} \right]$$` - en utilisant les deux estimateurs : `$$\hat{I}_{jack} = \left[\hat{\theta}_{jack} - q^{\mathcal{N(0,1)}}_{1-\alpha/2} \hat{s}_{jack} ; \hat{\theta}_{jack} + q^{\mathcal{N(0,1)}}_{1-\alpha/2} \hat{s}_{jack} \right]$$` --- name: c2 # Résumé et remarques <br> - le jackknife est une méthode **non-paramétrique** permettant d'estimer le biais et la variance d'un estimateur à l'aide de simulations - la consistance est garantie pour un grand nombre d'estimateurs **suffisamment réguliers** - les hypothèses de régularité sont toutefois plus strictes que pour un TCL par exemple : - la delta-méthode requiert la différentiabilité de `\(g\)` en `\(\mu=\mathbb{E}(X_1)\)` - la consistance de `\(\hat{s}_{jack}\)` requiert que `\(g'\)` soit continue en `\(\mu\)` - ex. d'estimateur pour lequel `\(\hat{s}_{jack}\)` n'est pas consistant : la médiane empirique (malgré existence TCL) - extensions possibles reposant sur des hypothèses moins fortes : - le *delete-d* jackknife - le jackknife infinitésimal <!-- - peut-être utilisé pour la médiane empirique --> <!-- - peut permettre d'estimer la distribution de `\(\hat{\theta}\)` --> <span style="color:#16A085">**fin du cours 1**</span>- --- # Du jackknife au bootstrap - `\(\hat{\theta} = T(\underbrace{X_1,\dots,X_n}_{\text{observations}},\underbrace{\omega_1,\dots,\omega_n}_{\text{poids des obs.}}) = T(X_1,\dots,X_n,\frac{1}{n},\dots,\frac{1}{n})\)` - réplication jackknife : `\(\hat{\theta}_{(i)} = T(X_1,\dots,X_{i-1},X_i,X_{i+1},X_n,\frac{1}{n-1},\dots,\frac{1}{n-1},0,\frac{1}{n-1},\dots,\frac{1}{n-1})\)` -- - Idée du bootstrap : mettre des poids **aléatoires** -- - Procédure de ré-échantillonnage : tirer uniformément et **avec remise** parmi les observations de `\(\mathcal{X}\)`, pour construire un échantillon *bootstrap* de taille `\(n\)` noté `\(\mathcal{X}^*\)` : - Puis sur chaque échantillon bootstrap, on construit la statistique bootstrapée `\(\hat{\theta}^* = T(\mathcal{X}^*)\)` --- # Bootstrap <img src="slides_25_files/figure-html/unnamed-chunk-18-1.png" width="2000px" /> --- # Bootstrap <img src="slides_25_files/figure-html/unnamed-chunk-19-1.png" width="2000px" /> --- # Bootstrap <img src="slides_25_files/figure-html/unnamed-chunk-20-1.png" width="2000px" /> --- # Bootstrap <img src="slides_25_files/figure-html/unnamed-chunk-21-1.png" width="2000px" /> --- # Bootstrap <img src="slides_25_files/figure-html/unnamed-chunk-22-1.png" width="2000px" /> --- # Bootstrap <img src="slides_25_files/figure-html/unnamed-chunk-23-1.png" width="2000px" /> --- # Bootstrap <img src="slides_25_files/figure-html/unnamed-chunk-24-1.png" width="2000px" /> --- # Bootstrap <img src="slides_25_files/figure-html/unnamed-chunk-25-1.png" width="2000px" /> --- # Fonction de répartition empirique ``` ## [1] -0.88 -0.75 1.38 0.24 0.11 1.20 -0.46 0.64 0.42 0.78 ``` -- <img src="slides_25_files/figure-html/unnamed-chunk-27-1.png" width="720" /> --- # Fonction de répartition empirique ``` ## [1] -0.88 -0.75 1.38 0.24 0.11 1.20 -0.46 0.64 0.42 0.78 ``` <img src="slides_25_files/figure-html/unnamed-chunk-29-1.png" width="720" /> --- # Fonction de répartition empirique - Echantillon exponentiel <img src="slides_25_files/figure-html/unnamed-chunk-30-1.png" width="1152" /> - Echantillon uniforme <img src="slides_25_files/figure-html/unnamed-chunk-31-1.png" width="1152" /> --- # Bootstrap .pull-left[ ### Monde réel .left[ <span style="color:white">**on raisonne conditionnellement à `\(F_n\)`**</span> - échantillon `\(\mathcal{X} = (X_1,\dots,X_n)\)` - `\(X_i\)` de loi inconnue `\(F\)` - paramètre `\(\theta(F)\)` - estimateur `\(\hat{\theta} = T(\mathcal{X})\)` - loi de `\(\hat{\theta}\)` : `\(G\)` inconnue ] ] .pull-right[ ### Monde Bootstrap .left[ <span style="color:red">**on raisonne conditionnellement à `\(F_n\)`**</span> - échantillon bootstrap `\(\mathcal{X}^* = (X_{1}^*,\dots,X_{n}^*)\)` - `\(X_{i}^*\)` de loi connue `\(F_n\)` - paramètre `\(\theta(F_n) = \hat{\theta}\)` - statistique bootstrapée `\(\hat{\theta}^* = T(\mathcal{X}^*)\)` - loi de `\(\hat{\theta}^*\)` : `\(G^*\)` connue ] ] </br> .center[ `\(G\)` inconnue `\(\longrightarrow\)` `\(G^*\)` connue `\(\longrightarrow\)` `\(\hat{G}^*_B\)` approximation bootstrap ] </br> <span style="color:#16A085">**fin du cours 2**</span>