In: Statistics and Probability
Question 3: Suppose the height for girls is distributed normally with a mean (μ1) of 66 inches and a standard deviation of 3.5 inches. The height for boys is distributed normally with a mean (μ2) of 68 inches and a standard deviation of 4 inches.
a) Using R, simulate a sample of n1 = 50 boys and n2 = 50 girls and compute ?̅1 − ?̅2. Repeat 5,000 times. Plot the histogram of the sampling distribution of ?̅1 − ?̅2.
b) Estimate Var(?̅1 − ?̅2) based on the results of your simulation. Does this match the expected variance of ?̅1 − ?̅2?
c) Compute a 95% confidence interval for the difference of the means (μ1 - μ2). What percentage of the time does the 95% confidence interval contain the true difference in (μ1 - μ2) of -2? Assume unequal variances.
d) Compute a 95% confidence interval for the difference of the means (μ1 - μ2). What percentage of the time does the 95% confidence interval contain the true difference in (μ1 - μ2) of -2? Assume equal variances.
e) Compare your results in (c) and (d).