Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

STA2001: Probability and Statistics I

Computer-based Exercise 11

2020

The goal of this exercise is to see how normal distribution approximates discrete distri- bution.

Problem.

● Let X1 , . . . , Xn be a random sample of size n from Bernoulli distribution b(1, p). Then,

n

Y =       Xi ~ b(n, p).

i=1

By CLT,

Y ~ N (np, np(1 p))

as n → &.

Let p = 0.2 and n = 100.  Run 1000 simulations to get 1000 realizations of Y .  Plot the histogram of relative frequency for these 1000 realizations of Y . Compare it with the plot of N (np, np(1 p)) on the range 0-100.