Testing of ternary random numbers by the sample mean and sample variance. (a) Use MATLAB U(0, 1)
Question:
Testing of ternary random numbers by the sample mean and sample variance.
(a) Use MATLAB U(0, 1) random number generator "rand" to generate 10,000 random numbers X1, . . . , X10,000 with the following point masses, for i = 1, . . . , 10000, P{X = 1} = 0.25, P{X = 0} = 0.3, P{X = 1} = 0.45
(b) Find the (theoretical) mean and variance of Xi.
(c) Compute the sample mean x10,000 and sample variance v10,000 of the 10,000 random numbers generated. Compare them with their theoretical mean and variance.
(d) Compute the sample mean x1,000 and sample variance v1,000 of the first 1,000 of the 10,000 random numbers generated. Compare them with x10,000 and v10,000 and comment on the difference.
Applied Statistics In Business And Economics
ISBN: 9780073521480
4th Edition
Authors: David Doane, Lori Seward