[Hint: X can be represented as the number of successes in n independent Bernoulli trials. Each success having probability p, and X = Si=1nXi , where Pr(Xi = 1) = p, and Pr(Xi = 0) = 1 – p.]
(a) Generate a sample of size 32 from X ~ Binomial (n = 7, p = 0.2)
(b) Compute the sample mean and variance
(c) Make a histogram of the sample of part (a) and compare it with the theoretical probability density function of X.
the Histogram based on sample values ( empirical probability )and theoretical probability distribution is nearly same .
Get Answers For Free
Most questions answered within 1 hours.