Lecture8 - Lecture 8 Mariana Olvera-Cravioto Columbia...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Lecture 8 Mariana Olvera-Cravioto Columbia University [email protected] February 13th, 2012 IEOR 4404, Simulation Lecture 8 1/20 Generating specific distributions Beta: Let X ∼ Beta ( α,β ) , α,β > : f ( x ) = x α- 1 (1- x ) β- 1 B ( α,β ) , x ∈ (0 , 1) Very useful distribution for modeling random probabilities in Bayesian statistics. It can be shown that if W ∼ Gamma ( α,θ ) and Y ∼ Gamma ( β,θ ) are independent, then X = W W + Y ∼ Beta ( α,β ) 1. Generate W ∼ Gamma ( α, 1) independent of Y ∼ Gamma ( β, 1) . 2. Return X = W W + Y In MATLAB the command is betarnd . IEOR 4404, Simulation Lecture 8 2/20 The many shapes of the Beta distribution x α = 5, β = 1 α = 1, β = 3 α = β = 0.5 α = 2, β = 5 α = β = 2 1 IEOR 4404, Simulation Lecture 8 3/20 Generating specific distributions Normal: Note that if X ∼ Normal(0,1), then Y = σX + μ ∼ Normal ( μ,σ 2 ) , so we only need to be able to generate standard normal random variables. Suppose that X and Y are independent N(0,1) random variables. The joint density of X and Y is f X,Y ( x,y ) = 1 √ 2 π e- x 2 / 2 1 √ 2 π e- y 2 / 2 = 1 2 π e- ( x 2 + y 2 ) / 2 , x,y ∈ R Let ( R, Θ) be the polar coordinates of ( X,Y ) , that is, X = R cosΘ and Y = R sinΘ Note that R 2 ≥ and Θ ∈ [0 , 2 π ] . IEOR 4404, Simulation Lecture 8 4/20 Computing the joint density of R 2 and Θ We can compute the joint density of R 2 and Θ as follows: x y A − 1 1 − 1 1 1 p 1 i 1 2 j − j − i i+ 1 i+ 2 j Uniform[0, j − i+ 1] α = 5, β = 1 α = 1, β = 3 √ r √ r θ P ( R 2 ≤ r, Θ ≤ θ ) = ZZ A 1 2 π e- ( x 2 + y 2 ) / 2 dxdy = 1 2 π Z √ r Z θ e- u 2 / 2 udφdu = θ 2 π Z √ r e- u 2 / 2 udu = θ 2 π (1- e- r/ 2 ) where we used the substitution x = u cos φ and y = u sin φ . IEOR 4404, Simulation Lecture 8 5/20 Generating X and Y Taking derivatives with respect to r and θ we obtain f R 2 , Θ ( r,θ ) = 1 2 π · 1 2 e- r/ 2 , < r < ∞ , < θ < 2 π From the joint density we can see that R 2 ∼ Exponential(1/2) and Θ ∼ Uniform [0 , 2 π ]...
View Full Document

This note was uploaded on 03/18/2012 for the course IEOR 4404 taught by Professor C during the Spring '10 term at Columbia.

Page1 / 20

Lecture8 - Lecture 8 Mariana Olvera-Cravioto Columbia...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online