0:00 / 0:00

One-Way ANOVA



By now, you are pros with one-sample hypothesis testing and two-sample hypothesis testing!

Surely, we can compare three or more means! One-way analysis of variance (ANOVA) allows us to determine if there is statistical significance in the difference in means among several groups or samples.

PAGE BREAK

Assumptions for One-way ANOVA

  1. Each sample is drawn from its respective populations that are assumed to be normal.
  2. The samples are randomly selected.
  3. The samples are independent from one another.
  4. The population variances (and standard deviations) are equal.
  5. The factor is a categorical variable, but the data they contain (response) must be quantitative.

Example #1:
  • Factor: Method of learning (classroom, online, self-study)
  • Response: Exam grade
Example #2:
  • Factor: Type of fertilizer (synthetic, organic, blend)
  • Response: Crop yield

PAGE BREAK

Comparing Several Group Means

Let k=k= number of groups being compared (a.k.a. different samples or different populations).

Ho: μ1=μ2=μ3=...=μkH_o:\ \mu_1=\mu_2=\mu_3=...=\mu_k (all population means are equal)

Example
k=3k=3 groups


Ha: H_a:\ at least one μi\mu_i is different than the others

PAGE BREAK
Example


You can also say...

Ha: H_{a:\ } at least two means are not equal such that μiμj\mu_i\ne\mu_j

In the example above, μ2\mu_2 is statistically significantly different than the other means (μ1 \mu_{1\ } and μ3\mu_3). Alternatively, you can say that μ1μ2\mu_1\ne\mu_2 and μ2μ3\mu_2\ne\mu_3.


Portions of information contained in this publication/book are printed with permission of Minitab, LLC. All such material remains the exclusive property and copyright of Minitab, LLC. All rights reserved.


0:00 / 0:00

One-Way ANOVA Table

We can use the one-way ANOVA table to compare multiple population means and determine whether they are all the equal or if they differ.

ANOVA tests result in the following output table:


  • k=k= number of groups (or different samples or populations)
  • n=n= overall sample size (i.e. the sum of all the observations in all the groups)

Example:
  • Group 1 has n1=10n_1=10 observations
  • Group 2 has n2=20n_2=20 observations
  • Group 3 has n3=20n_3=20 observations
  • Thus, the overall sample size n=n1+n2+n3=10+20+20=50n=n_1+n_2+n_3=10+20+20=50

PAGE BREAK

SSB (also called SSC or SSR)

  • The sum of squares between groups is the variation in results that exists between groups.
  • Logically, we would expect any variation between the groups to be due to the different treatment they received because of the assumption that all else being equal, these different samples all come from populations with the same variance.
SSB=n1  (xˉ1  xˉoverall)2 +n2  (xˉ2  xˉoverall)2 +... +nk  (xˉk  xˉoverall)2\displaystyle\boxed{SSB=n_1\ \cdot\ \left(x̄_1\ -\ x̄_{overall}\right)^2\ +n_2\ \cdot\ \left(x̄_2\ -\ x̄_{overall}\right)^2\ +...\ +n_k\ \cdot\ \left(x̄_k\ -\ x̄_{overall}\right)^2}
  • dfB=k1df_B=k-1 where kk is the number of different samples or populations.
  • dfBdf_B is customarily called dfnumeratordf_{numerator}

SSW (also called SSE)

  • The sum of squares within groups is the variation in results that exists within the groups themselves.
  • This variation is the result of randomness since within groups individuals all received the same treatment and were selected from the same population.
SSW=(n11)s12 + (n21)s22 +... + (nk1)sk2\displaystyle\boxed{SSW=\left(n_1-1\right)s_1^2\ +\ \left(n_2-1\right)s_2^2\ +...\ +\ \left(n_k-1\right)s_k^2}
  • dfW = nkdf_W\ =\ n-k where nn is the overall sample size and kk is the number of groups
  • dfWdf_W is customarily called dfdenominatordf_{denominator}

PAGE BREAK

SST

  • The total sum of squares combining the SSB and SSW.
  • It encompasses all existing variation in the one-way ANOVA test.
SST = SSB+SSW =Σallobservations(xxˉoverall)2\displaystyle\boxed{SST\ =\ SSB+SSW\ =Σ_{allobservations}\left(x-x̄_{overall}\right)^2}
  • dfT=n1df_T=n-1 where nn is the overall sample size.
PAGE BREAK

MSB (also called MSC or MSR)

  • This is the mean of squares between groups.
MSB=SSBdfB\displaystyle\boxed{MSB=\frac{SSB}{df_B}}


MSW (also called MSE)
  • This is the mean of squares within groups.
MSW=SSWdfW\displaystyle\boxed{MSW=\frac{SSW}{df_W}}


Wize Tip
Note that MSW is equal to the overall variance of the sample, and MSW\sqrt{MSW} is equal to the overall standard deviation of the sample.


PAGE BREAK

F stat

  • One-Way ANOVA F statistic is the ratio between the MSB and MSW:
