[PDF] [PDF] Cours de Méthodes de Monte-Carlo Exercices : 22 - CERMICS

Exercice 1 Soit (Xn,n ≥ 1) une suite de variables aléatoires à valeurs dans R indépendantes Describe the classical Monte-Carlo method for this problem



Previous PDF Next PDF





[PDF] MÉTHODES DE MONTE-CARLO CORRIGÉ DE lEXERCICE 9

par la méthode de Monte-Carlo 1 Démontrer que l'intégrale (1) est absolument convergente Corrigé La fonction à intégrer est continue sur (0,+∞); il y a donc 



[PDF] Exercices sur la méthode de Monte-Carlo - Normale Sup

Exercices MCPA Rémi Peyre Fondements de la méthode de Monte-Carlo EXERCICE 1 — Le moment quatrième Soit P la loi normale standard Le but de cet 



[PDF] Méthodes de Monte-Carlo (Cours et exercices) M1 IM, 2018-2019

Exercices 27 Chapitre 4 Méthodes de Monte-Carlo par chaînes de Markov Important : les fichiers sources et les corrigés des exercices sont disponibles sur  



[PDF] TP 2 - Méthodes de Monte-Carlo - Corrigé succinct Exercice 1 1 L

2016-2017 TP 2 - Méthodes de Monte-Carlo - Corrigé succinct Exercice 1 1 L' intégrale I1 est l'aire du disque unité de R2, I2 aussi, et I3 le volume de la boule



[PDF] Feuille de travaux pratiques &# 3 1 La méthode de Monte-Carlo

Exercice 1 Premiers exemples À l'aide de la méthode Monte-Carlo, calculer des approximations des intégrales suivantes : ∫ 1 0 4 √ 1 − x2dx, ∫ [−1,1]3



[PDF] TD6

La méthode de Monte-Carlo pour le calcul d'intégrales Voici un script Scilab présenté dans le corrigé, pour répondre aux questions 1) et 2) 1 cet exercice n'avait d'autre intérêt que pédagogique et l'emploi de la méthode de Monte-Carlo



[PDF] Méthodes Monte-Carlo - Laboratoire de Probabilités, Statistique et

1 6 Corrigés Idéalement, une méthode Monte-Carlo repose sur la simulation d'une suite de variables Exercice 1 3 (Conditionnement et inversion)



[PDF] Méthodes de Monte-Carlo - Laboratoire de Probabilités, Statistique

2 10 Exercices 6 Méthode de Monte Carlo et chaˆınes de Markov 96 6 1 Mesures que sas a tenté de corriger par une fonction de ≪ battage ≫



[PDF] Exercices dentrainement - Ceremade - Université Paris-Dauphine

