Independent samples t-test with pooled variance example

Movies and Mood

We are interested in whether the type of movie someone sees at the theater affects their mood when they leave. We decide to ask people about their mood as they leave one of two movies: a comedy (group 1, 𝑛 = 35) or a horror film (group 2, 𝑛 = 29). Our data are coded so that higher scores indicate a more positive mood. We have good reason to believe that people leaving the comedy will be in a better mood, so we use a one-tailed test at α = 0.05 to test our hypothesis.

Step 1: State the Hypotheses As always, we start with hypotheses:

H0: There is no difference in average mood between the two movie types

H0:μ1−μ2=0

or

H0:μ1=μ2

HA: The comedy film will give a better average mood than the horror film

HA:μ1−μ2>0

or

HA:μ1>μ2

Notice that in the first formulation of the alternative hypothesis we say that the first mean minus the second mean will be greater than zero. This is based on how we code the data (higher is better), so we suspect that the mean of the first group will be higher. Thus, we will have a larger number minus a smaller number, which will be greater than zero. Be sure to pay attention to which group is which and how your data are coded (higher is almost always used as better outcomes) to make sure your hypothesis makes sense!

Step 2: Find the Critical Values Just like before, we will need critical values, which come from out 𝑡-table. In this example, we have a one-tailed test at α = 0.05 and expect a positive answer (because we expect the difference between the means to be greater than zero). Our degrees of freedom for our independent samples t-test is just the degrees of freedom from each group added together: 35 + 29 – 2 = 62. From our t-table, we find that our critical value is 𝑡 = 1.671. Note that because 62 does not appear on the table, we use the next lowest value, which in this case is 60.

Step 3: Compute the Test Statistic The data from our two groups are presented in the tables below. Table 10.6.1 shows the values for the Comedy group, and Table 10.6.2 shows the values for the Horror group. Values for both have already been placed in the Sum of Squares tables since we will need to use them for our further calculations. The column on the left is our raw data.

Using the sum of the first column for each table, we can calculate the mean for each group:

and

These values were used to calculate the middle rows of each table, which sum to zero as they should (the middle column for group 2 sums to a very small value instead of zero due to rounding error – the exact mean is 16.50344827586207, but that’s far more than we need for our purposes). Squaring each of the deviation scores in the middle columns gives us the values in the third columns, which sum to our next important value: the Sum of Squares for each group: SS1 = 5061.60 and SS2 = 3896.45. These values have all been calculated and take on the same interpretation as they have thus far – no new computations yet. Before we move on to the pooled variance that will allow us to calculate standard error, let’s compute our standard deviation for each group; even though we will not use them in our calculation of the test statistic, they are still important descriptors of our data:

and

Now we can move on to our new calculation, the pooled variance, which is just the Sums of Squares that we calculated from our table and the degrees of freedom, which is just 𝑛–1 for each group:

As you can see, if you follow the regular process of calculating standard deviation using the Sum of Squares table, finding the pooled variance is very easy. Now we can use that value to calculate our standard error, the last step before we can find our test statistic:

Finally, we can use our standard error and the means we calculated earlier to compute our test statistic. Because the null hypothesis value of μ1–μ2 is 0.00, we will leave that portion out of the equation for simplicity:

The process of calculating our obtained test statistic 𝑡 = 2.48 followed the same sequence of steps as before: use raw data to compute the mean and sum of squares (this time for two groups instead of one), use the sum of squares and degrees of freedom to calculate standard error (this time using pooled variance instead of standard deviation), and use that standard error and the observed means to get t. Now we can move on to the final step of the hypothesis testing procedure.

Step 4: Make the Decision Our test statistic has a value of 𝑡 = 2.48, and in step 2 we found that the critical value is t= 1.671. 2.48 > 1.671, so we reject the null hypothesis:

Reject H0. Based on our sample data from people who watched different kinds of movies, we can say that the average mood after a comedy movie (X1=24.00) is better than the average mood after a horror movie (X2=16.50), 𝑡(62)=2.48, p<.05, t(62)=2.48, p<.05.

References

  1. Foster et al. (University of Missouri-St. Louis, Rice University, & University of Houston, Downtown Campus) https://stats.libretexts.org/Bookshelves/Applied_Statistics/Book%3A_An_Introduction_to_Psychological_Statistics_%28Foster_et_al.%29/10%3A__Independent_Samples/10.06%3A_Movies_and_Mood

The LibreTexts libraries are Powered by MindTouch® and are supported by the Department of Education Open Textbook Pilot Project, the UC Davis Office of the Provost, the UC Davis Library, the California State University Affordable Learning Solutions Program, and Merlot. We also acknowledge previous National Science Foundation support under grant numbers 1246120, 1525057, and 1413739. Unless otherwise noted, LibreTexts content is licensed by CC BY-NC-SA 3.0. Have questions or comments? For more information contact us at info@libretexts.org or check out our status page at https://status.libretexts.org.