ANOVA Oct 2023Is technique for assessing relationship between categorical independent variables (with more than two levels) & continuous outcome variable Name ANOVA comes from fact that though typically means of outcome variable are compared across group
8dgraphics
4 views
13 slides
Oct 20, 2025
Slide 1 of 13
1
2
3
4
5
6
7
8
9
10
11
12
13
About This Presentation
pptx anova
Size: 115.81 KB
Language: en
Added: Oct 20, 2025
Slides: 13 pages
Slide Content
1 Analysis of variance
2 Introduction to ANOVA Is technique for assessing relationship between categorical independent variables (with more than two levels) & continuous outcome variable Name ANOVA comes from fact that though typically means of outcome variable are compared across groups, comparisons are made using estimates of variance through F-test Null hypothesis is that means in groups are equal
3 Assumptions of ANOVA Random samples selected from @ population Observations are independent (if not have to use repeated measures ANOVA) Population variance is same in @ group Dependent variable is normally distributed within @ group Not all these assumptions are equally important e.g F-test is robust with regards to violations of normality
4 One way ANOVA Involves one independent variable with more than 2 levels & a continuous outcome variable. Between groups ANOVA – have different subjects in groups (independent groups design) Repeated measures ANOVA – have same subjects under different conditions (dependent groups design) Example: Family health worker receives complaints of weight gain from clients on contraceptives. He has also noticed & is aware that wt gain varies from individual to individual. He wants to find out if it is due to genetic variation or contraceptives. He compares four different contraceptives
5 One way ANOVA (2) Ho: there is no difference in weight gain among populations using different contraceptives µ1=µ2=µ3=µ4 Ha: the average weight gain in the population of at least one group is different µ i ≠µj Let Yij represent the weight gained by the jth client using the ith contraceptive Total variation or Total SS (TSS) = SS within groups (SSW) + SS between groups (SSB)
6 One way ANOVA (3) m is the number of groups N is total sample size; ni is number in @ group is the overall mean weight gain is the group mean for group i For unequal group sizes
7 ANOVA table Source SS df MS F-ratio P-value Between grps 78 m-1 4-1 =3 SSB/m-1 78/3=26 MSB/MSW = 26/5.035=5.164 <0.01 Within grps 100.7 N-m or m(n-1) 4(6-1) 24-4=20 SSW/m(n-1) 100.7/20 = 5.035 Total 178.7 N-1 24-1=23
Example on weight gain 8
9 One way ANOVA (4) If the F-test is significant, you can go ahead & do t-test to determine which of the groups are significantly different Practically in SPSS Analyze – compare means – one way ANOVA Click on dependent and put in dependent list Click independent and put in box labeled factor Click options – descriptives – homogeneity of variances and means plots Click on Post hoc & click Tukey – continue - OK
10 One way ANOVA (5) The test of homogeneity gives levene’s test for equality of variances Tests null that the variances are equal Tests for equality of mean deviations from mean If it is significant then assumption of equal variances is violated Look at table for post hoc comparisons only if F-test is significant Need to adjust alpha since several comparisons made when comparing several groups. May result into significant finding due to chance
11 One Way ANOVA continued STATA Assumptions checked by: Histograms by group Equal variances test - uses Bartlett’s test (sensitive to distribution of data) Can construct levene’s test Egen mi=mean(y), by(group) Then generate d=abs(y-mi) Then ANOVA d groups
12 One Way ANOVA continued Statistics linear models and related ANOVA analysis of variance and covariance Gives only bonferroni , sidak and scheffe’s test Note if ANOVA assumptions of equal variance not fulfilled use kruskal test SPSS: Analyze Non-parametric tests legacy dialogs k-independent samples STATA: Statistics summaries, tables, tests, nonparametric tests of hypothesis kruskal wallis
13 One Way ANOVA continued If overall test of Kruskal Wallis is significant, go ahead and do Wilcoxon rank sum tests comparing two groups at a time Adjust the level of significance to cater for multiple comparisons could use Bonferroni method Adjusted alpha = level of significance / no. of comparisons