Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

An old-fashioned way of generating normally distributed random numbers entailed setting each normally distributed random number equal to the average of a set of uniformly distributed random numbers, rescaled and shifted by a constant. Let x be a uniformly distributed random variable, i.e. p(x) = 0 if x < 0 and x ≥1; p(x) = 1 if 0 ≤ x <1.

How would I compute the mean and variance of the variable x?

share|improve this question
1  
So if a set of uniform variables is a to b, a set of uniform variables from a+x to b-x has the same mean and variance as the set of uniform variables from a to b? – strimp099 Sep 20 '11 at 18:37
I don't follow what you mean by "a set of uniform variables is a to b" nor what distinction you are making between a mean or variance of a random variable and the mean or variance of a "set of [random] variables." Do you perhaps intend a set of observations of a single random variable? Another possible confusion is the use of "x" as a random variable in the question and--apparently--as a parameter in the comment. Is there any connection between the two? – whuber Sep 20 '11 at 19:33

1 Answer

up vote 4 down vote accepted

If $X \sim {\rm Uniform}(0,1)$, then

$E[X] = \int_0^1 x \, dx = \frac12 x^2 |_0^1 = \frac12$

$E[X^2] = \int_0^1 x^2 \, dx = \frac13 x^3 |_0^1 = \frac13$

$V[X] = E[X^2] - \{ E[X] \}^2 = \frac13 - \frac14 = \frac1{12}$

I hope I don't have to demonstrate $E[aX+b]$ and $V[aX+b]$ for you.

FYI, there are much better ways to generate normal variates that do not require inversion of the normal CDF, such as the polar method.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.