QUANT homework

profilemilesss
One-wayANOVAinExcel.xlsx

Intro

Desire is to evalute the difference in effect between two or more groups
The groups are classified as levels of a factor
when there is only 1 factor, this is called a 1 way ANOVA
samples are random and independent of each other so that group means can be compared
ANOVA compares means of groups by analyzing the variation among and within groups
total variation is subdivided into variation due to differences between or within groups
Assumptions
c groups are independently and randomly selected
sample values in each group are from a normal distribution
groups have equal variances (don't need to worry if sample sizes in each group are the same)
Null hypothesis is no difference between means
under the Null hypothesis means of the c groups are assumed to be equal
calculations sum the squared differences between group means and the grand mean
calculations also sum the squared differences between individual group data and their group means
null
alternate
Little Between group variance
lots of between group variance

Test Statistic

The ANOVA test statistic follows an F distribution
F statistic is a ratio of between group and within group variance indicies
alpha - is the level of significance - used to determine the critical F value
the null hypotheis is rejected if the value of the test statistic is greater than the critical F value

Critical F value

1-way ANOVA Summary Table

Standard deviations for each group can be obtained by taking the square root of the variances
F>Fcrit then REJECT the null hypothesis
p-value< .05 then REJECT the null hypothesis
At least one of the group means is significantly different from one other (you don't know which however)
c-1 degrees of freedom for between group
n-c degrees of freedom for within group
F = MS for between/ MS for within
Fcritical= 3.6823203437
MS = SS/df
Write Up
Results of the ANOVA test shows that  a statsitically significant difference in group means (specify the groups) has been detected
(F(2,15) = 7.15, p = .007)
Note: Practically different and statistically significantly different are not necessarily the same

Formulas for values in the ANOVA table

MSE

Example1

Is there a meaningful difference in group means?
You need
alpha 0.05
GroupA GroupB Group C Anova: Single Factor
7 11 14
8 14 12 SUMMARY
10 14 10 Groups Count Sum Average Variance
12 12 16 GroupA 5 44 8.8 4.7
7 10 13 GroupB 5 61 12.2 3.2
Group C 5 65 13 5
ANOVA
Source of Variation SS df MS F P-value F crit
Between Groups 49.7333333333 2 24.8666666667 5.7829457364 0.017433486 3.8852938347
Within Groups 51.6 12 4.3
Total 101.3333333333 14

multiple comparison test

There are many different types of multiple comparison tests (also called post hoc tests)
Example: Tukey HSD Multiple comparison test
simultaneous comparison of means between all pairs of groups (there are other tests that compare more than 2 means simultaeously)
assumes equal sample sizes
Steps
1 compute the absolute mean differences among all pairs of group means
there will be c(c-1)/2 pairs of means
use the average column values in Excel SUmmary table to obtian the group means
2 compute the HSD value 
The studentized range (Q)  is calculated for a particular alpha value for c and (n-c) --- use the table
n is the group sample size
MSE is found from the ANOVA summary table (MS within groups column)
3 compare each of the pairs of mean differences against the HSD value
if the absolute difference in the sample means is greater than the HSD value, then the means are significantly different

Example2

Tukey HSD Multiple Comparisons
What should the minimal difference in  group means be to indicate significance?
You need
Level of Significance (alpha) 0.05
c (number of groups - k in this picture) 3
n (sample size) 15
n-c 12
MSE (from ANOVA table) 4.3
Studentized Range (from table) 3.67 Groups Count Sum Average Variance
HSD (use formula) 1.9649642914 GroupA 5 44 8.8 4.7
GroupB 5 61 12.2 3.2
Comparisons Absolute DIfference HSD Results: Is HSD smaller? Group C 5 65 13 5
GroupA to GroupB 3.4 1.9649642914 Yes significant
GroupA to GroupC 4.2 1.9649642914 Yes significant
GroupB to GroupC 0.8 1.9649642914 No ANOVA
Source of Variation SS df MS F P-value F crit
Between Groups 49.7333333333 2 24.8666666667 5.7829457364 0.017433486 3.8852938347
Within Groups 51.6 12 4.3
Total 101.3333333333 14