#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 544
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass amsart
\begin_preamble

\usepackage{a4wide}
\usepackage{bbm}
\newcommand{\1}{\mathbbm{1}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\var}{\mathbb{V}}
\newcommand{\p}{\mathbb{P}}
\newcommand{\N}{\mathbb{N}}

\newcommand{\convps}{\overset{\text{p.s.}}{\underset{n\rightarrow +\infty}{\longrightarrow}}}



    \newcommand\independent{\protect\mathpalette{\protect\independenT}{\perp}}
    \def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}
\end_preamble
\use_default_options false
\begin_modules
theorems-ams
eqs-within-sections
figs-within-sections
\end_modules
\maintain_unincluded_children false
\language french
\language_package none
\inputencoding auto
\fontencoding T1
\font_roman "default" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\use_microtype false
\use_dash_ligatures true
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize 11
\spacing single
\use_hyperref false
\papersize default
\use_geometry false
\use_package amsmath 2
\use_package amssymb 2
\use_package cancel 1
\use_package esint 1
\use_package mathdots 0
\use_package mathtools 1
\use_package mhchem 0
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 0
\use_minted 0
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\is_math_indent 0
\math_numbering_side default
\quotes_style french
\dynamic_quotes 0
\papercolumns 1
\papersides 2
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Standard
\align left
Université Nice Sophia Antipolis - M1 IM - Méthodes de simulation stochastique
 (Monte Carlo)
\begin_inset Newline newline
\end_inset

 
\family typewriter

\begin_inset Flex URL
status open

\begin_layout Plain Layout

http://math.unice.fr/rubentha/cours.html
\end_layout

\end_inset


\family default

\begin_inset Newline newline
\end_inset


\begin_inset VSpace medskip
\end_inset


\end_layout

\begin_layout Title
Corrigés pour le chapitre 2
\end_layout

\begin_layout Standard
\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
setcounter{thm}{1}
\end_layout

\end_inset


\end_layout

\begin_layout Exercise
La loi uniforme sur 
\begin_inset Formula $[-1;1]$
\end_inset

 est de densité 
\begin_inset Formula 
\[
\begin{array}{cccc}
g\,: & \R^{2} & \rightarrow & \R\\
 & x & \mapsto & \frac{\1_{[-1;1]^{2}}(x)}{4}\,.
\end{array}
\]

\end_inset

La loi uniforme sur le disque 
\begin_inset Formula $D$
\end_inset

 de centre 
\begin_inset Formula $0$
\end_inset

 et de rayon 
\begin_inset Formula $1$
\end_inset

 dans 
\begin_inset Formula $\R^{2}$
\end_inset

 est 
\begin_inset Formula 
\[
\begin{array}{cccc}
f\,: & \R^{2} & \rightarrow & \R\\
 & x & \mapsto & \frac{\1_{D}(x)}{\pi}\,.
\end{array}
\]

\end_inset

Nous avons, pour tout 
\begin_inset Formula $x$
\end_inset

, 
\begin_inset Formula 
\begin{equation}
f(x)\leq\frac{4}{\pi}g(x)\,.\label{eq:f-g}
\end{equation}

\end_inset

 L'algorithme de rejet basé sur l'inégalité ci-dessus (
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:f-g"

\end_inset

) pour simuler une variable de densité 
\begin_inset Formula $f$
\end_inset

 consiste à tirer des variables 
\begin_inset Formula $X_{i}$
\end_inset

 i.i.d.
 de loi uniforme sur 
\begin_inset Formula $[-1;1]^{2}$
\end_inset

 et des variables 
\begin_inset Formula $W_{i}$
\end_inset

 i.i.d.
 de loi uniforme sur 
\begin_inset Formula $[0;1]$
\end_inset

 jusqu'à ce que
\begin_inset Formula 
\begin{equation}
W_{i}\leq\frac{f(X_{i})}{(4/\pi)g(X_{i})}\,.\label{eq:arret}
\end{equation}

\end_inset

On remarque que l'inégalité ci-dessus (
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:arret"

\end_inset

) est équivalente à 
\begin_inset Formula 
\[
W_{i}\times\frac{4}{\pi}\times\frac{\1_{[-1;1]^{2}}(X_{i})}{4}\leq\frac{\1_{D}(X_{i})}{\pi}\,.
\]

\end_inset

Puisque 
\begin_inset Formula $D\subset[-1;1]^{2}$
\end_inset

 et que 
\begin_inset Formula $X_{i}\in[-1;1]^{2}$
\end_inset

, ceci est équivalent à 
\begin_inset Formula 
\[
X_{i}\in D\,\text{.}
\]

\end_inset

Donc l'algorithme proposé est en fait l'algorithme de rejet basé sur (
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:f-g"

\end_inset

) pour simuler une variable de densité 
\begin_inset Formula $f$
\end_inset

.
 Donc la variable renvoyée est de densité 
\begin_inset Formula $f$
\end_inset

.
 
\end_layout

\begin_layout Standard
\begin_inset Separator parbreak
\end_inset


\end_layout

\begin_layout Exercise
D'après l'exercice précédent, les couple 
\begin_inset Formula $(U,V)$
\end_inset

 qui sort de la boucle [tant que] est de loi uniforme sur le disque de centre
 
\begin_inset Formula $0$
\end_inset

 et de rayon 
\begin_inset Formula $1$
\end_inset

 (que nous noterons 
\begin_inset Formula $D$
\end_inset

).
\end_layout

\begin_layout Exercise
Nous prenons maintenant 
\begin_inset Formula $\varphi$
\end_inset

 dans 
\begin_inset Formula $\mathcal{C}_{b}^{+}(\R^{2})$
\end_inset

 et nous calculons
\begin_inset Formula 
\[
\E(\varphi(ZU,ZV))=\int_{(u,v)\in D}\varphi\left(\left(\frac{-2\log(u^{2}+v^{2})}{u^{2}+v^{2}}\right)^{1/2}u,\left(\frac{-2\log(u^{2}+v^{2})}{u^{2}+v^{2}}\right)^{1/2}v\right)\frac{1}{\pi}dudv\,.
\]

\end_inset

Changement de variable
\begin_inset space ~
\end_inset

: 
\begin_inset Formula $u=r\cos(\theta)$
\end_inset

