1
$\begingroup$

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?

$\endgroup$
3
  • 1
    $\begingroup$ en.wikipedia.org/wiki/Uniform_distribution_%28continuous%29 $\endgroup$
    – whuber
    Sep 20, 2011 at 18:09
  • $\begingroup$ 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? $\endgroup$
    – strimp099
    Sep 20, 2011 at 18:37
  • $\begingroup$ 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? $\endgroup$
    – whuber
    Sep 20, 2011 at 19:33

1 Answer 1

4
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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