Ask Question
17 April, 00:35

A computer routine called rand (a, b) returns a uniform random number between a and

b. if you want to generate a mean zero, unit variance uniform random number, what values of a and b would you use in the function call?

+2
Answers (1)
  1. 17 April, 00:49
    0
    With a symmetric distribution (uniform is symmetric), mean zero means a=-b where b>0, ex. a=-4, b=4 will give a mean zero.

    A uniform random variable with domain (a, b) as given has a variance of

    variance = sigma^2 = (1/12) (b-a) ^2.

    If we use the domain (a, b), the variance must equal 1.0, or

    (1/12) (b-a) ^2 = 1

    Solving for (b-a) gives (b-a) = sqrt (12) = 2sqrt (3).

    Since a=-b (see first paragraph), (b-a) = 2b=2sqrt (3), or b=sqrt (3).

    Hence the values of a and b are (-sqrt (3), sqrt (3), and the function call should be rand (-sqrt (3), sqrt (3)).
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “A computer routine called rand (a, b) returns a uniform random number between a and b. if you want to generate a mean zero, unit variance ...” in 📙 Mathematics if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers