Preview

Computational Efficiency of Polar and Box Muller Method Using Monte Carlo

Better Essays
Open Document
Open Document
3281 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Computational Efficiency of Polar and Box Muller Method Using Monte Carlo
Lecture Notes on Monte Carlo Methods
Fall Semester, 2005
Courant Institute of Mathematical Sciences, NYU
Jonathan Goodman, goodman@cims.nyu.edu

Chapter 2: Simple Sampling of Gaussians. created August 26, 2005
Generating univariate or multivariate Gaussian random variables is simple and fast. There should be no reason ever to use approximate methods based, for example, on the Central limit theorem.

1

Box Muller

It would be nice to get a standard normal from a standard uniform by inverting the distribution function, but there is no closed form formula for this distribution
2
x function N (x) = P (X < x) = √1 π −∞ e−x /2 dx . The Box Muller method is a
2
brilliant trick to overcome this by producing two independent standard normals from two independent uniforms. It is based on the familiar trick for calculating


2

e−x

I=

/2

dx .

−∞

This cannot be calculated by “integration” – the indefinite integral does not have an algebraic expression in terms of elementary functions (exponentials, logs, trig functions). However,


2

e−x

I2 =


/2

e−y

dx

−∞

2


/2



−∞

2

e−(x

dy =
−∞

+y 2 )/2

dxdy .

−∞

The last integral can be calculated using polar coordinates x = r cos(θ), y = r sin(θ) with area element dxdy = rdrdθ, so that


I2 =

r = 0∞

e−r

2

/2

rdrdθ = 2π

r = 0∞ e−r

2

/2

rdr .

θ =0

Unlike the original x integral, this r integral is elementary. The substitution s = r2 /2 gives ds = rdr and


e−s ds = 2π .

I 2 = 2π s=0 The Box Muller algorithm is a probabilistic interpretation of this trick. If
(X, Y ) is a pair of independent standard normals, then the probability density is a product:
2
2
1
1 −(x2 +y2 )/2
1
e
.
f (x, y ) = √ e−x /2 · √ e−y /2 =




1

Since this density is radially symmetric, it is natural to consider the polar coordinate random variables (R, Θ) defined by 0 ≤ Θ < 2π and X = R

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Nt1310 Unit 6 Lab Report

    • 451 Words
    • 2 Pages

    4. The Trapezoidal rule is . Plug the values you got in part II into this formula. (Hint: you should have 5 terms inside the parenthesis with the middle three terms all multipled by 2.) What estimate for the definite integral did you get?…

    • 451 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    for this is that the density was greater than 1.00, and it was proven to be correct.…

    • 671 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Econ 302 Exam

    • 730 Words
    • 3 Pages

    copy of the t-distribution on page 920 in the text, and the F-distribution on page 925. The formulas for…

    • 730 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Mat 540 Final

    • 783 Words
    • 4 Pages

    with x followed by y.] Here dy represents y . Use this to check that your answers were correct.…

    • 783 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Respiration Lab

    • 717 Words
    • 3 Pages

    The objective of this lab was to figure out which has a higher cell respiration rate between crayfish and elodea. In order to figure this out we first set up three beakers to represent our control, elodea and crayfish and filled them with 75mL of culture solution which were dechlorinated making the solution acidic. We then had to place both the elodea and the crayfish in separate beakers filled with 25mL of water. The increase in volume of the water would represent the volume of the two test subjects. We then covered each beaker with plastic, but for the elodea we placed it under a can so it could be in the dark. After waiting 15 minutes to allow them to respire we took it out and add four drops of phenolphthalein, which was also acidic, to both beakers. Once both beakers got their four drops we added drops of NaOH, which was a base, until the solution turned pink. Our results were that the respiration rate of the crayfish was higher than the elodea.…

    • 717 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Where X is a normal random variable, μ is the mean, and σ is the standard deviation.…

    • 934 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Part A – Numerical Methods consists of questions 1 – 3 Part B – Statistics consists of questions 4 – 6 Both parts must be answered…

    • 10483 Words
    • 42 Pages
    Good Essays
  • Good Essays

    If Z is a standard normal random variable, then the value z for which P(-z < Z < z) equals…

    • 1424 Words
    • 9 Pages
    Good Essays
  • Powerful Essays

    Finding Density Lab

    • 1151 Words
    • 5 Pages

    the chemistry text book. In finding the densities it is is possible to compare them to each other and find…

    • 1151 Words
    • 5 Pages
    Powerful Essays
  • Satisfactory Essays

    The diameters of bolts produced by a certain machine are normally distributed with a mean of 0.30 inches and a standard deviation of 0.01 inches. What percentage of bolts will have a diameter greater than 0.32 inches?…

    • 396 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Math 221 Inequalities

    • 596 Words
    • 3 Pages

    The efficiency of this method is more efficient than the first, so we will continue to employ this method. The 3rd interval is to…

    • 596 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Normal Distribution

    • 291 Words
    • 2 Pages

    Normal Distribution:- A continuous random variable X is a normal distribution with the parameters mean and variance then the probability function can be written as…

    • 291 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Peter Filzmoser Department of Statistics and Probability Theory Vienna University of Technology Wiedner Hauptstraße 8-10, A-1040 Vienna, Austria…

    • 7260 Words
    • 30 Pages
    Powerful Essays
  • Good Essays

    Definition: Let X be a rv with the range space Rx and let c be any known constant. Then the kth moment of X about the constant c is defined as…

    • 914 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Bayesian Statistics

    • 7502 Words
    • 31 Pages

    Abstract In this article we consider approaches to Bayesian inference for the halfnormal and half-t distributions. We show that a generalized version of the normal-gamma distribution is conjugate to the half-normal likelihood and give the moments of this new distribution. The bias and coverage of the Bayesian posterior mean estimator of the half-normal location parameter…

    • 7502 Words
    • 31 Pages
    Satisfactory Essays

Related Topics