Contents Previous Next Subchapters

Simulating a Mean Zero Variance One Uniform Random Variable
Syntax unifm0v1(nrnc)
See Also rand , snormal

Returns a real matrix containing simulated samples of a uniform random variable that has mean zero and variance one. The integer scalars nr and nc specify the number of rows and columns in the return value.

Suppose that f(x) is the density function defined by
            / 1 / (2 b)  if -b < x < +b      
     f(x) = |
            \ 0           otherwise
where b is equal to the square root of 3. It follows that the corresponding random variable is uniformly distributed, has mean zero, and variance equal to
      +b                    3           2
     /       2         1   x  |+b      b
     | f(xx  dx  =  ---  -  |    =   -  =  1
     /                2 b  3  |-b      3

If you enter
     unifm0v1(1, 4)
O-Matrix will print four number with values between plus and minus the square root of 3.