One-Way ANOVA

 ANOVA1.83p ANOVA1.86p anova1.89p

Suppose we have r normally distributed populations each having the same (unknown) variance. We wish to test the null hypothesis that each population has the same mean; i.e., that the mean is independent of population. The technique to be used is called analysis of variance (ANOVA).

We obtain independent random samples from each population, where the sample from the ith population has size n[i], for i = 1, . . . r. Initially, we assume that the summary statistics of the data is given as below:

 Sample Size Sample Mean Sample Dev. Pop 1 n M S Pop 2 n M S . . . . . . . . . . . . Pop r n[r] M[r] S[r]

To work with the data, we first let N = n + . . . + n[r] be the overall size of the sample data. The sample mean of the ith population is denoted by M[i]. The overall sample mean of the entire N data points is denoted by M.

The sum of squares of treatments SST is given by

SST = Sum [ n[i]*(M[i] - M)^2 , {i, 1, r} ],

and the sum of squares within error SSE is given by

SSE = Sum [ (n[i] - 1)*(S[i])^2 , {i, 1, r} ].

Using these sums, we define a test statistic x by

x = [SST / (r - 1)] / [SSE / (N - r)],

which follows an F distribution with r - 1 and N - r degrees of freedom: X ~ F(r - 1, N - r). The right tail value (or p-value) is given by P(X >= x).

For the level of significance a, the condition P(X >= x) < a means that if each population had the same mean, then the probability of the test statistic being as large as it is would be less than a. Since the chance is so small, we would reject the null hypothesis if P(X >= x) < a and conclude that not all the means are identical. That is, the mean would be dependent on population.

Using the ANOVA1 Program

The ANOVA1 program can be used to perform this ANOVA test when the data is given as summary statistics. To execute the program, we must enter this data into lists as follows:

On the TI-83: In the STAT EDIT screen, enter the samples sizes into list L1, enter the sample means into list L2, and enter the sample deviations into list L3.

On the TI-86: In the STAT EDIT screen, enter the samples sizes into list L1, enter the sample means into list L2, and enter the sample deviations into list L3. These list names may have to be created first within the screen.

On the TI-89: First use the Data/Matrix Editor to create a new DATA variable called dist and then enter the samples sizes into column c1, enter the sample means into column c2, and enter the sample deviations into column c3. Note: All of the TI-89 programs that require lists use a data variable called dist. So it should always be the "Current" variable in the Data/Matrix Editor after running a program.

The program will display the pooled sample deviation, the test statistic, and the p-value.

Example 1. Heights of adults are generally found to be normally distributed. Suppose we wish to see if the average height is the same among different age groups. The following summary statistics are for the heights (in inches) of independent random samples of women of various ages.

 Age Sample Size Sample Mean Sample Dev. 20-29 10 66 2.6614 30-39 9 66.5 1.8286 40-49 12 66.9375 2.0591 50-59 10 65.7 2.5462

Assuming that the heights of each age group have the same variance, test at the 0.05 level of significance whether the true average heights are the same among these age groups of women.

Solution. Upon executing the program, we receive an f-statistic ofabout 0.614 and a p-value of 0.61026. We also receive a pooled deviation of 2.29856 which can be used to estimate the common (unknown) standard deviation.

Based on this data, we can accept the claim that the true average female heights are identical within these four age groups. That is, the average height is independent of age. If the average female heights were identical, then there would be about a 61.03% chance of the sample means of these groups varying as they do with samples of these sizes. Since this chance is high (much higher than the level of significance 0.05), we do not have significant evidence to reject a claim that the means are identical.

Raw Data

When we are given just the raw measurements from each population, then we must compute the summary statistics on each in order to use the ANOVA1 program. However, we also can use the ANOVA command that is built-in on the TI-83 and that is included in the infstat packages that have been downloaded into the TI-86 and and TI-89.

So assume our data is given as below:

 Pop. 1 x1,1 x1,2 . . . x1,n Pop. 2 x2,1 x2,2 . . . x2,n . . . . . . . . . . Pop. r xr,1 xr,2 . . . xr,n[r]

In this case, we define SSE by

SSE = Sum [ Sum [ (xi,j - M[i] )^2 , j, 1, n[i] ] , {i, 1, r} ].

The f-statistic then is defined as before.

Example 2. Here are the raw sample data on the women's heights in inches as broken down by the four age groups. Perform ANOVA on the raw data to test the null hypothesis that the true average heights are the same for each age group.

 Age 20-29 63.75 68.25 62.25 67.25 70.75 65.75 68.5 63.75 64 65.75 30-39 64.75 67.5 68.25 69 64.75 66.5 64 68.25 65.5 40-49 68.5 69 66 65.5 66.5 67.75 70.5 64.25 65.25 64.5 69.5 66 50-59 64.5 66.25 66 67.5 65.25 64.75 67.5 69.75 60 65.5