(1 + x2)2 dx `a l'aide de la méthode de Monte-Carlo a Donner une méthode d' acceptation rejet permettant de simuler une variable aléatoire dont la densité est  



[PDF] Cours de Méthodes de Monte-Carlo Exercices : 22 - CERMICS

Exercice 1 Soit (Xn,n ≥ 1) une suite de variables aléatoires à valeurs dans R indépendantes Describe the classical Monte-Carlo method for this problem

[PDF] p=f/s bar

[PDF] p=f/s verin

[PDF] bars en pascal

[PDF] f=pxs

[PDF] primitive fraction rationnelle

[PDF] primitive de uv

[PDF] calculer cardinal probabilité

[PDF] cardinal d'un ensemble exercices corrigés

[PDF] calculer un cardinal

[PDF] cardinal de l ensemble des parties d un ensemble

[PDF] formule cardinal probabilité

[PDF] comment calculer cardinal avec calculatrice

[PDF] intersection probabilité formule

[PDF] comment calculer p(a)

[PDF] diviser des puissances de 10

[PDF] Cours de Méthodes de Monte-Carlo Exercices : 22  - CERMICS

Cours de Méthodes de Monte-Carlo

Exercices : 22 septembre 2020.

Exercice 1Soit(Xn;n1)une suite de variables aléatoires à valeurs dansRindépendantes suivant toutes la même loi, telle queE(X21)<+1. On poseSn=X1++Xn. On cherche à démontrer la loi forte des grands nombres : lim n!+1S nn =E(X1): 1. Montrer que si (Zn;n1)est une suite de variables aléatoires à valeurs réelles telles queP n1E(jZnj)<+1, alorsZnconverge vers0presque sûrement (on peut déduire simplement de ce résultat le lemme de Borel-Cantelli). 2.

En déduire que si

P n1E(jZnj2)<+1,Znconverge vers0presque sûrement. 3. Calculer Var (Sn2)et montrer queSn2=n2tend presque sûrement versE(X1). 4.

On pose pn= [pn]. Montrer queSnn

Sp2nn tend vers0presque sûrement lorsquentend vers+1. En déduire le résultat annoncé. Exercice 2En utilisantPython(pour installerPythonsur votre machine voirici .), calculer par simulationEeGoùGest une gaussienne centrée réduite et= 1;2;:::;10. Donner un intervalle de confiance pour les résultats. Que constatez vous ? Exercice 31.Soit Xune variable aléatoire suivant une loi de Cauchy réduite, c"est à dire suivant la loidx(1 +x2): Calculer la fonction de répartition deX, notéeF. 2. Vérifier queFestunebijectiondeRdans]0;1[. OnnoteF1soninverseetl"onconsidère une variable aléatoireUde loi uniforme sur[0;1]. Quelle est la probabilité queUvaille

0ou1? Montrer queF1(U)suit la même loi queX. En déduire une méthode de

simulation selon la loi de Cauchy. 3. Soit Vune variable aléatoire qui vaut1ou1avec probabilité1=2etZune variable aléatoire qui suit une loi exponentielle de paramètre1. Quelle est la loi deV Z? Cal- culer sa fonction caractéristique. En déduire, en utilisant la formule d"inversion de la transformation de Fourrier, que : Z +1 1 eiuxdx(1 +x2)=ejuj: 4. Soient XetYdeux variables aléatoires indépendantes suivant des lois de Cauchy de paramètres respectifsaetb. Calculer la loi deX+Y. 1

5.Soit (Yn;n1), une suite de variables aléatoires réelles convergeant presque sûrement

vers une variable aléatoireZ. Montrer, en utilisant le théorème de Lebesgue, que l"on a, pour tout >0 limn!+1P(jY2nYnj ) = 0: 6. Soit (Xn;n1)une suite de variables aléatoires indépendantes suivant une loi de

Cauchy de paramètre1. On considère la suite

Y n=X1+X2++Xnn Calculer la loi deY2nYn. La suite desYnconverge t"elle en loi ? presque sûrement ? 7.

Montrer que la suit e(Zn;n1)définie par

Z n=pjX1j+pjX2j++pjXnj =n converge presque sûrement et écrire sa limite sous forme d"une intégrale. 8. Vérifier par sim ulationque Yndiverge (p.s.) et queZnconverge (p.s.). Exercice 4Soientfetgdeux fonctions deRdansR+telles quef(x)etg(x)soient les densités de lois de variables aléatoires à valeurs dansR. On suppose de plus que, pour toutx2R f(x)kg(x): Soient(Y1;Y2;;Yn;)une suite de variables aléatoires indépendantes suivant la loi de densitég(x)et(U1;U2;;Un;)une suite de variables aléatoires indépendantes suivant une loi uniforme sur[0;1]indépendante de la suite desYi. On poseN= inffn1; kUng(Yn)< f(Yn)g. 1. Démontrer que Nest fini presque sûrement et suit une loi géométrique dont on calculera la moyenne. 2. On définit alors la v ariablealéatoire Xen posant :

X=YN=X

i1Y i1fN=ig:

Calculer pournfixé etfbornée

E

1fN=ngf(X):

En déduire la loi deX. Quelle est la loi du couple(N;X)? 3. En déduire com menton peut simuler une v ariablealéatoire de loi f(x)dxsi on sait simuler une variable aléatoire de loig(x)dx. 2

Monte-Carlo methods

Exercises : 29 September 2020.

Exercice 1LetXbearealrandomvariableanddenotebyFitsdistributionfunction.Weassume thatFis invertible and denote byF-1its inverse. 1. Ho wcan you sample the la wof Xconditionally to the eventfX > mgusing rejection method? What happen to this algorithm whenmbecomes large? 2. Let Ube random variable following a uniform distribution on[0;1], let :

Z=F-1(F(m) + (1-F(m))U):

Compute the distribution function ofZand deduce an efficient way to sampleXcondi- tionally to the eventfX > mg. Compare the efficiency of this method to the rejection method whenmis large. 3. Generalize the pre viousmethod to the sampling of Xconditionally to the eventfa < X < bg.

4.Python: write the rejection algorithm of question1 and test its ef ficiencywhen m=

2;3;4;5.

5. W edenote by Nthe distribution function of a standard Gaussian random variable

N(d) =Z

d -1e-x22 dxp2 Python: usingNandN-1write the simulation algorithm suggested at question2 and test it whenm=2and5. WithPythonNcan be obtained bynorm.cdfandN-1by norm.ppf: from scipy.stats import norm norm.cdf(-1.96) # = 0.025 norm.ppf(0.025) # = -1.96 Exercice 2We assume thatXandYare real independent random variables. We denote byFand Gtheir (respective) distribution functions. We want to compute using a Monte-Carlo method : =P(X+Yt): 1. Descri bethe classical Monte-Carlo method for this problem. Explain ho wyou can esti- mate the error of the method. 2. Assumi ngthat FandGare numerically easily invertible, explain how to implement an antithetic variance reduction method. Why does this method always decrease variance? 3. By conditi oningwith respect to Xpropose a variance reduction method. Exercice 3We assume thathis a function such thatR1

0jh(s)j2ds <+1.

1. Let (Ui;i1)be a sequence of independent random variables uniformly distributed on[0;1]. Show that the estimator1N P N i=1h((i-1+Ui)=n)has a better variance than 1N P N i=1h(Ui). 2. Gi vean interpretation of t hisresult in term of a stratification method. 1 Exercice 4Let(Wt;t0)be a Brownian motion and(t)be a continuous function fromRto

R. Identify the law of the couple(RT

0(s)dWs;WT)and deduce an efficient simulation method

of this couple.

What happen when(t)does not depend ont?

Exercice 5Prove that, ifGis a standard gaussian random variable (mean0and variance1) and fis a bounded measurable function, we have, for a2R: E (f(G))=E e -G-22 f(G+) LetZbe a Gaussian random variable andKa positive real number. 1.

Let d=E(Z)-log(K)pVar(Z), prove that

E

1fZlog(K)geZ=eE(Z)+12

Var(Z)N

d+pVar(Z) 2.

Pro vethe form ulas("Black and Scholes formulas")

E eZ-K =eE(Z)+12

Var(Z)N

d+pVar(Z) -KN(d); E K-eZ =KN(-d) -eE(Z)+12

Var(Z)N

-d-pVar(Z) Exercice 6Let(1;:::;d)be a vector of independant standard gaussian random variables andube a vector ofRd, such thatjuj=pu

21++u2d=1. We want to use a stratification

method using the randon variableu:=Pd i=1uii. 1. What is the la wof the random v ariableu:? For which a value ofv, aRdvector, the random vector- (u:)vand the random variable(u:)are independant? 2. Deduce a sampling method for the couple (- (u:)u;u:)which does not use the variance-covariance matrix of the vector- (u:)u. 3. Let aandbbe two real numbers such thata < b. Prpose a sampling method (which is not a rejection method) allowing to sample the random vectorconditionally to the eventfau: < bg. 2

Monte-Carlo methods and Stochastic Algorithms

Exercises : 6 October 2020.

Exercice 1LetXbe a standard Gaussian random variable (mean0and variance1). 1. Let fbe a bounded function , we denoteI=E(f(X))andI1n,I2nthe estimators : I

1n=12n

(f(X1) +f(X2) +:::+f(X2n-1) +f(X2n)): I

2n=12n

(f(X1) +f(-X1) +:::+f(Xn) +f(-Xn)): where(Xn;n1)is a sequence of independent random variables following the distri- bution ofX. What is the limit in distribution of the sequence of random variablespn(I1n-I), and of the sequence of random variablespn(I2n-I). For each cases, compute the variance of the limit distribution. 2. Ho wcan you estimate the v ariancesof the pre viouslimit distrib utionus ingthe sample (Xn;1i2n)pourI1nand(Xn;1in)pourI2n? How can you estimate the Monte-Carlo error when usingI1n, thenI2n? 3. Sho wthat if fis an increasing function Cov(f(X);f(-X))0. What is, under this hypothesis, the best estimator ofI,I1norI2n? Same question whenfis decreasing. Exercice 2LetXandYbe2real random variable andY.Ywill be a control variate in the sequel. We assume thatE(X2)<+1and thatE(Y) =0;0 W edenote ¯Yn= (Y1++Yn)=n. Show using the Slutzky lemma (see the last question of this exercise) thatpn (n-)¯Ynconverge to0. 4.

Still using Slutsk yle mma,sho wthat :

pn 1n (X1-nY1++Xn-nYn) -E(X) converge in distribution to a Gaussian random variable with variance Var(X-Y). How can you interpret this result when usingYas a control variate? 1 Exercice 3Méthode de bi aisaged"un tirage unif ormepar une loi de loi(a;1)dont la densité est donnée, poura > 0, par : au a-11fu2[0;1]g: On noteVaune variable aléatoire de de loi(a;1). 1. Proposer une méthode de simulation selon la loi (a;1). Pourgune fonction bornée, comment peut-on estimerE(g(Va))à l"aide d"une méthode de Monte-Carlo? Comment obtenir un ordre de grandeur de l"erreur dans cette méthode? 2. Vérifie rque, si fest une fonction deRdansRtelle queE(jf(U)j)<+1, pour tout a > 0: E (f(U))=Ef(Va)aV a-1a Comment utiliser cette relation pour calculerE(f(U))à l"aide d"une méthode de Monte- Carlo? Quelle fonction deadoit on alors minimiser pour obtenir une méthode optimale? 3. On suppose que fest bornée. Montrer que, pour tout0 < a < 2:

2a=Varf(Va)aV

a-1a =Ef2(U)aU a-1 -E(f(U))2: 4. En uti lisantle lemme de F atou,montrer que, si P(f(U)6=0)> 0, lima!0+2a= +1. Puis que, sifest continue en0avecf(0)6=0, lima!2-2a= +1. On supposera, dans la suite, quefest bornée, continue en0avecf(0)6=0(ce qui implique queP(f(U)6=0)> 0). 5. Montrez que, pour 0 < a < 2,2aadmet des dérivées d"ordre1et2par rapport àaqui s"écrivent sous la forme : d 2ada =Ef2(U)g1(a;U)etd22ada

2=Ef2(U)g2(a;U);

g

1etg2étant des fonctions deR+[0;1]dansRque l"on calculera.

6. En déduire que 2aest une fonction convexe sur l"intervalle]0;2[qui atteint son minimum au point^asolution unique de l"équation (a) =0où (a) =Ef2(U)a

2Ua-1(1-ajln(U)j)

2

Monte-Carlo methods and Stochastic Algorithms

Exercises : 13 octobre 2020.

Exercice 1Prove that, if(Mn;n0)is a martingale with respect to(Fn;n0)andan

F-stopping time, the process

N n=Mn^ is also anF-martingale (hint : check thatNn+1-Nn=1f>ng(Mn+1-Mn)).

Exercice 2

A martingale pr oofof the str onglaw of lar genumber .Suppose that(Xn;n1) are independent real random variables following the law ofX, withE(jXj)<+1. DefineYn by : Y n=Xn1fjXnjng: 1.

Pro vethat lim

n!+1E(Yn) =E(X). 2.

Pro vethat P

n1P(jXnj> n) =P n1P(jXj> n)E(jXj), and deduce that

P(Existsn0(!), for allnn0,Xn=Yn) =1:

3.

Check that V ar(Yn)EjXj21fjXjngand prove that :

X n1Var(Yn)n

2EjXj2f(jXj);

wheref(z) =P nmax(1;z)1n

22max(1;z):

Deduce thatP

n1Var(Yn)=n22E(jXj)<+1. 4. Let Wn=Yn-E(Yn), prove, using theL2martingale convergence theorem, thatP knW kk converge whenngoes to+1, and deduce, using Kronecker lemma, that lim n!+11n X knW k=0; then deduce lim n!+11nquotesdbs_dbs29.pdfusesText_35