12.10: Analysis of Variance (Exercises)
- Page ID
- 14533
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \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}\)- What are the three pieces of variance analyzed in ANOVA?
- Answer:
-
Variance between groups (\(SSB\)), variance within groups (\(SSW\)) and total variance (\(SST\)).
- What does rejecting the null hypothesis in ANOVA tell us? What does it not tell us?
- What is the purpose of post hoc tests?
- Answer:
-
Post hoc tests are run if we reject the null hypothesis in ANOVA; they tell us which specific group differences are significant.
- Based on the ANOVA table below, do you reject or fail to reject the null hypothesis? What is the effect size?
Source | \(SS\) | \(df\) | \(MS\) | \(F\) |
---|---|---|---|---|
Between | 60.72 | 3 | 20.24 | 3.88 |
Within | 213.61 | 41 | 5.21 | |
Total | 274.33 | 44 |
- Finish filling out the following ANOVA tables:
- \(K = 4\)
Source | \(SS\) | \(df\) | \(MS\) | \(F\) |
---|---|---|---|---|
Between | 87.40 | |||
Within | ||||
Total | 199.22 | 33 |
- \(N=14\)
Source | \(SS\) | \(df\) | \(MS\) | \(F\) |
---|---|---|---|---|
Between | 2 | 14.10 | ||
Within | ||||
Total | 64.65 |
Source | \(SS\) | \(df\) | \(MS\) | \(F\) |
---|---|---|---|---|
Between | 2 | 42.36 | ||
Within | 54 | 2.48 | ||
Total |
- Answer:
-
- \(K=4\)
Source \(SS\) \(df\) \(MS\) \(F\) Between 87.40 3 29.13 7.81 Within 111.82 30 3.73 Total 199.22 33 - \(N=14\)
Source \(SS\) \(df\) \(MS\) \(F\) Between 28.20 2 14.10 4.26 Within 36.45 11 3.31 Total 64.65 13 Source \(SS\) \(df\) \(MS\) \(F\) Between 210.10 2 105.05 42.36 Within 133.92 54 2.48 Total 344.02
- You know that stores tend to charge different prices for similar or identical products, and you want to test whether or not these differences are, on average, statistically significantly different. You go online and collect data from 3 different stores, gathering information on 15 products at each store. You find that the average prices at each store are: Store 1 xbar = $27.82, Store 2 xbar = $38.96, and Store 3 xbar = $24.53. Based on the overall variability in the products and the variability within each store, you find the following values for the Sums of Squares: SST = 683.22, SSW = 441.19. Complete the ANOVA table and use the 4 step hypothesis testing procedure to see if there are systematic price differences between the stores.
- You and your friend are debating which type of candy is the best. You find data on the average rating for hard candy (e.g. jolly ranchers, \(M\)= 3.60), chewable candy (e.g. starburst, \(M\) = 4.20), and chocolate (e.g. snickers, \(M\)= 4.40); each type of candy was rated by 30 people. Test for differences in average candy rating using SSB = 16.18 and SSW = 28.74.
- Answer:
-
Step 1: \(H_0: μ_1 = μ_2 = μ_3\) “There is no difference in average rating of candy quality”, \(H_A\): “At least one mean is different.”
Step 2: 3 groups and 90 total observations yields \(df_{num} = 2\) and \(df_{den} = 87\), \(α = 0.05\), \(F^* = 3.11\).
Step 3: based on the given \(SSB\) and \(SSW\) and the computed \(df\) from step 2, is:
Source \(SS\) \(df\) \(MS\) \(F\) Between 16.18 2 8.09 24.52 Within 28.74 87 0.33 Total 44.92 89 Step 4: \(F > F^*\), reject \(H_0\). Based on the data in our 3 groups, we can say that there is a statistically significant difference in the quality of different types of candy, \(F(2,87) = 24.52, p < .05\). Since the result is significant, we need an effect size: \(\eta^{2}=16.18 / 44.92=.36\), which is a large effect
- Administrators at a university want to know if students in different majors are more or less extroverted than others. They provide you with data they have for English majors (\(M\) = 3.78, \(n\) = 45), History majors (\(M\)= 2.23, \(n\) = 40), Psychology majors (\(M\)= 4.41, \(n\) = 51), and Math majors (\(M\) = 1.15, \(n\) = 28). You find the \(SSB = 75.80\) and \(SSW = 47.40\) and test at \(α= 0.05\).
- You are assigned to run a study comparing a new medication (\(M\)= 17.47, \(n\) = 19), an existing medication (\(M\)= 17.94, \(n\) = 18), and a placebo (\(M\)= 13.70, \(n\) = 20), with higher scores reflecting better outcomes. Use \(SSB = 210.10\) and \(SSW = 133.90\) to test for differences.
- Answer:
-
Step 1: \(H_0: μ_1 = μ_2 = μ_3\) “There is no difference in average outcome based on treatment”, \(H_A\): “At least one mean is different.”
Step 2: 3 groups and 57 total participants yields \(df_{num} = 2\) and \(df_{den} = 54\), \(α = 0.05, F^* = 3.18\).
Step 3: based on the given \(SSB\) and \(SSW\) and the computed \(df\) from step 2, is:
Source \(SS\) \(df\) \(MS\) \(F\) Between 210.10 2 105.02 42.36 Within 133.90 54 2.48 Total 344.00 56 Step 4: \(F > F^*\), reject \(H_0\). Based on the data in our 3 groups, we can say that there is a statistically significant difference in the effectiveness of the treatments, \(F(2,54) = 42.36, p < .05\). Since the result is significant, we need an effect size: \(\eta^{2}=210.10 / 344.00=.61\), which is a large effect.
- You are in charge of assessing different training methods for effectiveness. You have data on 4 methods: Method 1 (\(M\) = 87, \(n\) = 12), Method 2 (\(M\)= 92, \(n\) = 14), Method 3 (\(M\) = 88, \(n\) = 15), and Method 4 (\(M\)= 75, \(n\) = 11). Test for differences among these means, assuming \(SSB = 64.81\) and \(SST = 399.45\).
Contributors and Attributions
Foster et al. (University of Missouri-St. Louis, Rice University, & University of Houston, Downtown Campus)