0% found this document useful (0 votes)
288 views12 pages

ANOVA

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
288 views12 pages

ANOVA

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

ANOVA Definition

ANOVA test can be defined as a type of test used in hypothesis testing to


compare whether the means of two or more groups are equal or not. This
test is used to check if the null hypothesis can be rejected or not depending
upon the statistical significance exhibited by the parameters. The decision is
made by comparing the ANOVA test statistic with the critical value.

Example
Suppose it needs to be determined if consumption of a certain type of tea
will result in a mean weight loss. Let there be three groups using three types
of tea - green tea, earl grey tea, and jasmine tea. Thus, to compare if there
was any mean weight loss exhibited by a certain group, the ANOVA test (one
way) will be used.

Suppose a survey was conducted to check if there is an interaction between


income and gender with anxiety level at job interviews. To conduct such a
test a two-way ANOVA will be used.

ANOVA Formula:
One Way ANOVA

The one way ANOVA test is used to determine whether there is any
difference between the means of three or more groups. A one way ANOVA
will have only one independent variable. The hypothesis for a one way
ANOVA test can be set up as follows:

Null Hypothesis, H0: μ1 = μ2 = μ3 = ... = μk


Alternative Hypothesis, 𝐻1: The means are not equal

Decision Rule: If test statistic > critical value then reject the null
hypothesis and conclude that the means of at least two groups are
statistically significant.
The steps to perform the one way ANOVA test are given below:

Step 1: Calculate the mean for each group.


Step 2: Calculate the total mean. This is done by adding all the means and
dividing it by the total number of means.
Step 3: Calculate the SSB.
Step 4: Calculate the between groups degrees of freedom.
Step 5: Calculate the SSE.
Step 6: Calculate the degrees of freedom of errors.
Step 7: Determine the MSB and the MSE.
Step 8: Find the f test statistic.
Step 9: Using the f table for the specified level of significance, 𝛼, find the
critical value. This is given by F(𝛼, df1. df2).
Step 10: If f > F then reject the null hypothesis.

Limitations of One Way ANOVA Test

The one way ANOVA is an omnibus test statistic. This implies that the test
will determine whether the means of the various groups are statistically
significant or not. However, it cannot distinguish the specific groups that
have a statistically significant mean. Thus, to find the specific group with a
different mean, a post hoc test needs to be conducted.

Two Way ANOVA

The two way ANOVA has two independent variables. Thus, it can be thought
of as an extension of a one way ANOVA where only one variable affects the
dependent variable. A two way ANOVA test is used to check the main effect
of each independent variable and to see if there is an interaction effect
between them. To examine the main effect, each factor is considered
separately as done in a one way ANOVA. Furthermore, to check the
interaction effect, all factors are considered at the same time. There are
certain assumptions made for a two way ANOVA test. These are given as
follows:
 The samples drawn from the population must be independent.
 The population should be approximately normally distributed.
 The groups should have the same sample size.
 The population variances are equal

Suppose in the two way ANOVA example, as mentioned above, the income
groups are low, middle, high. The gender groups are female, male, and
transgender. Then there will be 9 treatment groups and the three
hypotheses can be set up as follows:

H01: All income groups have equal mean anxiety.


H11: All income groups do not have equal mean anxiety.
H02: All gender groups have equal mean anxiety.
H12: All gender groups do not have equal mean anxiety.
H03: Interaction effect does not exist
H13: Interaction effect exists.

Example 1: Three types of fertilizers are used on three groups of plants for 5
weeks. We want to check if there is a difference in the mean growth of each
group. Using the data given below apply a one way ANOVA test at 0.05
significant level.

Fertilizer 1 Fertilizer 2 Fertilizer 3

6 8 13
Fertilizer 1 Fertilizer 2 Fertilizer 3

8 12 9

4 9 11

5 11 8

3 6 7

4 8 12

Solution:
H0: μ1 = μ2 = μ3
H1: The means are not equal

Fertilizer 1 Fertilizer 2 Fertilizer 3

6 8 13

8 12 9

4 9 11

5 11 8

3 6 7

4 8 12

¯¯¯¯¯X1 = 5 ¯¯¯¯¯X1 = 9 ¯¯¯¯¯X1 = 10

Total mean, ¯¯¯¯¯X= 8

n1 = n2 = n3 = 6, k = 3
SSB = 6(5 - 8)2 + 6(9 - 8)2 + 6(10 - 8)2

= 84

df1 = k - 1 = 2

Fertilizer 1 (X - 5)2 Fertilizer 2 (X - 9)2 Fertilizer 3 (X - 10)2

6 1 8 1 13 9

8 9 12 9 9 1

4 1 9 0 11 1

5 0 11 4 8 4

3 4 6 9 7 9

4 1 8 1 12 4

Total = Total = ¯¯¯¯¯X1 =


¯¯¯¯¯X1 = 5 ¯¯¯¯¯X1 = 9 Total = 28
16 24 10

SSE = 16 + 24 + 28 = 68

N = 18

df2 = N - k = 18 - 3 = 15

MSB = SSB / df1 = 84 / 2 = 42

MSE = SSE / df2 = 68 / 15 = 4.53

ANOVA test statistic, f = MSB / MSE = 42 / 4.53 = 9.33

Using the f table at α = 0.05 the critical value is given as


F(0.05, 2, 15) = 3.68

As f > F, thus, the null hypothesis is rejected and it can be concluded


that there is a difference in the mean growth of the plants.

Answer: Reject the null hypothesis

Example 2: A trial was run to check the effects of different diets. Positive
numbers indicate weight loss and negative numbers indicate weight gain.
Check if there is an average difference in the weight of people following
different diets using an ANOVA Table.

Low Fat Low Calorie Low Protein Low Carbohydrate

8 2 3 2

9 4 5 2

6 3 4 -1

7 5 2 0

3 1 3 3

Solution:

H0: μ1 = μ2 = μ3 = μ4

H1: The means are not equal

n1 = n2 = n3 = n4 = 5, k = 4
SSB
= n1(¯¯¯¯¯X1−¯¯¯¯¯X)2+ n2(¯¯¯¯¯X2−¯¯¯¯¯X)2 +& n3(¯¯¯¯¯X3−¯¯¯¯¯X)2+n4(¯¯¯
¯¯X4−¯¯¯¯¯X)2

Low Low Low


Low (X - (X - (X - (X -
Calori Protei Carbohydrat
Fat 6.6)2 3)2 3.4)2 1.2)2
e n e

8 2 2 1 3 0.2 2 0.6

9 5.8 4 1 5 2.6 2 0.6

6 0.4 3 0 4 0.4 -1 4.8

7 0.2 5 4 2 2 0 1.4

3 13 1 4 3 0.2 3 3.2

Tota Tota Tota Tota


¯¯¯¯¯X1 ¯¯¯¯¯X2 ¯¯¯¯¯X3
l = l = l = ¯¯¯¯¯X4 = 1.2 l =
= 6.6 =3 = 3.4
21.4 10 5.4 10.6

Total mean, ¯¯¯¯¯X = 3.6

= 75.8

SSE = 21.4 + 10 + 5.4 + 10.6 = 47.4

The ANOVA Table can be constructed as follows:


Source of Degrees of Mean
Sum of Squares F Value
Variation Freedom Squares

MSB =
SSB = df1 = k - 1 f = MSB
Between SSB / (k -
Σnj(¯¯¯¯¯Xj−3.6)2 =4-1 / MSE
Groups 1)
= 75.8 =3 = 8.43
= 25.3

MSE =
SSE = df2 = N - k
SSE / (N -
Error Σ(X−¯¯¯¯¯Xj)2 = 20 - 4
k)
= 47.4 = 16
=3

SST = SSB +
df3 = N - 1
Total SSE
= 19
= 123.2

As no significance level is specified, α = 0.05 is chosen.

F(0.05, 3, 16) = 3.24

As 8.43 > 3.24, thus, the null hypothesis is rejected and it can be concluded
that there is a mean weight loss in the diets.

Answer: Reject the null hypothesis

Example 3: Determine if there is a difference in the mean daily calcium


intake for people with normal bone density, osteopenia, and osteoporosis at
a 0.05 alpha level. The data was recorded as follows:
Normal Density Osteopenia Osteoporosis

1200 1000 890

1000 1100 650

980 700 1100

900 800 900

750 500 400

800 700 350

Solution:

Using the ANOVA test the hypothesis is set up as follows:


H0: μ1 = μ2 = μ3
H1: The means are not equal

Nor
(X -
mal Osteope (X - Osteopor (X -
938.3)
Dens 2
nia 800)2 osis 715)2
ity

68,486 40,00 30,62


1200 1000 890
.9 0 5

3,806. 90,00
1000 1100 650 4,225
9 0

1,738. 10,00 148,2


980 700 1100
9 0 25
Nor
(X -
mal Osteope (X - Osteopor (X -
938.3)
Dens 2
nia 800)2 osis 715)2
ity

1,466. 34,22
900 800 0 900
9 5

35,456 90,00 99,22


750 500 400
.9 0 5

19,126 10,00 133,2


800 700 350
.9 0 25

Total Total
¯¯¯¯¯ Total =
¯¯¯¯¯X2 = ¯¯¯¯¯X3 = =
X1 = 130,08
= 800 240,0 715 449,7
938.3 3.3
00 50

Total mean, ¯¯¯¯¯X = 817.8

n1 = n2= n3 = 6, k = 3

SSB = n1(¯¯¯¯¯X1−¯¯¯¯¯X)2+ n2(¯¯¯¯¯X2−¯¯¯¯¯X)2 + n3(¯¯¯¯¯X3−¯¯¯¯¯X)2

= 152,477.7

SSE = 130,083.3 + 240,000 + 449,750 = 819,833.3

The ANOVA Table can be constructed as follows:


Degrees
Source of Mean F
Sum of Squares of
Variation Squares Value
Freedom

MSB = f=
SSB =
df1 = k - 1 SSB / (k MSB /
Between Σnj(¯¯¯¯¯Xj−817.8)
=3-1 - 1) MSE
Groups 2
=2 = =
= 152,477.7
76,238.6 1.395

MSE =
SSE = df2 = N - k SSE / (N
Error Σ(X−¯¯¯¯¯Xj)2 = 18 - 3 - k)
= 819,833.3 = 15 =
54,655.5

SST = SSB + SSE df3 = N - 1


Total
= 972,311 = 17

Using the F table the critical value is F(0.05, 2, 15) = 3.68

As 1.395 < 3.68, the null hypothesis cannot be rejected and it is concluded
that there is not enough evidence to prove that the mean daily calcium
intake of the three groups is different.

Answer: Do not reject the null hypothesis

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy