Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

One-Way ANOVA

Image illustrating 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.


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


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


Image illustrating One-Way ANOVA


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


Example

Image illustrating One-Way ANOVA



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.



Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

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:


Image illustrating One-Way ANOVA 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


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=k−1df_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=(n1−1)s12 + (n2−1)s22 +... + (nk−1)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 = n−kdf_W\ =\ n-k where nn is the overall sample size and kk is the number of groups
  • dfWdf_W is customarily called dfdenominatordf_{denominator}



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(x−xˉoverall)2\displaystyle\boxed{SST\ =\ SSB+SSW\ =Σ_{allobservations}\left(x-x̄_{overall}\right)^2}

  • dfT=n−1df_T=n-1 where nn is the overall sample size.

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}}





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.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

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:

Image illustrating Example



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


Complete the One-way ANOVA table:

Image illustrating Example

Refer to this helpful table:


Image illustrating Example



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=k−1df_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=3−1=2df_B=3-1=2



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=(n1−1)s12 + (n2−1)s22 +... + (nk−1)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 = n−kdf_W\ =\ n-k where nn is the overall sample size and kk is the number of different samples or populations.


SSW=(3−1)2.0822 + (4−1)1.2582 + (4−1)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=11−3=8df_W=11-3=8


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


SST = SSB+SSW\displaystyle\boxed{SST\ =\ SSB+SSW}

  • dfT=n−1df_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=11−1=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



Image illustrating Example


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.
Illustration for practice question: Practice: One-way ANOVA Table


Refer to this helpful table:


Illustration for practice question: Practice: One-way ANOVA Table




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

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Extra Practice