
Ch. 23 Resources
Chapter 23: Inferences About Means
For the past several chapters we have been working with confidence intervals and hypothesis tests about proportions (`p`). We now turn to problems that deal with means (`mu`). The basic format of the problems will look familiar, but a few of the details will change.
Before working on this Chapter you should review the last half of Chapter 18, about the Central Limit Theorem (or work through it for the first time if you skipped it the first time through).
iPod capacity
An iPod is a portable audio player that allows you to store music from CDs in the form of MP3 files. I'm interested in purchasing an iPod, but different versions are available (each with a different capacity) and I want to know how big the iPod will need to be to hold my music collection.
To estimate how many of my CD recordings of classical music will fit onto an iPod, I needed to know the average length of a classical CD in my collection, but I don't want to tabulate this information for 700 or more CDs. From among the classical CDs in my collection, I randomly selected 14 CDs and recorded the total running time (in minutes) along with the name of the composer who wrote the music recorded on the CD.
composer | time |
composer | time |
Barber | 62.0 |
Berlioz | 50.7 |
Brahms | 74.1 |
Copland | 51.7 |
Elgar | 48.5 |
Grieg | 72.3 |
Kernis | 70.6 |
Mahler | 57.1 |
Mozart |
62.3 |
Poulenc | 66.5 |
Rorem | 69.6 |
Shostakovich | 79.9 |
Strauss | 72.1 |
Torke | 53.5 |
Here are a histogram, boxplot and Normal probability plot of the running times.
I wish to construct a 95% confidence interval for the mean running time of a CD in my collection. First we need to check conditions:
Randomization condition: The 14 CDs were randomly selected, so this condition is satisfied.
10% condition: The 14 CDs represent less than 10% of the 700 CDs in the collection.
Nearly Normal condition: The histogram appears to be bimodal, although the sample size is quite small so it is difficult to determine whether or not there are actually two modes; the boxplot, however, appears reasonably symmetric; the Normal probability plot appears to bend a bit, perhaps reinforcing that there are two modes. Given the small sample size, we should proceed with caution.
We can compute the mean (`bar y_1` = 63.6 minutes) and standard deviation (`s_1` = 10.0 minutes) of the 14 CD times in our one sample using Data Desk or 1-VarStats on the TI-84. We would like to compute the standard deviation of all possible sample means:
`SD(bar y) = (sigma)/(sqrt(n))`
but we don't know `sigma` (the standard deviation of the running times for all 700+ CDs) so instead we use the estimate:
`SE(bar y) = (s)/(sqrt(n)) = (10.0)/(sqrt(14)) approx 2.67`
When we were computing the margin of error for a confidence interval for a proportion, we used `z* = 1.96` for the critical value, but the Normal model doesn't (quite) apply to the distribution of sample means. Instead we must use the t model, so we need `t*` for a 95% confidence level with 13 degrees of freedom (`df = n - 1 = 14 - 1 = 13`).
There are two ways to find the value of this `t*`. The most expedient way is to use Table T in Appendix E of the textbook. We look in the center column (note the 95% at the bottom of the column) and in the row where df = 13; you should see that t*13 = 2.160.
Another way to get this value is to use invT(0.975,13) on the TI-84. This works just like invNorm did to compute z*, except in this case we also need to specify the number of degrees of freedom. The only problem is that there is no invT feature on the TI-83, so unless you have a TI-84 you would have to use Table T.
Either way, we now know that t*13 = 2.160, so we can compute:
`ME = t_{13}^* times SE(bar y) = 2.160 times 2.67 approx 5.8` minutes
We add and subtract this margin of error from the observed sample mean (63.6 minutes) to get a confidence interval of (57.8, 69.4), or:
`57.8 < mu < 69.4`
We are 95% confident that the true mean duration of these CDs is between 57.8 minutes and 69.4 minutes. However, we should be cautious about using these results, as the Nearly Normal Condition may have been violated here. In this case it won't be a matter of life and death if my iPod doesn't hold quite as many CDs as I expect it to, but if we were estimating something for which there might be more dire consequences if we made a mistake, we may not want to report any results at all, or gather more data so that the Normality assumption is not as vital (for sample sizes greater than 40 this condition isn't as crucial, but for sample sizes smaller than 15 it definitely is).
t-intervals on the TI-84
We can check our answer using the TInterval feature on the TI-84. If you entered the CD data into L1 to compute the mean and standard deviation in our previous computations, select the Data option, specify L1 for List, leave Freq set to 1, specify 0.95 for C-Level and then move the cursor to Calculate and press ENTER. If you did not enter the data into the calculator already, but you do know the summary statistics, select the Stats option, specify 63.6 for x, 10.0 for Sx, 14 for n and 0.95 for C-Level, then move the cursor to Calculate and press ENTER. Either way you should see the confidence interval like (57.826,69.374) displayed, which agrees with out previous computation.
While the TI-84 is useful for computing the confidence interval limits, it doesn't check assumptions and conditions, nor does it properly interpret the confidence interval. On an exam, you can use TInterval to compute the confidence interval limits, but be sure to remember the conditions and interpretation as well.
t-intervals with Data Desk
If you have a data set open in Data Desk, click on the variable of interest (in this case time) to select it as Y, then click Calc and Estimate. Select t-Interval for individual µ's from the first drop-down menu, select a desired confidence level (in this case 95%), select Lower Bound < µ < Upper Bound for Bounds, then click Show Results. The confidence interval will be displayed.
Hypothesis tests
Instead of estimating the average length of a CD with a confidence interval, suppose I claimed that the average length of a CD was longer than one hour. We could test this claim using the following hypotheses:
H0: µ = 60
HA: µ > 60
We first need to check conditions, but these are exactly the same as those that we checked for the confidence interval: while the randomness and 10% conditions are satisfied, we have some concerns about Normality, but will proceed with caution.
From our previous work on the confidence interval, we know that `SE(bar y) = 2.67`
`t = (bar y_1 - mu_0)/(SE(bar y)) = (63.6 - 60)/(2.76) approx 1.35`
The P-value for this hypothesis test will be the probability (if the mean CD length is in fact 60 minutes) of selecting a random sample of 14 CDs that has a mean length of 63.6 minutes or more. Previously we used normalcdf to compute P-values, but the Normal model no longer applies, the t-model does. So we want to know the probability of getting a t-score greater than 1.35, in a t-model with 13 degrees of freedom. Thus:
P = tcdf(1.35,1E99,13) ≈�� 0.100
Note that we use tcdf (located in the DISTR menu of the TI-84) and that we must enter the left-hand t-score, the right-hand t-score, and then the number of degrees of freedom (in this case `df = n-1 = 14-1 = 13`).
The P-value is on the high side at 10%. There is some evidence that the average CD length exceeds one hour, but perhaps not enough evidence to convince us. In addition, we're not sure that the Normality assumption is reasonable, so in this case we should fail to reject the null hypothesis: there is not sufficient evidence (P = 0.10) to conclude that the mean running time of these CDs is greater than one hour. It might be wise to get a larger sample, which might alleviate our concerns about Normality and might allow us to reach a more definitive conclusion.
t-tests on the TI-84
We can use the T-Test feature on the TI-84 to check our answer for the P-value. Follow the steps above for TInterval but specify 60 for µ0 and in place of the C-Level specify >µ0 for µ.
While the TI-84 is useful for computing the P-value, it doesn't check assumptions and conditions, nor does it properly interpret the P-value. On an exam, you can use T-Test to compute the P-value, but don't forget the other important components of a hypothesis test.
t-tests with Data Desk
If you have a data set open in Data Desk, click on the variable of interest (in this case time) to select it as Y, then click Calc and Test. Select t-test of individual µ's from the first drop-down menu, select a desired alpha level (in this case 0.05 or 0.10 might be reasonable), select other for the null hypothesis and type 60, then press OK, then select µ>60 for the alternative hypothesis and click Show Results. The P-value will be displayed, along with some additional information.
Homework
Work the following exercises in Chapter 23: 9–21 odd, 33, 39 and 43.
Errata
I haven't (yet!) found any errors in Chapter 23; if you encounter a typo, please let me know.
ActivStats
Work through the lessons on pages 23-1 through 23-3 in the ActivStats lesson book, as time permits; you can safely skip "Testing with t-tables" on page 23-3.
Additional Resources
- TInterval
- A flash tutorial on using the TI-83's TInterval feature to construct a confidence interval for a single population mean.
- One-sample t-interval
- A Web-based computational tool from Graphpad Software.
- Hypothesis Test, Single Population Mean
- A flash tutorial on using the TI-83's TTest feature to conduct a hypothesis test for a single population mean.
- One-sample t-test
- A Web-based computational tool from Graphpad Software.