Add Problem

Unit 07

Topics
#p values #t tests
Problems
# p values
Hard
Problem 1: (Power to Simulate)

This practice problem is drawn from Example 9.19 in Devore and Berk.

The fuel efficiency (mpg) of any particular new vehicle under specified driving conditions may not be identical to the EPA figure that appears on the vehicle’s sticker. Suppose that 10 different vehicles of a particular type are to be selected and driven over a certain course, after which the fuel efficiency of each one is to be determined. Let $m$ denote the true average fuel efficiency under these conditions.

Consider testing $H_{0}: \mu = 20$ versus $H_{a}: m > 20$ using the one-sample t test based on the resulting sample.

(a) Use R to produce a random sample of size 10 from a normal distribution with mean 20 and standard deviation 2. Then, conduct a t-test of this distribution against the null hypothesis that the true mean is 0. Repeat this process a large number of times (i.e. 10,000), saving the resulting p-value each time. What proportion of these simulations would reject the null hypothesis at an $\alpha = 0.05$ critical value? If you produce a plot of this distribution of these p-values, what do you observe? (b) Use R to produce a random sample of size 10 from a normal distribution with mean 21 and standard deviation 2. Then, conduct a t-test of this distribution against the null hypothesis that the true mean is 0. Repeat this process a large number of times (i.e. 10,000), saving the resulting p-value each time. What proportion of these simulations would reject the null hypothesis at an $\alpha = 0.05$ critical value? If you produce a plot of this distribution of these p-values, what do you observe? (c) Use R to produce a random sample of size 10 from a normal distribution with mean 22 and standard deviation 2. Then, conduct a t-test of this distribution against the null hypothesis that the true mean is 0. Repeat this process a large number of times (i.e. 10,000), saving the resulting p-value each time. What proportion of these simulations would reject the null hypothesis at an $\alpha = 0.05$ critical value? If you produce a plot of this distribution of these p-values, what do you observe?


Solution
# t tests