Ask Question
23 July, 07:16

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?

+3
Answers (1)
  1. 23 July, 07:32
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers