Question
Binary random number generation . Given a sequence of U (0, 1) random numbers, obtain and describe an algorithm that generate binary random numbers with
Binary random number generation. Given a sequence of U (0, 1) random numbers, obtain and describe an algorithm that generate binary random numbers with the following point masses:
P{X =0}=0.3, P{X =1}=0.7
(a) Find the(theoretical) mean and variance of X.
(b) Use MATLAB U(0,1)random number generator "rand" to generate 10,000 random
numbers with the above distribution.
(c) Compute the average value of the 10,000 random numbers generated. Compare it with
the theoretical mean.
(d) Give the percentages of the numbers generated that are equal to 1, 0, and 1, respec-
tively. Compare them with the point masses and make a comment.
(e) Generate 10,000 random numbers with the above distribution using the companion software PARSE by taking advantage of the relationship between the binomial and
binary distributions and repeat (c)-(d) for these numbers.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started