Solution. On the TI-83: We use the built-in ANOVA( command in the STAT TESTS screen. First, we enter the data into the STAT Edit screen. Enter the data for Pop. 1 under list L1. Enter the remaining data sets under lists L2, L3, and L4. Note: If there are more than 6 populations, then simply define new lists, say L7, L8, etc., in the STAT Edit screen and enter the data in these columns. The names of these new lists then can be accessed from the LIST menu.

Now press STAT, scroll right to TESTS, then scroll down to ANOVA( (item F) and press ENTER. Then type the lists (2nd 1, 2nd 2, etc.) and enter the command ANOVA(L1,L2,L3, L4).

On the TI-86: Press LIST (2nd -), then F4. Enter the data for Pop. 1 under lists L1, L2, L3, and L4. (Define new lists as necessary for more populations).

Now press MATH (i.e., 2nd x), press MORE, then press F2 for STAT. Then press F1 for TESTS. Press MORE three times until you obtain the ANOVA( command, then press F1 for this command. Next press LIST (i.e., 2nd -), then press F3 for NAMES. Press the appropriate buttons to access the lists and enter the command ANOVA(L1, L2, L3, L4).

(Note: If the result does not appear, then enter the ResltOn button in the MATH (MORE) STAT (MORE) screen, and then re-enter the ANOVA(L1, L2, L3, L4) command.

On the TI-89: First use the Data/Matrix Editor to create a new DATA variable called dist and then enter the data for Pop. 1 into column c1, enter the data for Pop. 2 into column c2, and so on. You can then use the program anova.89p for up to seven populations. (This program is also in the s\ folder that was installed with the infstat89 package.) When executing the program, a screen appears asking which lists are to be used. For list1, type dist; for list2, tupe dist, etc. (If you called your data variable something else, like an, then use an, etc.) Hit ENTER when all the lists are typed in.

We obtain a p-value of about 0.61027, and we come to the same conclusion. If the average female heights were the same for each age group, then there would be a 61.027% chance of the individual sample means varying as they do with these small samples. Since this chance is high, we do not have significant evidence to reject the claim that the means are the same for each age group.

Exercises

1. Below is a table on the average weight gain (in kilograms) during pregnancy for women in various countries.

 Sample Size Sample Mean Sample Dev. Ecuador 52 9.6 2.5 Libya 46 9.2 2.4 Pakistan 60 7.9 1.9 Thailand 48 8.4 2.6 Haiti 40 8.8 2.3

Assuming the weight gains are normally distributed with the same variance for each country, test the hypothesis that the average weight gain is independent of country.

2. The combined SAT scores of students at a particular university are to be studied to see if there is a difference in average score depending on high school GPA. The data below is a random sample of scores. Assume that the SAT scores for each GPA range are normally distributed with the same variance. Use the data to test the hypothesis, at the 0.03 level of significance, that the average SAT score is the same for each GPA range.

 High School GPA 3.51 - 4.0 3.0 - 3.50 0 - 2.99 1220 1270 1220 1160 1200 850 950 970 880 1070 720 920 1110 1070 910 Combined 1150 860 1260 SAT 1440 980 830 Scores 1280 800 810 1020 900 820 1080 1330 1170 1120 1140 810 1210 870 1040 1030 1010 960 1020 760 920 1400 830 1260 1170 910 1060 1350 1230 1090 1070 1110 1050 1320 970 880 1200 1090 750 1070 1300 960 1240 1090 970

Solutions

1. First enter the summary statistics into the appropriate lists as in Example 1, then execute the ANOVA1 program. We receive an f-statistic of 4.40828 and a p-value of 0.00185837. With the very low p-value, we have significant evidence to reject the hypothesis that the mean weight gain during pregnancy is independent of country. If all the means were the same, then there would be only about a 0.00186 probability of the sample means varying by as much as they do with samples of these sizes.

2. After entering the data in appropriate lists as in Example 2, we execute the ANOVA( command (or the anova.89p program on the TI-89).

We obtain a p-value of 0.000318. So we can reject the claim that the average SAT score independent of thes GPA groups. For if the average SAT score were independent of GPA, then there would be only a 0.000318 probability of the sample means varying as they do with samples of these sizes. Since this probability is so small, we have strong evidence to reject such a claim.

If we compute the sample means of each population, we see that the means appear to decrease as the GPA decreases. The respective sample means are approximately 1167.27, 1015.24, and 978.7.