10.4: Practice Independent t-test on Movies and Mood
- Page ID
- 44880
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\dsum}{\displaystyle\sum\limits} \)
\( \newcommand{\dint}{\displaystyle\int\limits} \)
\( \newcommand{\dlim}{\displaystyle\lim\limits} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\(\newcommand{\longvect}{\overrightarrow}\)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\ket}[1]{\left| #1 \right>}\)
\(\newcommand{\bra}[1]{\left< #1 \right|}\)
\(\newcommand{\braket}[2]{\left< #1 \vphantom{#2} \right| \left. #2 \vphantom{#1} \right>}\)
\(\newcommand{\braopket}[3]{\left< #1 \vphantom{#2}\vphantom{#3} \right| #2 \vphantom{#1}\vphantom{#3} \left| #3 \vphantom{#1}\vphantom{#2} \right>}\)
\(\newcommand{\qmvec}[1]{\mathbf{\vec{#1}}}\)
\(\newcommand{\op}[1]{\hat{\mathbf{#1}}}\)
\(\newcommand{\expect}[1]{\langle #1 \rangle}\)
\(\newcommand{\dfn}[1]{\emph{\textbf{#1}}}\)
Dr. Foster was interested in whether the type of movie someone sees at the theater affects their mood when they leave. He decide to ask people about their mood as they leave one of two movies: a comedy (group 1, \(N_{C}\) = 35) or a horror film (group 2, \(N_{H}\) = 29). The data are coded so that higher scores indicate a more positive mood.
Step 1: Hypotheses
As always, we start with hypotheses:
- Research Hypothesis: The average mood for the sample who watched a comedy will be higher than the average mood for the sample who watched a horror film.
- Symbols: \(\bar{X}_{C} > \bar{X}_{H} \)
- Null Hypothesis: The average mood for the sample who watched a comedy will be similar to the average mood for the sample who watched a horror film. In order words, there will be no difference between the means.
- Symbols: \(\bar{X}_{C} = \bar{X}_{H} \)
One thing to notice about the research hypothesis is that we put the mean of the comedy first. And since we think that mean will be bigger, our calculated t-score should be positive because we will have a larger number minus a smaller number. Be sure to pay attention to which group is which and how your data are coded to make sure your hypothesis makes sense; higher score usually indicate better outcome, but not always!
Step 2: Collect Data
Table \(\PageIndex{1}\) provides descriptive statistics about each group, which lets you know that the data has already been collected.
| Group | N | Mean | Standard Deviation |
|---|---|---|---|
| Group 1: Comedy | 35 | 24.00 | 12.20 |
| Group 2: Horror Movie | 29 | 16.50 | 11.80 |
You might also be able to identify the variables and the sample size from Table \(\PageIndex{1}\), although reading a little about the scenario (like the first paragraph in this section) can help, too. Let’s use that information to answer the questions in Example \(\PageIndex{1}\).
- Based on the Table \(\PageIndex{1}\),, who is the sample? Your answer should include the total number of people in the sample.
- Based on this sample, who could be the population? Why?
- What is the DV (effect)? In other words, what was the outcome that was measured?
- What is the IV? In other words, what are the two groups that are being compared?
Solution
- The total sample is 64 movie-goers.
- Any reasonable population based on the sample, but probably people who watch movies in a movie theater.
- The DV (outcome that was measured) was an assessment of mood, with higher scores indicating a more positive mood.
- The IV (groups) were the two types of movies: comedy or horror
Step 3: Analyze Data
The descriptive statistics for both groups are provided in Table \(\PageIndex{1}\) so that you can focus on the independent samples t-test equation in Example \(\PageIndex{1}\), and not get caught up in other calculations right now
Take a deep breath!
Calculate an independent t-test using the descriptive statistics from Table \(\PageIndex{1}\).
After your deep breath, copy down the independent samples t-test formula:
\[t=\dfrac{(\bar{X}_{C}-\bar{X}_{H})}{\sqrt{\left[\dfrac{\left( N_{C}-1\right) * s_{C}^{2} + \left(N_{H}-1\right) * s_{H}^{2}}{N_{C}+N_{H}-2}\right] * \left(\dfrac{1}{N_{C}} + \dfrac{1}{N_{H}}\right)}} \nonumber \]
And then fill in all of the numbers from Table \(\PageIndex{1}\) into the formula:
\[t=\dfrac{(24.00 - 16.50)}{\sqrt{\left[\dfrac{\left(35 -1 \right) * (12.20)^{2} + \left(29 - 1\right) * (11.80)^{2}}{35 + 29 - 2}\right] * \left(\dfrac{1}{35} + \dfrac{1}{29 }\right)}} \nonumber \]
At this point, you do the calculations by following the order of operations (PEMDAS from the Math Refresher in chapter 3!).
Solution
I like to start at the top right and work my way left and down because that's how reading goes in English. Let's try that by doing a few of the easy calculations first. As long as you follow the rules of the order of operations, you can do this in whatever order you'd like, though.
\[\begin{aligned} t &=\dfrac{(24.00 - 16.50)}{\sqrt{\left[\dfrac{\left(35 -1 \right) * (12.20)^{2} + \left(29 - 1\right) * (11.80)^{2}}{35 + 29 - 2}\right] * \left(\dfrac{1}{35} + \dfrac{1}{29 }\right)}} \nonumber \\ t_{Add/Subtract} &= \dfrac{7.50}{\sqrt{\left[\dfrac{\left(34 \right) * (12.20)^{2} + \left(28\right) * (11.80)^{2}}{62 }\right] * \left(\dfrac{1}{35} + \dfrac{1}{29 }\right)}} \nonumber \\ t_{Square} &= \dfrac{7.50}{\sqrt{\left[\dfrac{\left(34 * 148.84\right) + \left(28 * 139.24\right)}{62 }\right] * \left(\dfrac{1}{35} + \dfrac{1}{29 }\right)}} \nonumber \\ t_{Multiply} &= \dfrac{7.50}{\sqrt{\left[\dfrac{\left(5060.56\right) + \left(3898.72\right)}{62 }\right] * \left(\dfrac{1}{35} + \dfrac{1}{29 }\right)}} \nonumber \\ t_{AddAgain} &= \dfrac{7.50}{\sqrt{\left(\dfrac{8959.28}{62 }\right) * \left(\dfrac{1}{35} + \dfrac{1}{29 }\right)}} \nonumber \\ t_{Divide} &= \dfrac{7.50}{\sqrt{\left(144.50\right) * \left(0.03 + 0.03\right)}} \nonumber \\ t_{AddAgainAgain} &= \dfrac{7.50}{\sqrt{\left(144.50\right) * \left(0.06\right)}} \nonumber \\ t_{MultiplyAgain} &= \dfrac{7.50}{\sqrt{8.67}} \nonumber \\ t_{Square Root} &= \dfrac{7.50}{2.94 } \nonumber \\ t_{TheEnd!} &= 2.55 \nonumber \end{aligned} \]
If you use Excel your final calculations will be slightly different because Excel keeps all of the numbers after the decimal point. For Excel, the calculation will look like:
\[\begin{aligned} t &=\dfrac{(24.00 - 16.50)}{\sqrt{\left[\dfrac{\left(35 -1 \right) * (12.20)^{2} + \left(29 - 1\right) * (11.80)^{2}}{35 + 29 - 2}\right] * \left(\dfrac{1}{35} + \dfrac{1}{29 }\right)}} \nonumber \\ t_{Add/Subtract} &= \dfrac{7.50}{\sqrt{\left[\dfrac{\left(34 \right) * (12.20)^{2} + \left(28\right) * (11.80)^{2}}{62 }\right] * \left(\dfrac{1}{35} + \dfrac{1}{29 }\right)}} \nonumber \\ t_{Square} &= \dfrac{7.50}{\sqrt{\left[\dfrac{\left(34 * 148.84\right) + \left(28 * 139.24\right)}{62 }\right] * \left(\dfrac{1}{35} + \dfrac{1}{29 }\right)}} \nonumber \\ t_{Multiply} &= \dfrac{7.50}{\sqrt{\left[\dfrac{\left(5060.56\right) + \left(3898.72\right)}{62 }\right] * \left(\dfrac{1}{35} + \dfrac{1}{29 }\right)}} \nonumber \\ t_{AddAgain} &= \dfrac{7.50}{\sqrt{\left(\dfrac{8959.28}{62 }\right) * \left(\dfrac{1}{35} + \dfrac{1}{29 }\right)}} \nonumber \\ t_{Divide} &= \dfrac{7.50}{\sqrt{\left(144.50\right) * \left(0.03 + 0.03\right)}} \nonumber \\ t_{AddAgainAgain} &= \dfrac{7.50}{\sqrt{\left(144.50\right) * \left(0.06\right)}} \nonumber \\ t_{MultiplyAgain} &= \dfrac{7.50}{\sqrt{9.11}} \nonumber \\ t_{Square Root} &= \dfrac{7.50}{3.02} \nonumber \\ t_{TheEnd!} &= 2.48 \nonumber \end{aligned} \]
Phew!
A few things to notice. I added subscripts inappropriately to indicate what I was doing on each step. Also, on my own, I might have combined a few of these calculations in one step, but I don't encourage too much of that because it's easy to miss a step. Especially when you are re-writing the equation over and over again.
Before we can move on to the final step of the hypothesis testing procedure, take a break and congratulate yourself! That was a scary formula, and you did it! I know that you're not supposed to use food as a reward, so I petted my dog as a reward. But I also had a dark chocolate truffle.
Step 4: Conclusion
Just like before, we will need critical values, which come from out of the same \(t\)-table that we used for one-sample t-tests (and found in the Common Critical Value Tables page at the back of this book). In this example, we have a one-tailed test at \(α\) = 0.05. Our degrees of freedom for our independent samples t-test is just the degrees of freedom from each group added together:
\[d f=N_{1}+N_{2}-2 = 35 + 29 - 2 = 62 \nonumber \]
OR
\[ d f = (N_{1} - 1) + (N_{2} - 1) = (35-1) + (29-1) = 34 + 28 = 62 \nonumber \]
From our t-table, we find that our the closest Degrees of Freedom to 62 that is listed is \( d f = 60 \), with a critical value of\(t*\) = 1.671. Note that just because we use the \( d f = 60 \) row in the table doesn't mean that the Degrees of Freedom is 60. The table doesn't have all critical t-scores, so we're using the closes Degrees of Freedom to find a critical value that is close to what we need for our two samples.
Our calculated test statistic has a value of \(t\) = 2.48, and the critical value is \(t*\) = 1.671. As 1.671 is smaller than 2.48 (the critical value is smaller than the calculated value), we reject the null hypothesis because:
\((Critical < |Calculated|) =\) Reject null \(=\) means are different \(= p<.05\)
\((Critical > |Calculated|) =\) Retain null \(=\) means are similar \(= p>.05\)
We found that the calculated t-score was more extreme than the critical t-score. The critical t-score was marking the 5% probability, so a calculated score more extreme than that shows that the probability of the calculated t-score being this extreme (the means being this different) is less than 5%.
To make conclusions, let's look back at the research hypothesis:
- Research Hypothesis: The average mood for the sample who watched a comedy will be higher than the average mood for the sample who watched a horror film.
- Symbols: \(\bar{X}_{C} > \bar{X}_{H} \)
By rejecting the null hypothesis, we’re saying that the means are different. Our research hypothesis suggests that those who watch comedies will be in a better mood (have a higher score on our DV) than those who watched a horror movie. Looking back at Table \(\PageIndex{1}\), we find that this is indeed the case. The participants who watched the comedy scored both mathematically and statistically significantly higher than the horror movie group. Use Example \(\PageIndex{2}\) to create a statistical sentence to indicate this conclusion.
What is the statistical sentence for these results?
Solution
\(t(62) = 2.48, p < .05\)
Step 5: Write-Up
You have all the pieces to practice a write-up now!
Complete the write-up for this scenario.
Solution
Based on our sample data from people who watched different kinds of movies, the average mood for the sample who watched a comedy (\(\overline{X_{C}}=24.00\)) was higher than the average mood for the sample who watched a horror film (\(\overline{X_{H}}=16.50\)), \(t(62) = 2.48, p < .05\). This supports our research hypothesis.
You're doing great, keep it up!


