Skip to main content
Statistics LibreTexts

10.3: Movies and Mood Example

  • Page ID
    56657
    • Chanler Hilley, Kennesaw State University
    • University of Missouri System

    \( \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{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    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, n = 35) or a horror film (Group 2, n = 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 \(\alpha=.05\) to test our hypothesis.

    Step 1: State the Hypotheses

    As always, we start with hypotheses:

    \(
    H_0: \text{There is no difference in average mood between the two movie types} \\
    H_0: \mu_{\text{comedy}} - \mu_{\text{horror}} = 0 \\
    \qquad \text{or} \\
    H_0: \mu_{\text{comedy}} = \mu_{\text{horror}} \\[4.5ex]
    H_A: \text{The comedy film will produce a better average mood than the horror film} \\
    H_A: \mu_{\text{comedy}} - \mu_{\text{horror}} > 0 \\
    \qquad \text{or} \\
    H_A: \mu_{\text{comedy}} > \mu_{\text{horror}} \\
    \)

    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 our t table in section 16.2. In this example, we have a one-tailed test at \(\alpha=.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 t* = 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 and Effect Size

    The data from our two groups are presented in the tables below. Table \(\PageIndex{1}\) shows the values for the Comedy group, and Table \(\PageIndex{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. As always, the column on the left is our raw data.

    Table \(\PageIndex{1}\): Raw scores and sum of squares for Group 1 (comedy).
    X X − M (XM)2
    39.10 15.10 228.01
    38.00 14.00 196.00
    14.90 −9.10 82.81
    20.70 −3.30 10.89
    19.50 −4.50 20.25
    32.20 8.20 67.24
    11.00 −13.00 169.00
    20.70 −3.30 10.89
    26.40 2.40 5.76
    35.70 11.70 136.89
    26.40 2.40 5.76
    28.80 4.80 23.04
    33.40 9.40 88.36
    13.70 −10.30 106.09
    46.10 22.10 488.41
    13.70 −10.30 106.09
    23.00 −1.00 1.00
    20.70 −3.30 10.89
    19.50 −4.50 20.25
    11.40 −12.60 158.76
    24.10 0.10 0.01
    17.20 −6.80 46.24
    38.00 14.00 196.00
    10.30 −13.70 187.69
    35.70 11.70 136.89
    41.50 17.50 306.25
    18.40 −5.60 31.36
    36.80 12.80 163.84
    54.10 30.10 906.01
    11.40 −12.60 158.76
    8.70 −15.30 234.09
    23.00 −1.00 1.00
    14.30 −9.70 94.09
    5.30 −18.70 349.69
    6.30 −17.70 313.29
    ΣX = 840 Σ(X M) = 0 Σ(X M)2 = 5061.60
    Table \(\PageIndex{2}\): Raw scores and sum of squares for Group 2 (horror).
    X X − M (XM)2
    24.00 7.50 56.25
    17.00 0.50 0.25
    35.80 19.30 372.49
    18.00 1.50 2.25
    −1.70 −18.20 331.24
    11.10 −5.40 29.16
    10.10 −6.40 40.96
    16.10 −0.40 0.16
    −0.70 −17.20 295.84
    14.10 −2.40 5.76
    25.90 9.40 88.36
    23.00 6.50 42.25
    20.00 3.50 12.25
    14.10 −2.40 5.76
    −1.70 −18.20 331.24
    19.00 2.50 6.25
    20.00 3.50 12.25
    30.90 14.40 207.36
    30.90 14.40 207.36
    22.00 5.50 30.25
    6.20 −10.30 106.09
    27.90 11.40 129.96
    14.10 −2.40 5.76
    33.80 17.30 299.29
    26.90 10.40 108.16
    5.20 −11.30 127.69
    13.10 −3.40 11.56
    19.00 2.50 6.25
    −15.50 −32.00 1024.00
    ΣX = 478.6 Σ(X M) = 0.10 Σ(X M)2 = 3896.45

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

    \[
    M_\text{comedy}=\frac{840}{35}=24.00
    \nonumber
    \]

    and

    \[
    M_\text{horror}=\frac{478.60}{29}=16.50
    \nonumber
    \]

    These values were used to calculate the middle columns 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: SScomedy = 5061.60 and SShorror = 3896.45. These values have all been calculated and take on the same interpretation as they have since Chapter 3—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:

    \[
    s_\text{comedy}=\sqrt{\frac{5061.60}{34}}=12.20
    \nonumber
    \]

    and

    \[
    s_\text{horror}=\sqrt{\frac{3869.45}{28}}=11.80
    \nonumber
    \]

    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 n − 1 for each group:

    \[
    \begin{aligned}
    s_p^2=&\frac{SS_1+SS_2}{df_1+df_2}\\[2.5ex]
    =&\frac{5061.60+3896.45}{34+28}\\[2.5ex]
    =&\frac{8958.05}{62}=144.48
    \end{aligned}
    \nonumber
    \]

    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:

    \[
    \begin{aligned}
    s_{M_1-M_2}=&\sqrt{\frac{s_p^2}{n_1}+\frac{s_p^2}{n_2}}\\[2.5ex]
    =&\sqrt{\frac{144.48}{35}+\frac{144.48}{29}}\\[2.5ex]
    =&\sqrt{4.13+4.98}=\sqrt{9.11}=3.02
    \end{aligned}
    \nonumber
    \]

    Finally, we can use our standard error and the means we calculated earlier to compute our test statistic. Because the null hypothesis value of \(\mu_1-\mu_2=0\), we will leave that portion out of the equation for simplicity:

    \[
    t=\frac{M_1-M_2}{s_{M_1-M_2}}=\frac{24.00-16.50}{3.02}=2.48
    \nonumber
    \]

    The process of calculating our obtained test statistic t = 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 t = 2.48, and in Step 2 we found that the critical value is t* = 1.671. Because 2.48 > 1.671, we reject the null hypothesis:

    Reject \(H_0\). Based on our sample data from people who watched different kinds of movies, we can say that the average mood after a comedy movie (Mcomedy = 24.00, SDcomedy = 12.20) is better than the average mood after a horror movie (Mhorror = 16.50, SDhorror = 11.80), t(62) = 2.48, p < .05.

    Figure \(\PageIndex{1}\) shows the output from JASP for this example.

    Table showing results of an independent samples t-test comparing Comedy and Horror moods, with means, sample sizes, and summary statistics.
    Figure \(\PageIndex{1}\): Output from JASP for the independent-samples t-test described in the Movies and Mood example. (“JASP independent-samples t-test” by Rupa G. Gordon/Judy Schmitt is licensed under CC BY-NC-SA 4.0.)

    Effect Sizes and Confidence Intervals

    We have seen in previous chapters that even a statistically significant effect needs to be interpreted along with an effect size to see if it is practically meaningful. We have also seen that our sample means, as a point estimate, are not perfect and would be better represented by a range of values that we call a confidence interval. As with all other topics, this is also true of our independent samples t-tests.

    Our effect size for the independent samples t-test is still Cohen’s d, and it is still just our observed effect divided by the standard deviation. Remember that standard deviation is just the square root of the variance, and because we work with pooled variance in our test statistic, we will use the square root of the pooled variance as our denominator in the formula for Cohen’s d. This gives us:

    \[
    \Large
    d=\frac{M_1-M_2}{\sqrt{s_p^2}}
    \nonumber
    \]

    For our example above, we can calculate the effect size to be:

    \[
    d=\frac{24.00-16.50}{\sqrt{144.48}}=\frac{7.50}{12.02}=0.62
    \nonumber
    \]

    We interpret this using the same guidelines as before, so we would consider this a moderate or moderately large effect.

    Our confidence intervals also take on the same form and interpretation as they have in the past. The value we are interested in is the difference between the two means, so our point estimate is the value of one mean minus the other, or \(M_1-M_2\). Just like before, this is our observed effect and is the same value as the one we place in the numerator of our test statistic. We calculate this value, then place the margin of error—still our critical value multiplied by our standard error—above and below it. That is:

    \[
    \Large
    \text{Confidence interval}=(M_1-M_2)\pm t^*(s_{M_1-M_2})
    \nonumber
    \]

    Because our hypothesis testing example used a one-tailed test, it would be inappropriate to calculate a confidence interval on those data (remember that we can only calculate a confidence interval for a two-tailed test because the interval extends in both directions). Let’s say we find summary statistics on the average life satisfaction of people from two different towns and want to create a confidence interval to see if the difference between the two might actually be zero.

    Our sample data are M1 = 28.65, s1 = 12.40, n1 = 40 and M2 = 25.40, s2 = 15.68, n2 = 42. At face value, it looks like the people from the first town have higher life satisfaction (28.65 vs. 25.40), but it will take a confidence interval (or complete hypothesis testing process) to see if that is true or just due to random chance. First, we want to calculate the difference between our sample means, which is 28.65 − 25.40 = 3.25. Next, we need a critical value from our t table. If we want to test at the normal 95% level of confidence, then our sample sizes will yield degrees of freedom equal to 40 + 42 − 2 = 80. From our table, that gives us a critical value of t* = 1.990. Finally, we need our standard error. Recall that our standard error for an independent samples t-test uses pooled variance, which requires the sum of squares and degrees of freedom. Up to this point, we have calculated the sum of squares using raw data, but in this situation, we do not have access to it. So, what are we to do?

    If we have summary data like standard deviation and sample size, it is very easy to calculate the pooled variance, and the key lies in rearranging the formulas to work backward through them. We need the sum of squares and degrees of freedom to calculate our pooled variance. Degrees of freedom is very simple: we just take the sample size minus 1.00 for each group. Getting the sum of squares is also easy: remember that variance is standard deviation squared and is the sum of squares divided by the degrees of freedom. That is:

    \[
    \Large
    s^2=(s)^2=\frac{SS}{df}
    \nonumber
    \]

    To get the sum of squares, we just multiply both sides of the above equation to get:

    \[
    \Large
    (s)^2(df)=SS
    \nonumber
    \]

    which is the squared standard deviation multiplied by the degrees of freedom (n − 1) equals the sum of squares.

    Using our example data:

    \[
    \begin{align*}
    (s)_1^2(df_1) &= SS_1 \\
    (12.40)^2(40 - 1) &= 5996.64
    \end{align*}
    \]

    and

    \[
    \begin{align*}
    (s)_2^2(df_2) &= SS_2 \\
    (15.68)^2(42 - 1) &= 10080.36
    \end{align*}
    \]

    And thus our pooled variance equals:

    \[
    \begin{aligned}
    s_p^2=&\frac{SS_1+SS_2}{df_1+df_2}\\[2.5ex]
    =&\frac{5996.64+10080.36}{39+41}\\[2.5ex]
    =&\frac{16077}{80}=200.96
    \end{aligned}
    \nonumber
    \]

    And our standard error equals:

    \[
    \begin{aligned}
    s_{M_1-M_2}=&\sqrt{\frac{s_p^2}{n_1}+\frac{s_p^2}{n_2}}\\[2.5ex]
    =&\sqrt{\frac{200.96}{40}+\frac{200.96}{42}}\\[2.5ex]
    =&\sqrt{5.02+4.78}=\sqrt{9.89}=3.14
    \end{aligned}
    \nonumber
    \]

    All of these steps are just slightly different ways of using the same formulas, numbers, and ideas we have worked with up to this point. Once we get our standard error, it’s time to build our confidence interval.

    \[
    \begin{aligned}
    \text{95% CI} =& (M_1-M_2)\pm t^*(s_{M_1-M_2})\\
    =& 3.25 \pm 1.990(3.14)\\[2.5ex]
    \text{Lower bound} =& 3.25 - 1.990(3.14)\\
    =& 3.25-6.25\\
    =& -3.00\\[2.5ex]
    \text{Upper bound} =& 3.25 + 1.990(3.14)\\
    =& 3.25+6.25\\
    =& 9.50\\[2.5ex]
    \text{95% CI} =& (-3.00, 9.50)\\
    \end{aligned}
    \nonumber
    \]

    Our confidence interval, as always, represents a range of values that would be considered reasonable or plausible based on our observed data. In this instance, our interval (−3.00, 9.50) does contain zero. Thus, even though the means look a little bit different, it may very well be the case that the life satisfaction in both of these towns is the same. Proving otherwise would require more data.

    Test Your Knowledge

    Question \(\PageIndex{1}\)

    Question \(\PageIndex{2}\)

    Question \(\PageIndex{3}\)


    This page titled 10.3: Movies and Mood Example is shared under a not declared license and was authored, remixed, and/or curated by Chanler Hilley, Kennesaw State University via source content that was edited to the style and standards of the LibreTexts platform.