F=MSBMSW\displaystyle\boxed{F=\frac{MSB}{MSW}}
  • The F-test compares the variation between the groups (MSB) to the variation within the group (MSW):
F=variation  among  the  group  meansvariation among observations within the same sample\displaystyle\boxed{F=\frac{variation\ \ among\ \ the \ \ group \ \ means}{variation \ among\ observations\ within \ the \ same \ sample }}
  • If the treatments have no impact on the observations, we would expect the variation between and within groups to be the same (resulting in FF being approximately equal to 1).
  • If there is a difference in between and within group variation, it must be as a result of the different treatments which would result in a higher F-score, leading us to conclude that the population means differ.
0:00 / 0:00

Example: One-way ANOVA Table

Suppose you have a sample of 11 athletes that were randomly split into 3 groups, where members of each group follow different nutrition programs (categorical factors). At the end of the program we can measure how much weight in pounds each athlete has gained (quantitative response).
  • This is a one-way ANOVA type of question because we are comparing the average weight gain across the three samples (after the athletes were assigned into 3 groups).
  • The variance of the populations can be reasonably expected to be the same since all athletes originate from the same original sample.

Results:



Overall n=11, xˉ=3.55 and s=1.695Overall\ n=11,\ x̄=3.55\ and\ s=1.695

PAGE BREAK

Complete the One-way ANOVA table:

Refer to this helpful table:



Solve for the SSB (also called SSC or SSR), the sum of squares between groups:
  • SSB measures the variation in results that exists between groups.
  • Any variation between the groups to be due to the different treatment they received.
SSB=n1  (xˉ1  xˉoverall)2 +n2  (xˉ2  xˉoverall)2 +... +nk  (xˉk  xˉoverall)2\displaystyle\boxed{SSB=n_1\ \cdot\ \left(x̄_1\ -\ x̄_{overall}\right)^2\ +n_2\ \cdot\ \left(x̄_2\ -\ x̄_{overall}\right)^2\ +...\ +n_k\ \cdot\ \left(x̄_k\ -\ x̄_{overall}\right)^2}
  • dfB=k1df_B=k-1 where kk is the number of different samples or populations.

SSB=3  (3.33  3.55)2 +4  (4.75  3.55)2 +4  (2.5  3.55)2=10.32SSB=3\ \cdot\ \left(3.33\ -\ 3.55\right)^2\ +4\ \cdot\ \left(4.75\ -\ 3.55\right)^2\ +4\ \cdot\ \left(2.5\ -\ 3.55\right)^2=10.32
dfB=31=2df_B=3-1=2

PAGE BREAK

Solve for the SSW (also called SSE), the sum of squares within groups:
  • SSW measures the variation in results that exists within the groups themselves.
  • This variation is the result of randomness since within groups individuals all received the same treatment and were selected from the same population.
SSW=(n11)s12 + (n21)s22 +... + (nk1)sk2\displaystyle\boxed{SSW=\left(n_1-1\right)s_1^2\ +\ \left(n_2-1\right)s_2^2\ +...\ +\ \left(n_k-1\right)s_k^2}
  • dfW = nkdf_W\ =\ n-k where nn is the overall sample size and kk is the number of different samples or populations.

SSW=(31)2.0822 + (41)1.2582 + (41)1.2912=18.42SSW=\left(3-1\right)2.082^2\ +\ \left(4-1\right)1.258_{ }^2\ +\ \left(4-1\right)1.291_{ }^2=18.42
dfW=113=8df_W=11-3=8

PAGE BREAK
Solve for the SST, the total sum of squares combining the SSB and SSW:

SST = SSB+SSW\displaystyle\boxed{SST\ =\ SSB+SSW}
  • dfT=n1df_T=n-1 where nn is the overall sample size.
SST = SSB+SSW =10.32+18.42=28.74SST\ =\ SSB+SSW\ =10.32+18.42=28.74
dfT=111=10df_T=11-1=10

Solve for the MSB (also called MSC or MSR), the mean of squares between groups:


MSB=SSBdfB\displaystyle\boxed{MSB=\frac{SSB}{df_B}}

MSB=SSBdfB=10.322=5.16MSB=\frac{SSB}{df_B}=\frac{10.32}{2}=5.16


Solve for the MSW (also called MSE), the mean of squares within groups:

MSW=SSWdfW\displaystyle\boxed{MSW=\frac{SSW}{df_W}}

MSW=SSWdfW=18.428=2.3025MSW=\frac{SSW}{df_W}=\frac{18.42}{8}=2.3025


Solve for the F-stat:
F=MSBMSW\displaystyle\boxed{F=\frac{MSB}{MSW}}

F=5.162.3025=2.24F=\frac{5.16}{2.3025}=2.24



Practice: One-way ANOVA Table

Rick has 10 Pikamons: 3 grass-types, 4 fire-types, and 3 water-types. Complete the ANOVA table below.
  • Provide all answers with at least 2 decimal places (df may be whole number).
  • Click on 'HINT' for all the formulas.

Refer to this helpful table:




Source of VariationSSdfMSF
Between Groups (Factor)
Within Groups (Error)
Total
Extra Practice