, 
\begin_inset Formula $v=r\sin(\theta)$
\end_inset

 (
\begin_inset Formula $r\in[0;1]$
\end_inset

, 
\begin_inset Formula $v\in[0;2\pi[$
\end_inset

).
 La matrice jacobienne est 
\begin_inset Formula 
\[
J_{1}(u,v)=\left[\begin{array}{cc}
\cos(\theta) & \sin(\theta)\\
-r\sin(\theta) & r\cos(\theta)
\end{array}\right]\,,
\]

\end_inset

de déterminant 
\begin_inset Formula $r\cos^{2}(\theta)+r\sin^{2}(\theta)=r$
\end_inset

.
 Donc
\begin_inset Formula 
\begin{eqnarray*}
\E(\varphi(ZU,ZV)) & = & \int_{r\in[0;1],\theta\in[0;2\pi[}\varphi\left(\left(\frac{-2\log(r^{2})}{r^{2}}\right)^{1/2}r\cos(\theta),\left(\frac{-2\log(r^{2})}{r^{2}}\right)^{1/2}r\sin(\theta)\right)\frac{r}{\pi}drd\theta\\
 & = & \int_{r\in[0;1],\theta\in[0;2\pi[}\varphi((-2\log(r^{2}))^{1/2}\cos(\theta),(-2\log(r^{2}))^{1/2}\sin(\theta))rdrd\theta\,.
\end{eqnarray*}

\end_inset

Changement de variable
\begin_inset space ~
\end_inset

: 
\begin_inset Formula $r=\sqrt{x}$
\end_inset

, 
\begin_inset Formula $\theta=2\pi t$
\end_inset

 (
\begin_inset Formula $x\in[0;1]$
\end_inset

, 
\begin_inset Formula $t\in[0;1])$
\end_inset

.
 La matrice jacobienne est 
\begin_inset Formula 
\[
J_{2}(r,\theta)=\left[\begin{array}{cc}
\frac{1}{2\sqrt{x}} & 0\\
0 & 2\pi
\end{array}\right]\,,
\]

\end_inset

de déterminant 
\begin_inset Formula $\pi/\sqrt{x}$
\end_inset

.
 Donc
\begin_inset Formula 
\begin{eqnarray*}
\E(\varphi(ZU,ZV)) & = & \int_{x\in[0;1],t\in[0;1[}\varphi((-2\log(x))^{1/2}\cos(2\pi t),(-2\log(x))^{1/2}\sin(2\pi t))dxdt\,.
\end{eqnarray*}

\end_inset

 D'après le cours (algorithme de Box-Müller), nous savons alors que 
\begin_inset Formula $(ZU,ZV)$
\end_inset

 est une gaussienne de matrice de covariance identité.
 
\end_layout

\begin_layout Standard
\begin_inset Separator parbreak
\end_inset


\end_layout

\begin_layout Exercise
\begin_inset space ~
\end_inset


\end_layout

\begin_layout Enumerate
Les variables 
\begin_inset Formula $X$
\end_inset

, 
\begin_inset Formula $Y$
\end_inset

 sont indépendantes et de loi 
\begin_inset Formula $\mathcal{E}(1)$
\end_inset

, donc 
\begin_inset Formula $(X,Y)$
\end_inset

 a pour densité
\begin_inset Formula 
\[
(x,y)\mapsto\1_{[0;+\infty[}(x)e^{-x}\times\1_{[0;+\infty[}(y)e^{-y}\,.
\]

\end_inset

Soit 
\begin_inset Formula $\varphi\in C_{b}^{+}(\R)$
\end_inset

 , 
\begin_inset Formula 
\begin{eqnarray*}
\E(\varphi(X)\1_{2Y>(1-X)^{2}}) & = & \int_{\R^{2}}\varphi(x)\1_{2y>(1-x)^{2}}\1_{[0;+\infty[}(x)e^{-x}\times\1_{[0;+\infty[}(y)e^{-y}dxdy\\
 & = & \int_{[0;+\infty[}\varphi(x)\left(\int_{[0;+\infty[}\1_{2y>(1-x)^{2}}e^{-y}dy\right)e^{-x}dx\\
 & = & \int_{[0;+\infty[}\varphi(x)\left(\int_{\frac{(1-x)^{2}}{2}}^{+\infty}e^{-y}dy\right)e^{-x}dx\\
 & = & \int_{[0;+\infty[}\varphi(x)(e^{-(1-x)^{2}/2})e^{-x}dx\\
 & = & \int_{[0;+\infty[}\varphi(x)\exp\left(-\frac{(1+x^{2})}{2}\right)dx\,.
\end{eqnarray*}

\end_inset

En particulier
\begin_inset Formula 
\begin{eqnarray*}
\E(\1_{2Y>(1-X)^{2}}) & = & \int_{[0;+\infty[}\exp\left(-\frac{(1+x^{2})}{2}\right)dx\\
 & = & e^{-1/2}\sqrt{2\pi}\int_{[0;+\infty[}\frac{e^{-x^{2}/2}}{\sqrt{2\pi}}dx\\
 & = & e^{-1/2}\sqrt{2\pi}\times\frac{1}{2}\,.
\end{eqnarray*}

\end_inset

Donc
\begin_inset Formula 
\begin{eqnarray*}
\frac{\E(\varphi(X)\1_{2Y>(1-X)^{2}})}{\E(\1_{2Y>(1-X)^{2}})} & = & \int_{[0;+\infty[}\varphi(x)\frac{2e^{-x^{2}/2}}{\sqrt{2\pi}}dx\,.
\end{eqnarray*}

\end_inset

Donc la loi conditionnelle de 
\begin_inset Formula $X$
\end_inset

 sachant 
\begin_inset Formula $2Y>(1-X)^{2}$
\end_inset

 a bien la densité annoncée.
 
\end_layout

\begin_layout Enumerate
Soit 
\begin_inset Formula $\varphi\in C_{b}^{+}(\R)$
\end_inset

 , puisque 
\begin_inset Formula $S$
\end_inset

 est indépendant de 
\begin_inset Formula $X$
\end_inset

 et 
\begin_inset Formula $Y$
\end_inset

, nous avons
\begin_inset Formula 
\begin{eqnarray*}
\E(\varphi((2S-1)X)\1_{2Y>(1-X)^{2}}) & = & \frac{1}{2}\E(\varphi(X)\1_{2Y>(1-X)^{2}})+\frac{1}{2}\E(\varphi(-X)\1_{2Y>(1-X)^{2}})\\
\mbox{(par question précédente)} & = & \frac{1}{2}\int_{[0;+\infty[}\varphi(x)\exp\left(-\frac{(1+x^{2})}{2}\right)dx\\
 &  & +\frac{1}{2}\int_{[0;+\infty[}\varphi(-x)\exp\left(-\frac{(1+x^{2})}{2}\right)dx\\
 & = & \frac{1}{2}\int_{\R}\varphi(x)\exp\left(-\frac{(1+x^{2})}{2}\right)dx\,.
\end{eqnarray*}

\end_inset

Donc (en utilisant les résultats ci-dessus) 
\begin_inset Formula 
\begin{eqnarray*}
\frac{\E(\varphi((2S-1)X)\1_{2Y>(1-X)^{2}})}{\E(\1_{2Y>(1-X)^{2}})} & = & \int_{\R^{2}}\varphi(x)\frac{e^{-x^{2}/2}}{\sqrt{2\pi}}dx\,.
\end{eqnarray*}

\end_inset

Donc la loi conditionnelle de 
\begin_inset Formula $(2S-1)X$
\end_inset

 sachant 
\begin_inset Formula $2Y>(1-X)^{2}$
\end_inset

 est 
\begin_inset Formula $\mathcal{N}(0,1)$
\end_inset

.
 
\end_layout

\begin_layout Enumerate
Voir le programme proposé.
 Montrons que ce programme simule bien ce que nous voulons.
 Nous tirons 
\begin_inset Formula $S_{i},X_{i},Y_{i}$
\end_inset

 (respectivement de lois 
\begin_inset Formula $\mathcal{B}(1/2)$
\end_inset

, 
\begin_inset Formula $\mathcal{E}(1)$
\end_inset

, 
\begin_inset Formula $\mathcal{E}(1)$
\end_inset

) jusqu'à ce que 
\begin_inset Formula $2Y_{i}>(1-X_{i})^{2}$
\end_inset

.
 
\begin_inset Newline newline
\end_inset

 Soit 
\begin_inset Formula $g$
\end_inset

 la densité de 
\begin_inset Formula $(S_{i},X_{i},Y_{i})$
\end_inset

 (qui ne dépend pas de 
\begin_inset Formula $i$
\end_inset

) par rapport à la mesure 
\begin_inset Formula $(\delta_{0}+\delta_{1})\times\lambda\times\lambda$
\end_inset

 (
\begin_inset Formula $\lambda$
\end_inset

 étant la mesure de Lebesgue sur 
\begin_inset Formula $\R$
\end_inset

).
 Soit 
\begin_inset Formula $f$
\end_inset

 la densité de 
\begin_inset Formula $(S_{i},X_{i},Y_{i})$
\end_inset

 conditionnellement à 
\begin_inset Formula $2Y>(1-X)^{2}$
\end_inset

.
 Nous avons
\begin_inset Formula 
\[
f(s,x,y)=\frac{g(s,x,y)}{\p(2Y>(1-X)^{2})}\times\1_{2y>(1-x)^{2}}\,.
\]

\end_inset

En particulier
\begin_inset Formula 
\[
f\leq\frac{1}{\p(2Y>(1-X)^{2})}g\,.
\]

\end_inset

Nous noterons 
\begin_inset Formula $k=1/\p(2Y>(1-X)^{2})$
\end_inset

.
 Quel est l'algorithme de rejet qui nous permettrait de simuler suivant
 la loi conditionnelle voulue ? Soit 
\begin_inset Formula $(W_{i})$
\end_inset

 les variables i.i.d.
 de loi 
\begin_inset Formula $\mathcal{U}([0;1])$
\end_inset

 utilisées dans l'algorithme de rejet.
 La condition d'arrêt dans la méthode du rejet est 
\begin_inset Formula 
\[
W_{i}\leq\frac{f(S,X_{i},Y_{i})}{kg(S_{i,}X_{i},Y_{i})}\,,
\]

\end_inset

c'est à dire 
\begin_inset Formula 
\[
W_{i}\times g(S_{i},X_{i},Y_{i})\leq g(S_{i},X_{i},Y_{i})\1_{2Y_{i}>(1-X_{i})^{2}}\,,
\]

\end_inset

ce qui est équivalent à 
\begin_inset Formula $2Y_{i}>(1-X_{i})^{2}$
\end_inset

.
 Donc l'algorithme proposé dans le programme est un algorithme de rejet
 et c'est pour cela que nous simulons bien suivant la loi voulue.
 
\end_layout

\begin_layout Exercise

\bar under
Calcul de VaR
\bar default
.
\end_layout

\begin_layout Enumerate
Nous avons
\begin_inset Formula 
\[
F_{n}(t)=\frac{1}{n}\sum_{i=1}^{n}\1_{]-\infty;t]}(X_{n})\,.
\]

\end_inset

Donc, par la loi des grands nombres, 
\begin_inset Formula $F_{n}(t)\convps\E(\1_{]-\infty;t]}(X))=\p(X\leq t)=F(t)$
\end_inset

.
\end_layout

\begin_layout Enumerate
Soit 
\begin_inset Formula $\epsilon>0$
\end_inset

.
 Soit 
\begin_inset Formula $\delta=\inf(F(-x+\epsilon)-F(-x),\,F(-x)-F(-x-\epsilon)$
\end_inset

.
 Nous avons 
\begin_inset Formula $\delta>0$
\end_inset

 car 
\begin_inset Formula $F$
\end_inset

 est strictement croissante.
 Nous avons
\begin_inset Formula 
\begin{eqnarray*}
F_{n}(-x-\epsilon) & \convps & F(-x-\epsilon)\,,\\
F_{n}(-x+\epsilon) & \convps & F(-x+\epsilon)\,.
\end{eqnarray*}

\end_inset

Donc, presque sûrement, il existe 
\begin_inset Formula $N$
\end_inset

 tel que, pour tout 
\begin_inset Formula $n\geq N$
\end_inset

,
\begin_inset Formula 
\begin{eqnarray*}
F_{n}(-x-\epsilon) & \leq & F(-x-\epsilon)+\frac{\delta}{4}\leq F(-x)-\delta+\frac{\delta}{4}=p-\frac{3\delta}{4}\,,\\
F_{n}(-x+\epsilon) & \geq & F(-x+\epsilon)-\frac{\delta}{4}\geq F(-x)+\delta-\frac{\delta}{4}=p+\frac{3\delta}{4}\,,\\
\frac{1}{n} & \leq & \frac{\delta}{4}\,.
\end{eqnarray*}

\end_inset

Nous remarquons que, p.s., les 
\begin_inset Formula $X_{1},X_{2},\dots,X_{n}$
\end_inset

 sont deux à deux distincts et que donc la fonction 
\begin_inset Formula $F_{n}$
\end_inset

 est constante par morceaux et a des sauts qui sont tous de taille 
\begin_inset Formula $1/n$
\end_inset

.
 Donc il existe 
\begin_inset Formula $t$
\end_inset

 dans 
\begin_inset Formula $[-x-\epsilon;-x+\epsilon]$
\end_inset

 tel que 
\begin_inset Formula $F_{n}(t)\leq p$
\end_inset

.
 Comme 
\begin_inset Formula $F_{n}(-x+\epsilon)>p$
\end_inset

, ceci implique que 
\begin_inset Formula $Z_{n}$
\end_inset

 est dans 
\begin_inset Formula $[x-\epsilon;x+\epsilon]$
\end_inset

.
 D'où le résultat.
\end_layout

\begin_layout Standard
\begin_inset Separator parbreak
\end_inset


\end_layout

\begin_layout Exercise
On se donne 
\begin_inset Formula $(X_{i},Y_{i},U_{i},V_{i})_{i\geq1}$
\end_inset

 i.i.d.
 avec 
\begin_inset Formula $X_{1},Y_{1},U_{1},V_{1}$
\end_inset

 indépendants, 
\begin_inset Formula $X_{1}$
\end_inset

 de loi de densité 
\begin_inset Formula $f$
\end_inset

, 
\begin_inset Formula $Y_{1}$
\end_inset

 de loi de densité 
\begin_inset Formula $g$
\end_inset

, 
\begin_inset Formula $U,V\sim\mathcal{U}([0;1])$
\end_inset

.
 Notons pour tout 
\begin_inset Formula $i$
\end_inset

, 
\begin_inset Formula $A_{i}=\{U_{i}f(X_{i})\leq g(X_{i})\}\cup\{V_{i}g(X_{i})\leq f(Y_{i}),U_{i}f(X_{i})>g(X_{i})\}$
\end_inset

 (
\begin_inset Formula $A_{i}$
\end_inset

 est un événement) et 
\begin_inset Formula $T(\omega)=\inf\{i:\omega\in A_{i}\}$
\end_inset

.
\end_layout

\begin_layout Standard
Pour toute fonction 
\begin_inset Formula $\phi\in C_{b}^{+}(\mathbb{R})$
\end_inset

,
\end_layout

\begin_layout Standard
\begin_inset Formula 
\begin{eqnarray*}
\mathbb{E}(\phi(Z)) & = & \sum_{i\geq1}\mathbb{E}\left(\1_{i=T}(\phi(Y_{i})\1_{U_{i}f(X_{i})\leq g(X_{i})}+\phi(X_{i})\1_{V_{i}g(Y_{i})\leq f(Y_{i})}\1_{U_{i}f(X_{i})>g(X_{i})})\right)\\
 & = & \sum_{i\geq1}\mathbb{E}\left(\1_{A_{1}^{c}}\dots\1_{A_{i-1}^{c}}\1_{A_{i}}(\phi(Y_{i})\1_{U_{i}f(X_{i})\leq g(X_{i})}\right.\\
 &  & \left.+\phi(X_{i})\1_{V_{i}g(Y_{i})\leq f(Y_{i})}\1_{U_{i}f(X_{i})>g(X_{i})})\right)\\
\text{(par indépendance) } & = & \sum_{i\geq1}\mathbb{P}(A_{1}^{c})^{i-1}\mathbb{E}\left(\1_{A_{i}}(\phi(Y_{i})\1_{U_{i}f(X_{i})\leq g(X_{i})}+\phi(X_{i})\1_{V_{i}g(Y_{i})\leq f(Y_{i})}\1_{U_{i}f(X_{i})>g(X_{i})})\right)\\
 & = & \sum_{i\geq1}\mathbb{P}(A_{1}^{c})^{i-1}\mathbb{E}\left(\phi(Y_{i})\1_{U_{i}f(X_{i})\leq g(X_{i})}+\phi(X_{i})\1_{V_{i}g(Y_{i})\leq f(Y_{i})}\1_{U_{i}f(X_{i})>g(X_{i})}\right)\,.\\
\\
\end{eqnarray*}

\end_inset

Calculons
\end_layout

\begin_layout Standard
\begin_inset Formula 
\begin{eqnarray*}
\mathbb{E}\left(\phi(Y_{i})\1_{U_{i}g(X_{i})\leq g(X_{i})}+\phi(X_{i})\1_{V_{i}g(Y_{i})\leq f(Y_{i})}\1_{U_{i}f(X_{i})>g(X_{i})}\right) & =\\
\int_{x,y\in\R}\int_{u,v\in[0;1]}\left(\phi(y)\1_{uf(x)\leq g(x)}+\phi(x)\1_{vg(y)\leq f(y)}\1_{uf(x)>g(x)}\right)f(x)g(y)dudvdxdy\\
\\
\end{eqnarray*}

\end_inset


\end_layout

\begin_layout Standard
On va utiliser les résultats suivants.
\end_layout

\begin_layout Itemize
Pour tous 
\begin_inset Formula $a,b\in\R^{+}$
\end_inset

, 
\begin_inset Formula $a+b-a\wedge b=a\vee b$
\end_inset

.
 (Rappel : 
\begin_inset Formula $a\vee b=\max(a,b)$
\end_inset

, 
\begin_inset Formula $a\wedge b=\min(a,b)$
\end_inset

.)
\end_layout

\begin_layout Itemize
Pour tout 
\begin_inset Formula $x\in\R$
\end_inset

, 
\begin_inset Formula $\int_{0}^{1}\1_{uf(x)\leq g(x)}du=\frac{(f\wedge g)(x)}{f(x)}$
\end_inset

, 
\begin_inset Formula $\int_{0}^{1}\1_{uf(x)>g(x)}du=1-\frac{(f\wedge g)(x)}{f(x)}$
\end_inset


\end_layout

\begin_layout Standard
La quantité ci-dessus est alors égale à 
\begin_inset Formula 
\begin{eqnarray*}
\int_{x,y\in\R}\phi(y)\frac{(g\wedge f)(x)}{f(x)}f(x)g(y)+\phi(x)\left(1-\frac{(g\wedge f)(x)}{f(x)}\right)\frac{(g\wedge f)(y)}{g(y)}f(x)g(y)dydx & =\\
\int_{x,y\in\R}\phi(y)(g\wedge f)(x)g(y)+\phi(x)\left(f(x)(g\wedge f)(y)-(g\wedge f)(x)(g\wedge f)(y)\right)dxdy & =\\
\int_{y\in\R}\phi(y)g(y)dy\times\int_{x\in\R}(g\wedge f)(x)dx+\int_{x\in\R}\phi(x)f(x)dx\times\int_{y\in\R}(g\wedge f)(y)dy\\
-\int_{x\in\R}\phi(x)(g\wedge f)(x)dx\times\int_{y\in\R}(g\wedge f)(y)dy & =\\
\int_{x\in\R}\phi(x)(f\vee g)(x)dx\times\int_{y\in\R}(g\wedge f)(y)dy\,.
\end{eqnarray*}

\end_inset


\end_layout

\begin_layout Standard
En prenant 
\begin_inset Formula $\phi$
\end_inset

 constante égale à 
\begin_inset Formula $1$
\end_inset

, on trouve
\begin_inset Formula 
\[
\mathbb{P}(A_{1})=\int_{x\in\R}(f\vee g)(x)dx\times\int_{y\in\R}(g\wedge f)(y)dy\,.
\]

\end_inset


\end_layout

\begin_layout Standard
Nous avons donc
\begin_inset Formula 
\begin{eqnarray*}
\mathbb{E}(\phi(Z)) & = & \frac{\int_{x\in\R}\phi(x)(f\vee g)(x)dx\times\int_{y\in\R}(g\wedge f)(y)dy}{1-\mathbb{P}(A_{1}^{c})}\\
 & = & \frac{\int_{x\in\R}\phi(x)(f\vee g)(x)dx}{\int_{x\in\R}(f\vee g)(x)dx}\,.
\end{eqnarray*}

\end_inset


\end_layout

\begin_layout Standard
Donc 
\begin_inset Formula $Z$
\end_inset

 est de densité 
\begin_inset Formula 
\[
x\in\R\mapsto\frac{(f\vee g)(x)}{\int_{y\in\R}(f\vee g)(y)dy}\,.
\]

\end_inset


\end_layout

\begin_layout Standard
\begin_inset Separator parbreak
\end_inset


\end_layout

\begin_layout Exercise
\begin_inset space ~
\end_inset


\end_layout

\begin_layout Enumerate
On étudie la fonction 
\begin_inset Formula $h\,:\,x\in\R^{+}\mapsto\exp(-x^{2}/2+\lambda x)$
\end_inset

.
 Nous avons 
\begin_inset Formula 
\[
h'(x)=(-x+\lambda)h(x)\,,
\]

\end_inset

d'où le tableau de variation de la table 
\begin_inset CommandInset ref
LatexCommand ref
reference "tab:Tableau-de-variation"

\end_inset

.
 Donc, pour tout 
\begin_inset Formula $x\in\R^{+}$
\end_inset

, 
\begin_inset Formula 
\[
h(x)\leq e^{\lambda^{2}/2}\,,
\]

\end_inset

et donc
\begin_inset Formula 
\[
f(x)\leq\sqrt{\frac{2}{\pi}}e^{\lambda^{2}/2}\frac{1}{\lambda}\times\lambda e^{-\lambda x}\,.
\]

\end_inset

Avec 
\begin_inset Formula 
\[
c_{\lambda}=\sqrt{\frac{2}{\pi}}e^{\lambda^{2}/2}\frac{1}{\lambda}\,,
\]

\end_inset

 nous avons 
\begin_inset Formula 
\[
f(x)\leq c_{\lambda}\lambda e^{-\lambda x}\1_{[0;+\infty[}(x)
\]

\end_inset

 pour tout 
\begin_inset Formula $x$
\end_inset

.
 
\begin_inset Float table
wide false
sideways false
status open

\begin_layout Plain Layout
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="3" columns="6">
<features tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $x$
\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $0$
\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $\lambda$
\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $+\infty$
\end_inset


\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $h'(x)$
\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
+
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $h(x)$
\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $\nearrow$
\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $\exp(\lambda^{2}/2)$
\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $\searrow$
\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\begin_inset Caption Standard

\begin_layout Plain Layout
Tableau de variation de 
\begin_inset Formula $h$
\end_inset

.
\begin_inset CommandInset label
LatexCommand label
name "tab:Tableau-de-variation"

\end_inset


\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Enumerate
On peut donc simuler 
\begin_inset Formula $f$
\end_inset

 avec un algorithme de rejet (puisqu'il est facile de simuler suivant la
 densité 
\begin_inset Formula $x\in\R\mapsto\lambda e^{-\lambda x}\1_{[0;+\infty[}(x)$
\end_inset

.
 
\end_layout

\begin_layout Enumerate
Nous avons vu en cours que l'espérance du temps de calcul est proportionnelle
 à 
\begin_inset Formula $c_{\lambda}$
\end_inset

.
 Nous avons donc intérêt a choisir 
\begin_inset Formula $\lambda$
\end_inset

 tel que 
\begin_inset Formula $c_{\lambda}$
\end_inset

 soit la plus petite possible.
 Posons 
\begin_inset Formula 
\[
c\,:\,\lambda\in\R^{+}\mapsto\sqrt{\frac{2}{\pi}}e^{\lambda^{2}/2}\frac{1}{\lambda}\,.
\]

\end_inset

Nous avons 
\begin_inset Formula 
\[
c'(\lambda)=\sqrt{\frac{2}{\pi}}\left(-\frac{1}{\lambda^{2}}+1\right)e^{\lambda^{2}/2}\,,
\]

\end_inset

d'où le tableau de variation de 
\begin_inset Formula $c$
\end_inset

 dans la table 
\begin_inset CommandInset ref
LatexCommand ref
reference "tab:Tableau-de-variation-1"

\end_inset

.
 Le meilleur choix en terme de temps de calcul est donc
\begin_inset space ~
\end_inset

: 
\begin_inset Formula $\lambda=1$
\end_inset

.
\begin_inset Float table
wide false
sideways false
status open

\begin_layout Plain Layout
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="3" columns="6">
<features tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $\lambda$
\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $0$
\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $+\infty$
\end_inset


\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $c'(\lambda)$
\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
+
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $c(\lambda)$
\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $\searrow$
\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $\sqrt{\frac{2}{\pi}}e^{1/2}$
\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" bottomline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $\nearrow$
\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\begin_inset Caption Standard

\begin_layout Plain Layout
Tableau de variation de 
\begin_inset Formula $c$
\end_inset

.
\begin_inset CommandInset label
LatexCommand label
name "tab:Tableau-de-variation-1"

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Plain Layout

\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset Separator parbreak
\end_inset


\end_layout

\begin_layout Exercise
\begin_inset space ~
\end_inset


\end_layout

\begin_layout Enumerate
On calcule
\begin_inset Formula 
\begin{eqnarray*}
\int_{0}^{a}e^{-x}dx & = & [-e^{-x}]_{0}^{a}\\
 & = & 1-e^{-a}\,.
\end{eqnarray*}

\end_inset

On prend donc 
\begin_inset Formula $C=(1-e^{-a})^{-1}$
\end_inset

.
 
\end_layout

\begin_layout Enumerate
Pour tout 
\begin_inset Formula $x\in[0;a]$
\end_inset

, 
\begin_inset Formula $e^{-x}\leq1$
\end_inset

.
 Donc nous pouvons prendre 
\begin_inset Formula 
\[
c_{1}=aC\,.
\]

\end_inset


\end_layout

\begin_layout Enumerate
Pour tout 
\begin_inset Formula $x\geq0$
\end_inset

, 
\begin_inset Formula $\1_{[0;a]}(x)\leq\1_{[0;+\infty[}(x)$
\end_inset

.
 Donc nous pouvons prendre 
\begin_inset Formula 
\[
c_{2}=C\,.
\]

\end_inset


\end_layout

\begin_layout Enumerate
La loi uniforme sur 
\begin_inset Formula $[0;a]$
\end_inset

 a pour densité 
\begin_inset Formula 
\[
x\in\R\mapsto\frac{\1_{[0;a]}(x)}{a}\,.
\]

\end_inset

La loi exponentielle de paramètre 
\begin_inset Formula $1$
\end_inset

 a pour densité
\begin_inset Formula 
\[
x\in\R\mapsto\1_{[0;+\infty[}(x)e^{-x}\,.
\]

\end_inset

Pour tout 
\begin_inset Formula $x\in\R$
\end_inset

, 
\begin_inset Formula 
\begin{equation}
Cf(x)\leq aC\times\frac{\1_{[0;a]}(x)}{a}\label{eq:methode-rejet-01}
\end{equation}

\end_inset

et on a égalité pour 
\begin_inset Formula $x=0$
\end_inset

 (donc on ne trouvera pas plus petite constante 
\begin_inset Formula $C'$
\end_inset

 telle que 
\begin_inset Formula $Cf(x)\leq C'\times\1_{[0;a]}(x)/a$
\end_inset

).
 La méthode de rejet pour simuler suivant la densité 
\begin_inset Formula $Cf$
\end_inset

 (en proposant des variables de loi uniforme sur 
\begin_inset Formula $[0;a]$
\end_inset

) basée sur l'inégalité (
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:methode-rejet-01"

\end_inset

) effectue en moyenne 
\begin_inset Formula $aC$
\end_inset

 opérations.
 
\begin_inset Newline newline
\end_inset

Pour tout 
\begin_inset Formula $x\in\R$
\end_inset

, 
\begin_inset Formula 
\begin{equation}
Cf(x)\leq C\times\1_{[0;+\infty[}(x)e^{-x}\label{eq:methode-rejet-02}
\end{equation}

\end_inset

et on a égalité pour 
\begin_inset Formula $x=0$
\end_inset

 (donc on ne trouvera pas plus petite constante 
\begin_inset Formula $C'$
\end_inset

 telle que 
\begin_inset Formula $Cf(x)\leq C'\times\1_{[0;+\infty[}(x)e^{-x}$
\end_inset

 ).
 La méthode de rejet pour simuler suivant la densité 
\begin_inset Formula $Cf$
\end_inset

 (en proposant des variables de loi uniforme sur 
\begin_inset Formula $[0;a]$
\end_inset

) basée sur l'inégalité (
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:methode-rejet-02"

\end_inset

) effectue en moyenne 
\begin_inset Formula $C$
\end_inset

 opérations.
\begin_inset Newline newline
\end_inset

Si 
\begin_inset Formula $a\leq1$
\end_inset

, on choisira donc la méthode basée sur (
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:methode-rejet-01"

\end_inset

) et si 
\begin_inset Formula $a>1$
\end_inset

, on choisira la méthode basée sur (
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:methode-rejet-02"

\end_inset

).
 
\end_layout

\begin_layout Standard
\begin_inset Separator parbreak
\end_inset


\end_layout

\begin_layout Exercise
\begin_inset space ~
\end_inset


\end_layout

\begin_layout Enumerate
Prenons 
\begin_inset Formula $g(x)=e^{-x}\1_{[0;+\infty[}(x)$
\end_inset

 (la densité de la loi exponentielle).
 Pour tout 
\begin_inset Formula $x\in\R$
\end_inset

,
\begin_inset Formula 
\[
\frac{e^{-x^{2}}\1_{[1;+\infty[}(x)}{Z}\leq\frac{e^{-x}\1_{[0;+\infty[}(x)}{Z}\,.
\]

\end_inset

On prend donc 
\begin_inset Formula $C=1/Z$
\end_inset

.
 
\end_layout

\begin_layout Enumerate
Soit 
\begin_inset Formula $\varphi\in C_{b}^{+}(\R)$
\end_inset

, 
\begin_inset Formula 
\[
\E(\varphi(X)|X\geq1)=\frac{\E(\varphi(X)\1_{X\geq1})}{\E(\1_{X\geq1})}\,.
\]

\end_inset

Calculons
\begin_inset Formula 
\begin{eqnarray*}
\E(\varphi(X)\1_{X\geq1}) & = & \int_{\R}\varphi(x)\1_{[1;+\infty[}(x)\frac{\exp\left(-\frac{x^{2}}{2\times\frac{1}{2}}\right)}{\sqrt{2\pi\frac{1}{2}}}dx\\
 & = & \int_{\R}\varphi(x)\1_{[1;+\infty[}(x)\frac{\exp\left(-x^{2}\right)}{\sqrt{\pi}}dx\,.
\end{eqnarray*}

\end_inset

Donc (le calcul ci-dessus étant vrai aussi pour 
\begin_inset Formula $\varphi\equiv1$
\end_inset

)
\begin_inset Formula 
\begin{eqnarray*}
\E(\varphi(X)|X\geq1) & = & \frac{\int_{\R}\varphi(x)\1_{[1;+\infty[}(x)\frac{\exp\left(-x^{2}\right)}{\sqrt{\pi}}dx}{(Z/\sqrt{\pi})}\\
 & = & \int_{\R}\varphi(x)f(x)dx\,.
\end{eqnarray*}

\end_inset

Donc 
\begin_inset Formula $f$
\end_inset

 est la densité de 
\begin_inset Formula $X$
\end_inset

 sachant 
\begin_inset Formula $X\geq1$
\end_inset

.
 
\end_layout

\begin_layout Standard
\begin_inset Separator parbreak
\end_inset


\end_layout

\begin_layout Exercise
Pour 
\begin_inset Formula $x>0$
\end_inset

,
\begin_inset Formula 
\[
F'(x)=\alpha\beta x^{\beta-1}\exp(-\alpha x^{\beta})\,.
\]

\end_inset

La densité est donc 
\begin_inset Formula 
\[
f(x)=\begin{cases}
0 & \mbox{ si }x\leq0\,,\\
\alpha\beta x^{\beta-1}\exp(-\alpha x^{\beta}) & \mbox{ si }x>0\,.
\end{cases}
\]

\end_inset

On cherche ensuite le pseudo-inverse de 
\begin_inset Formula $F$
\end_inset

.
 Si 
\begin_inset Formula $u\in[0;1]$
\end_inset

, on cherche 
\begin_inset Formula $x$
\end_inset

 tel que 
\begin_inset Formula $F(x)=u$
\end_inset

.
 Ce qui revient à 
\begin_inset Formula 
\[
x=\left(-\frac{1}{\alpha}\log(1-u)\right)^{\frac{1}{\beta}}\,.
\]

\end_inset

Pour simuler suivant la loi de 
\begin_inset Formula $X$
\end_inset

, on tire 
\begin_inset Formula $U\sim\mathcal{U}([0;1])$
\end_inset

 et on renvoie
\begin_inset Formula 
\[
\left(-\frac{1}{\alpha}\log(1-U)\right)^{\frac{1}{\beta}}\,.
\]

\end_inset


\end_layout

\begin_layout Standard
\begin_inset Separator parbreak
\end_inset


\end_layout

\begin_layout Exercise
\begin_inset space ~
\end_inset


\end_layout

\begin_layout Enumerate
Si on tire 
\begin_inset Formula $U_{1}$
\end_inset

, 
\begin_inset Formula $U_{2}$
\end_inset

, … i.i.d.
 de loi 
\begin_inset Formula $\mathcal{B}(p)$
\end_inset

 alors 
\begin_inset Formula $Y=\inf\{i:U_{i}=1\}$
\end_inset

 est de loi 
\begin_inset Formula $\mathcal{G}(p)$
\end_inset

.
 En effet
\begin_inset Formula 
\begin{eqnarray*}
\p(Y=k) & = & \p(U_{1}=0,\dots,U_{k-1}=0,U_{k}=1)\\
\mbox{(par indépendance des }U_{i}\mbox{)} & = & \p(U_{1}=0)\dots\p(U_{k-1}=0)\p(U_{k}=1)\\
 & = & (1-p)^{k-1}p\,.
\end{eqnarray*}

\end_inset


\end_layout

\begin_layout Enumerate
Pour 
\begin_inset Formula $k\in\N^{*}$
\end_inset

, 
\begin_inset Formula 
\begin{eqnarray*}
\p(X\leq k) & = & \sum_{i=1}^{k}p(1-p)^{i-1}\\
\mbox{(somme géométrique)} & = & p\times\frac{1-(1-p)^{k}}{1-(1-p)}\\
 & = & 1-(1-p)^{k}\,.
\end{eqnarray*}

\end_inset

Et si 
\begin_inset Formula $t\in[k;k+1[$
\end_inset

, 
\begin_inset Formula 
\[
\p(X\leq t)=\p(X\leq k)\,.
\]

\end_inset

La fonction de répartition de 
\begin_inset Formula $X$
\end_inset

 est donc 
\begin_inset Formula 
\[
F(t)=\begin{cases}
0 & \mbox{ si }t<1\,,\\
1-(1-p)^{\left\lfloor t\right\rfloor } & \mbox{ si }t\geq1\,.
\end{cases}
\]

\end_inset


\end_layout

\begin_layout Standard
\begin_inset Separator parbreak
\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
setcounter{thm}{10}
\end_layout

\end_inset


\end_layout

\begin_layout Exercise
\begin_inset ERT
status open

\begin_layout Plain Layout

\end_layout

\end_inset


\begin_inset space ~
\end_inset


\begin_inset Separator latexpar
\end_inset


\end_layout

\begin_deeper
\begin_layout Enumerate
Soit 
\begin_inset Formula $\mathcal{S}_{n}$
\end_inset

 l'ensemble des permutations de 
\begin_inset Formula $\{1,2,\dots,n\}$
\end_inset

.
 Nous remarquons que, pour tout 
\begin_inset Formula $\sigma$
\end_inset

 dans 
\begin_inset Formula $\mathcal{S}_{n}$
\end_inset

, 
\begin_inset Formula $(U_{1},\dots,U_{n})$
\end_inset

 et 
\begin_inset Formula $(U_{\sigma(1)},\dots,U_{\sigma(n)})$
\end_inset

 ont même loi.
 Soit 
\begin_inset Formula $\varphi\in\mathcal{C}_{b}^{+}(\R)$
\end_inset

.
 Par définition de la statistique d'ordre, nous avons
\begin_inset Formula 
\begin{eqnarray*}
\E(\varphi(V_{1},\dots,V_{n})) & = & \E\left(\sum_{\sigma\in\mathcal{S}_{n}}\1_{C_{n}}(U_{\sigma(1)},\dots,U_{\sigma(n)})\varphi(U_{\sigma(1)},\dots,U_{\sigma(n)})\right)\\
 & = & \sum_{\sigma\in\mathcal{S}_{n}}\E(\1_{C_{n}}(U_{\sigma(1)},\dots,U_{\sigma(n)})\varphi(U_{\sigma(1)},\dots,U_{\sigma(n)}))\\
\mbox{(voir remarque ci-dessus)} & = & \sum_{\sigma\in\mathcal{S}_{n}}\E(\1_{C_{n}}(U_{1},\dots,U_{n})\varphi(U_{1},\dots,U_{n}))\\
\mbox{(car }\#\mathcal{S}_{n}=n!\mbox{)} & = & \E(n!\1_{C_{n}}(U_{1},\dots,U_{n})\varphi(U_{1},\dots,U_{n}))\,.
\end{eqnarray*}

\end_inset

Donc la densité de 
\begin_inset Formula $(V_{1},\dots,V_{n})$
\end_inset

 est 
\begin_inset Formula 
\[
(v_{1},\dots,v_{n})\in\R^{n}\mapsto n!\times\1_{C_{n}}(v_{1},\dots,v_{n})\,.
\]

\end_inset


\end_layout

\begin_layout Enumerate
Posons 
\begin_inset Formula $T_{1}=X_{1}$
\end_inset

, 
\begin_inset Formula $T_{2}=X_{1}+X_{2}$
\end_inset

, …, 
\begin_inset Formula $T_{n+1}=X_{1}+\dots+X_{n+1}$
\end_inset

.
 Soit 
\begin_inset Formula $\varphi\in\mathcal{C}_{b}^{+}(\R)$
\end_inset

.
 Nous avons
\begin_inset space ~
\end_inset

:
\begin_inset Formula 
\begin{multline}
\E\left(\varphi\left(\frac{X_{1}}{X_{1}+\dots+X_{n+1}},\dots,\frac{X_{1}+\dots+X_{n}}{X_{1}+\dots+X_{n+1}}\right)\right)=\E\left(\varphi\left(\frac{T_{1}}{T_{n+1}},\frac{T_{2}}{T_{n+1}},\dots,\frac{T_{n}}{T_{n+1}}\right)\right)\\
=\int_{t_{1}\geq0}\int_{t_{2}\geq t_{1}}\dots\int_{t_{n+1\geq t_{n}}}\varphi\left(\frac{t_{1}}{t_{n+1}},\dots,\frac{t_{n}}{t_{n+1}}\right)e^{-t_{1}}e^{-(t_{2}-t_{1})}\dots e^{-(t_{n+1}-t_{n})}dt_{1}\dots dt_{n+1}\,.\label{eq:stat-unif-01}
\end{multline}

\end_inset

Changement de variable
\begin_inset Formula 
\[
\psi\,:\,(t_{1},\dots,t_{n+1})\in(\R^{+})^{n+1}\mbox{ tel que }t_{1}\leq t_{2}\leq\dots\leq t_{n+1}\mapsto\left(\frac{t_{1}}{t_{n+1}},\dots,\frac{t_{n}}{t_{n+1}},t_{n+1}\right)\in C_{n}\times\R^{+}\,.
\]

\end_inset

Lors d'un contrôle, il faut vérifier que 
\begin_inset Formula $\psi$
\end_inset

 est bijective, 
\begin_inset Formula $C^{1}$
\end_inset

 et que 
\begin_inset Formula $\psi^{-1}$
\end_inset

 est 
\begin_inset Formula $C^{1}$
\end_inset

.
 Nous sautons cette étape facile.
 Calculons l'inverse de 
\begin_inset Formula $\psi$
\end_inset

.
 Pour 
\begin_inset Formula $0\leq t_{1}\leq\dots\leq t_{n+1}$
\end_inset

, nous posons
\begin_inset Formula 
\[
v_{1}=\frac{t_{1}}{t_{n+1}}\,,\,v_{2}=\frac{t_{2}}{t_{n+1}}\,,\,\dots\,,\,v_{n}=\frac{t_{n}}{t_{n+1}}\,,\,v_{n+1}=t_{n+1}\,.
\]

\end_inset

D'où
\begin_inset Formula 
\[
t_{1}=v_{1}v_{n+1}\,,\,t_{2}=v_{2}v_{n+1}\,,\,\dots\,,\,t_{n}=v_{n}v_{n+1}\,,\,t_{n+1}=v_{n+1}\,.
\]

\end_inset

Nous calculons maintenant les dérivées des 
\begin_inset Formula $t_{i}$
\end_inset

 en fonction des 
\begin_inset Formula $v_{i}$
\end_inset

 et nous obtenons la matrice jacobienne suivante
\begin_inset Formula 
\[
J=\left[\begin{array}{cccccc}
v_{n+1} & 0 & \cdots & 0 & 0 & 0\\
0 & v_{n+1} & \ddots & \vdots & \vdots & \vdots\\
\vdots & 0 & \ddots & 0 & \vdots & \vdots\\
\vdots & \vdots & \ddots & \ddots & 0 & \vdots\\
0 & 0 & \cdots & 0 & v_{n+1} & 0\\
v_{1} & v_{2} & \cdots & v_{n-1} & v_{n} & 1
\end{array}\right]\,,
\]

\end_inset

de déterminant 
\begin_inset Formula $(v_{n+1})^{n}$
\end_inset

.
 Nous avons donc
\begin_inset Formula 
\begin{eqnarray*}
\mbox{(\ref{eq:stat-unif-01})} & = & \int_{C_{n}\times\R^{+}}\varphi(v_{1},\dots,v_{n})\\
 &  & \,\,\,\,\,\,\,\,\times e^{-v_{1}v_{n+1}-(v_{1}-v_{2})v_{n+1}-\dots-(v_{n}-v_{n-1})v_{n+1}-(v_{n+1}-v_{n}v_{n+1})}|v_{n+1}|^{n}dv_{1}\dots dv_{n+1}\\
 & = & \int_{C_{n}\times\R^{+}}\varphi(v_{1},\dots,v_{n})e^{-v_{n+1}}v_{n+1}^{n}dv_{1}\dots dv_{n+1}\\
 & = & \int_{C_{n}}\varphi(v_{1},\dots,v_{n})dv_{1}\dots dv_{n}\times\int_{\R^{+}}e^{-v_{n+1}}v_{n+1}^{n}dv_{n+1}\\
\mbox{(voir partie 2.4 du poly.)} & = & n!\int_{C_{n}}\varphi(v_{1},\dots,v_{n})dv_{1}\dots dv_{n}\,.
\end{eqnarray*}

\end_inset

Ceci est vrai pour 
\begin_inset Formula $\varphi$
\end_inset

 quelconque dans 
\begin_inset Formula $\mathcal{C}_{b}^{+}(\R)$
\end_inset

.
 Donc le résultat voulu est démontré.
 
\end_layout

\end_deeper
\end_body
\end_document
