ANOVA Hypothesis Testing-Statistic Homework

profilemehett
lecture_anova.pptx

ANOVA

Instead of looking at the difference between population means, ANOVA (analysis of variance) calculates the variance between population means

ANOVA

Sample pop. 1

Sample pop. 2

Sample pop. 3

H0: μ1 = μ2 = μ3

ANOVA

Calculating ANOVA is different than calculating t-tests

How much sampling error do we expect under H0? (i.e., how much should our sample(s) vary just by chance?)

How do we calculate the equivalent of the standard error?

t-tests

Observed difference in sample means

Expected difference in pop. means

ANOVA

Observed variance in sample means

Expected variance in pop. means

ANOVA

Rock

Country

Classical

Mclassical

16.4

Mrock

6.0

Mcountry

10.8

Moverall 11.07

Under H0, all of these scores come from the same H0 distribution with M = 11.07. Based on the spread of each group, does that seem likely?

Under H0, all of these scores come from the same H0 distribution with M = 11.07. Based on the spread of each set, does that seem likely?

3

Y-Values 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 14 8 1 3 4 5 7 11 13 18 7 16 17 20 22

Score

ANOVA

Rock

Country

Classical

Mclassical

16.4

Mrock

6.0

Mcountry

10.8

Under H0, all of these scores come from the same H0 distribution with M = 11.07. Based on the spread of each group, does that seem likely?

Moverall 11.07

Under H0, all of these scores come from the same H0 distribution with M = 11.07. Based on the spread of each set, does that seem likely?

4

Y-Values 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 2 3 7 8 10 6 10 11 12 15 13 14 15 19 21

Score

ANOVA

Rock

Country

Classical

Mclassical

16.4

Mrock

6.0

Mcountry

10.8

Under H0, all of these scores come from the same H0 distribution with M = 11.07. Based on the spread of each group, does that seem likely?

Moverall 11.07

Under H0, all of these scores come from the same H0 distribution with M = 11.07. Based on the spread of each set, does that seem likely?

5

Y-Values 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 5 6 7 8 8.8000000000000007 9.8000000000000007 10.8 11.8 12.8 14.4 15.4 16.399999999999999 17.399999999999999 18.399999999999999

Score

ANOVA

The amount of variation within each group contributes to the expected variance in population means

Steps of hypothesis testing

Select the appropriate test

ANOVA used for 3+ means

State your research hypothesis and your null hypothesis

State them in English, then in math

Describe the NULL distribution

Variance between means expected by chance

Compute your test statistic

Compute actual variance between means

Then compute test statistic

Determine your critical value

Compare the test stat to the critical value(s) and make your decision

1. Select Test

We’re testing 3+ means, so…

ANOVA

2. State your hypotheses

H0: There are no differences in the means

H1: There are differences between the means

(You should add in the content appropriate to the question)

H1: At least one μi ≠ μj

H0: μ1 = μ2 = μ3

3. Describe the Null

For ANOVA: What is the variance between means expected by chance?

We compute this based on the within-group variance

Roughly, it’s like computing the variances within each group and averaging them together

(But not quite)

So let’s see how we actually compute it…

3. Describe the null

The variance within is called the Mean Square Within or MSWithin

Numerator is Sum of Squares Within or SSWithin

Denominator is Degrees of Freedom Within or dfWithin

Looks just like a variance!

Looks just like a sum of squares!

4A. Compute actual variance between means

What is the actual variance between your 3+ means?

This is the between group variance

Roughly, we compute this by treating the group means as raw scores…

And then literally calculate the variance of these “raw scores”

4A. Compute actual variance between means

The variance between is called the Mean Square Between or MSbetween

Numerator is Sum of Squares between or SSbetween

Denominator is Degrees of Freedom Between or dfbetween

Looks just like a variance!

Looks almost like a sum of squares!

Intermission: Check your work

You can calculate SStotal independently and make sure your answers match!

4B. Compute test statistic

For ANOVA, it is an F-test

Variance between

Variance within

Variance (mean of squared deviations)

dftotal = dfbetween + dfwithin

SStotal = SSbetween + SSwithin

Sources of estimates of population variability

How to report an F-test

The ANOVA source table

Source SS df MS F
Between SSbetween dfbetween MSbetween F
Within SSwithin dfwithin MSwithin
Total SStotal dftotal

5. Determine critical values

F-tests are always one-tailed

Variances can never be less than zero

To look it up, you’ll need

α, dfwithin, dfwithin, and Table D

6. Make decision

If F > critical value, reject null H0

If F < critical value, retain H0

The F-distribution

If H0 is true, all samples come from the same population

Little variance between samples compared to variance within samples

If H0 is not true, samples come from different populations

More variance between samples than variance within samples

Variance between

Variance within

F =

F ≤ 1

F > 1

The F-distribution

Unlike t- and z-distributions, the F-distribution is asymmetrical

Variances are always positive, so the ratio of variances is always positive

Therefore the F-distribution is…

positively skewed

Variance between

Variance within

F =

The F-distribution

Notice that the shape of the distribution makes all tests one-tailed

ANOVAs cannot be used to test directional hypotheses

The F-distribution

Like t-distributions, there is a family of F-distributions specified by:

dfbetween (# of groups – 1)

dfwithin (# of scores in each group – 1)

The more datapoints, the better the estimates of the population variance

Distributions with lots of data have taller peaks and shorter tails

The F-distribution

dfbetween = 4, dfwithin = 4

dfbetween = 10, dfwithin = 4

dfbetween = 10, dfwithin = 10

dfbetween = 4, dfwithin = 10

For your homework, report:

Steps of hypothesis testing

ALL the equations on the next slide

The full ANOVA source table

The critical value

A comparison of the F-stat to the critical value

A description of what you found

See final slide for example

Note: Mgroup changes depending on which group a raw score comes from. Ngroup changes depending on which group the Mgroup comes from

Steps of hypothesis testing

Select the appropriate test

ANOVA used for 3+ means

State your research hypothesis and your null hypothesis

State them in English, then in math

Describe the NULL distribution

Compute MS, SS, and df – all the within versions

Compute your test statistic

Compute MS, SS, and df between; check your work using SS and df total

Compute F statistic

Determine your critical value

Compare the test stat to the critical value(s) and make your decision

How to report an F-test

The ANOVA source table

Source SS df MS F
Between SSbetween dfbetween MSbetween F
Within SSwithin dfwithin MSwithin
Total SStotal dftotal

For every problem, report this table. Replace all SS, df, MS and F in the light pink/purple cells with the actual numbers.

Describing your result

“This hypothesis test shows that we should reject the null hypothesis and instead conclude that SUNY campuses differ in intelligence. This conclusion is statistically significant with p < .05.”

“This hypothesis test shows that we should retain the null hypothesis and conclude that SUNY campuses do not differ in intelligence. The test was not statistically significant with p > .05.”

Replace underlined segment with content from the particular problem