Contents Previous Next Subchapters Current Chapters-> prctile ftail tpdf ttail ittail cnormal inormal rand snormal seed colmad colmse colrange colmode kurtosis skewness randperm ranseed unifm0v1 unirnd normrnd exprnd gamrnd cauchyrnd gumbelrnd laplacernd lognrnd wblrnd binornd poissrnd exppdf expcdf normpdf unifpdf unifcdf wblpdf wblcdf colcor colcov colmean colstd colmax rowmax colsum rowsum colnorm rownorm median colmedian colmead colvar corr conv conv2 sum cumsum prod cumprod Parent Chapters-> Omatrix6 statistics unifm0v1 Search Tools-> contents reference index search

Simulating a Mean Zero Variance One Uniform Random Variable

Description
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.

Derivation
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
-b

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