Description Usage Arguments Details Value Examples
takes a desired value for n and returns n samples from the standard normal distribution using Box Muller Transformation
1 | boxMuller(n)
|
n |
number of sample estimates from the normal distribution |
computes n samples using the Box Muller transformation to estimate samples from a normal distribution. Uses the following two formulas:
x1 = sqrt(-2*log(u1)) * (cos(2*pi*u2))
x2 = sqrt(-2*log(u1)) * (sin(2*pi*u2))
a vector of doubles of size n sampled from the normal standard distribution N(0,1)
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.