1. Business
  2. Economics
  3. please show your works thank you...

Question: please show your works thank you...

Question details

(2) [20 pts] Let Y be a Bernouilli random variable with success probability Pr(Y 1} p, and let {Yi1 be an i.i.d. sample from this distribution. Let p be the fraction of successes in the sample (a) Show that Ely p. (b) Show that p-Y (c) Show that p is an unbiased estimator of p, i.e. that Elp- p. (d) Show that var(p) p(1 - p)/n (e) Stata part (Please submit your .do file with your problem set.) (i) Draw 50 observations from an i.i.d. Bernouilli distribution with p - .2. What do you get for p? (HINT: One way to draw a Bernouilli with success probability p is to first draw a random variable U from a uniform distribution [0,1] and then generate a variable Y = 1 if U < p and Y-0 if U-p. Note that Y will be Bernouilli with success probability p.) e(in) Q搜索 (ii) Now repeat part (i) 20 times. Each iteration j will generate a sample mean pj. Plot a histogram of pj. (Hint: instead of running your code 20 times, you could draw 50x20 observations and let the first 50 observations count as the first sample, the second 50 as the second sample, etc.


Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution