ANOVA
ANOVA
BY Jyotsna Ma’am
B.COM, M.COM
INTER CA
Rank 1 in UGC-NET Commerce
Research Scholar
ANOVA–Parametric Test
Lecture
www.everstudy.co.in
Introduction to ANOVA
▪ ANOVA stands for Analysis of Variance.
▪ ANOVA is a statistical technique (parametric test) that was developed by R.A. Fisher in 1920. It is commonly referred as
Fisher’s ANOVA or Fisher’s analysis of variance.
▪ It is an extension of z test and t test.
- Gender
www.everstudy.co.in
Introduction to ANOVA
▪ analysis of variance (ANOVA) is best applied where more than 2 populations or samples are meant to be compared.
▪ It is used to test the significance of the difference of the mean values among more than two sample groups.
www.everstudy.co.in
Why not to apply t test in case of multiple groups?
▪ There is need to apply many times t test to compare the groups. If the number of groups is k, then we have to apply k(k-1)/2
times t test to test the difference.
▪ Every time you conduct t-test there is a chance that you will make Type 1 error.
Applying t test one time – 5% error
Applying t test two times – 10% error approx.
Applying t test three times – 15% error approx.
▪ An ANOVA control these errors so that the Type 1 error remains against at 5% and you can be more confident that any
statistically significant result you find is not just running lots of tests.
www.everstudy.co.in
What is ANOVA ?
▪ ANOVA is a statistical technique that allows us to examine the significance of the difference amongst more than two samples
means simultaneously (at the same time).
▪ In other words, it determines whether all the groups are taken from common population or not.
▪ It uses F-test to statistically test the significance of the differences of the mean values among more than two sample groups.
▪ Anova is a ratio between “ Mean Sum of Squares between(MSSB ) and “Mean Sum of Squares within (MSSW ).
www.everstudy.co.in
Assumptions of ANOVA
To use the ANOVA test we made the following assumptions:
▪ Each group sample is drawn from a normally distributed population
▪ All sub populations have a same variance. (Homoscedastic)
▪ Within each sample, the observations are sampled randomly and independently of each other
▪ Additivity of Variance: Total variance should be equal to sum of between variance and within variance.
www.everstudy.co.in
Degree of Freedom
▪ For numerator: Sum Of square between/among the Groups= df1= k-1
There is no significant difference between the There are at least two group means that are
means of all groups (All groups are same) significantly different from each other.
Decision Rule: If calculated F value > Critical Value-Ho is Rejected otherwise it is accepted.
If the null hypothesis is true, the between treatment variation (numerator) will not exceed the
residual or error variation (denominator) and the F statistic will small. If the null hypothesis is false,
then the F statistic will be large.
www.everstudy.co.in
One-way ANOVA
▪ One way Analysis of Variance (ANOVA) is a hypothesis test in which one independent categorical variable or single factor is
considered.
▪ The independent variable should have at least three levels (i.e. at least three different groups or categories).
▪ It is a technique which enables us to make a comparison of means of three or more samples with the help of F-distribution.
▪ ANOVA tells you if the dependent variable changes according to the level of the independent variable.
▪ The One-Way ANOVA is also sometimes called the One-Way ANOVA F-Test , ANOVA, or Analysis of Variance.
www.everstudy.co.in
One way ANOVA - Assumptions
•Use a one-way ANOVA when you have collected data about one categorical independent variable and one quantitative
dependent variable.
•Three or more than three categorical independent groups in an independent variable.
•Measurement of the dependent variable is at interval or ratio level (i.e. continuous)
•Normal distribution of the population from which the samples are drawn.
•Independence of samples
•Homogeneity of the variance of the population.
•There should be no significant outliers.
www.everstudy.co.in
Summary Table for One-way ANOVA
Source of Variation df SS (Sum of Squares) Mean Sqaures F F tabulated
calaculated at 5% or
Between Variance k-1
value 1%
If calculated F
Within Variance (Error or N-k value > Critical
Residual) Value-Ho is
Rejected
otherwise it is
Total N-1 accepted
Sum of squares between-groups examines the differences among the group means by calculating the variation of each mean
around the grand mean , n is the number of observations in each group (i.e., each cell or level of factor A).
Sum of squares within-groups examines error variation or variation of individual scores around each group mean. This is
variation in the scores that is not due to the treatment (or independent variable)..
The total sum of squares can be computed by adding the SSB and the SSW, but they can also be computed the same way we
would for computing the numerator in the formula for sample variance—by simply subtracting each score from the grand
mean, squaring, and then summing across all cases.
www.everstudy.co.in
Try a Practical !
Three popular weight loss programs are considered. The first is a low calorie diet. The second is a low fat diet and the third is a
low carbohydrate diet. For comparison purposes, a fourth group is considered as a control group.. The control group is included
here to assess the placebo effect (i.e., weight loss due to simply participating in the study). A total of twenty patients agree to
participate in the study and are randomly assigned to one of the four diet groups. Weights are measured at baseline, After 8
weeks, each patient's weight is again measured Positive differences indicate weight losses and negative differences indicate
weight gains. For interpretation purposes, we refer to the differences in weights as weight losses and the observed weight losses
are shown below.
Total
15
20
12
14
10
33 15 17 6 71
www.everstudy.co.in
Try a Practical !
•Step 1. Set up hypotheses
Null hypothesis : H0: μ1 = μ2 = μ3 = μ4
Alternate Hypothesis: H1: Means are not all equal H0: μ1 ≠μ2 ≠μ3≠ μ4
Step 2: State significance level α=0.05
Step3 . Select the appropriate test statistic.
The test statistic is the F statistic for ANOVA, F=MSB/MSE.
•Step 4. Calculate Degree of Freedom
•df1=k-1 and df2=N-k. In this example, df1=k-1=4-1=3 and df2=N-k=20-4=16
•Step 5: Determine the appropriate critical value
The critical value is 3.24 and the decision rule is as follows: Reject H0 if F > 3.24.
•Step 6. Compute the test statistic.
www.everstudy.co.in
Try a Practical !
▪ To organize our computations, we complete the ANOVA table. In order to compute the sums of squares we must first compute
the sample means for each group and the overall mean based on the total sample.
SSE requires computing the squared differences between each observation and its group mean.
Try a Practical !
•Step 7. Conclusion:
We reject H0 because 8.43 > 3.24., null hypothesis rejected. We have statistically significant evidence at α=0.05 to show that
there is a difference in mean weight loss among the four diets.
www.everstudy.co.in
F Table
Concept Check Question
Ques. Which of the following is an assumption of one-way ANOVA comparing samples from three or more experimental
treatments?
A The samples associated with each population are randomly selected and are independent from all other samples
B The response variable within each of the k populations have equal variances
C All the response variables within the k populations follow a normal distributions
D All of the above
www.everstudy.co.in
One - Way ANOVA - Practical
An experiment is conducted to study the effectiveness of three methods lecture method, lecture-cum demonstration method
and project method. In each group seven students assigned randomly. The obtained scores are given in the following table. Is
there significant difference among three methods of teaching.
www.everstudy.co.in
One - Way ANOVA – Practical
www.everstudy.co.in
One - Way ANOVA - Practical
www.everstudy.co.in
Decision: Table value = 3.55 Calculated value= 86.56 Here ,CV>TV, So Reject the Null Hypothesis
Two-way ANOVA
▪ The two-way ANOVA compares the mean differences between groups that have been split on two independent variables
(called factors).
▪ It is a statistical technique used by the researcher to compare several levels (condition) of the two independent variables
involving multiple observations at each level.
▪ The primary purpose of a two-way ANOVA is to understand if there is an interaction between the two independent variables
on the dependent variable.
www.everstudy.co.in
Tabular Presentation
One Way ANOVA
Teaching Methods
Main Effect
www.everstudy.co.in
Null and Alternate Hypothesis
A two-way ANOVA with interaction tests three null hypotheses at the same time:
Interaction
Teaching Methods
Effect
Academic Performance
IQ Score
www.everstudy.co.in
Assumptions of Two way ANOVA
▪ Dependent variable should be measured at the continuous level (i.e., they are interval or ratio variables).
▪ Two independent variables should each consist of two or more categorical, independent groups
▪ There should have independence of observations, which means that there is no relationship between the observations in
each group or between the groups themselves.
▪ There should be no significant outliers
▪ Your dependent variable should be approximately normally distributed for each combination of the groups of the two
independent variables
▪ There needs to be homogeneity of variances for each combination of the groups of the two independent variables.
www.everstudy.co.in
Summary Table for Two Way ANOVA
Source of Variation df SS (Sum of Mean Sum of F Ratio
Squares) Squares
IVA c-1
IVB r-1
Total N-1
www.everstudy.co.in
Try a Practical !
An experiment is conducted to study the effectiveness of two methods: lecture method and project method at three levels of IQ
score (low, average and high). After experiment test was administered on 6 groups each has 5 students. The obtained scores are
organized in tabular form as shown below.:
Teaching Methods
Lecture Method Project Method Total
IQ Score Level
www.everstudy.co.in
Sum of Squares Between Columns
(For all groups)
www.everstudy.co.in
Try a Practical !
Lecture G1 2 Project G2 2 Total
Method Method
www.everstudy.co.in
Summary Table for Two Way ANOVA
Source of df SS (Sum of Squares) Mean Sum of Squares F Ratio
Variation
IVA c-1 = 2-1 = 874.80 = 874.80 = 14.76
=1
F(1,24) = 14.76 significant at 5% level of significance , F value greater than critical value , hence, reject the null
hypothesis
F(2,24) = 22.74 significant at 5% level of significance, F value greater than critical value , hence, reject the null
hypothesis
F(2,24) = 0.55 not significant at 5% level of significance. F value is less than critical value, hence do not reject
the null hypothesis
www.everstudy.co.in
Post Hoc Analysis in ANOVA
▪ If we reject the null hypothesis, all know is that there is a difference somewhere among (between) the groups but we don’t
know where the differences is ??
▪ Additional tests called Post Hoc tests can be done to determine where differences lie.
▪ It may be between first and second or second and third or may be between all of them
MANOVA
▪ Multivariate analysis of variance (MANOVA) is an extension of the univariate analysis of variance (ANOVA).
▪ Multivariate analysis of variance (MANOVA) is simply an ANOVA with several dependent variables
www.everstudy.co.in
Concept Check Question
Ques. When conducting an ANOVA, F data will always fall within what range?
1. between 0 and infinity
2. between 0 and 1
3. between negative infinity and infinity
4. between 1 and infinity
Ques. In one-way ANOVA, which of the following is used within the F-ratio as a measurement of the variance of individual
observations?
1. SSE
2. MSE
3. MSTR
4. none of the above
www.everstudy.co.in
www.everstudy.co.in