Lesson 2 ANOVA Analysis of Variance One Way

  • Slides: 16
Download presentation
Lesson 2

Lesson 2

ANOVA • Analysis of Variance

ANOVA • Analysis of Variance

One Way ANOVA • One variable is measured for many different treatments (population)_ •

One Way ANOVA • One variable is measured for many different treatments (population)_ • Null Hypothesis: all population means are equal • Alternative Hypothesis: not all population means are equal (i. e. at least one is different) • If variance is small (the sample means are close) and the null hypothesis is true • If variance is large (the sample means are far apart), the alternative hypothesis is true

Example 1: • Does the weight class of a car make a difference in

Example 1: • Does the weight class of a car make a difference in the number of head injuries sustained by crash test dummies? • A random sample of 5 compact, midsize, and full -size cars was obtained and the head injury count for these vehicles was recorded below Calculate the mean and variance for each sample. Calculate the overall mean.

CAR Compact Chevy Cavalier Dodge Neon Mazda 626 Pontiac Sunfire Subaru Legacy HEAD INJURY

CAR Compact Chevy Cavalier Dodge Neon Mazda 626 Pontiac Sunfire Subaru Legacy HEAD INJURY COUNT 643 655 442 514 525

 • • • Midsize Chevy Camaro Dodge Intrepid Ford Mustang Honda Accord Volvo

• • • Midsize Chevy Camaro Dodge Intrepid Ford Mustang Honda Accord Volvo S 70 469 727 525 454 259

 • • • Full-Size Audi A 8 Cadillac Deville Ford Crown Vic Olds

• • • Full-Size Audi A 8 Cadillac Deville Ford Crown Vic Olds Aurora Pontiac Bonneville 384 656 602 687 360

 • Mean 1 – head injuries for compact cars • Mean 2 –

• Mean 1 – head injuries for compact cars • Mean 2 – head injuries for midsize cars • Mean 3 – head injuries for full size cars • Null hypothesis: means are all equal • Alternative hypothesis: at least one mean is different

MSTR • Mean square due to treatment • Estimate of the variance BETWEEN the

MSTR • Mean square due to treatment • Estimate of the variance BETWEEN the treatments (populations) – A good estimate of the variance ONLY when the null hypothesis is TRUE – If the null hypothesis is FALSE, MSTR overestimates the variance

MSTR Formula • Find the difference between each sample mean and the overall mean;

MSTR Formula • Find the difference between each sample mean and the overall mean; square this number • Multiply result of 1 st step by n • Sum these numbers • Divide by the degrees of freedom • Steps 1 through 3 are SSTR (sum of the squares due to treatment) and the numerator • Step 4 is k-1 and is the denominator

 • Compact: • Midsize • Fullsize

• Compact: • Midsize • Fullsize

MSE • Mean Square Due to Error • Within treatment estimate of the variance

MSE • Mean Square Due to Error • Within treatment estimate of the variance – Average of the individual population variances – Unaffected by whether the null hypothesis is true or not – Provides an UNBIASED estimate of the population variance

 • MSE = Average of the sample variances

• MSE = Average of the sample variances

F-test • F is the test statistic for the equality of k population means

F-test • F is the test statistic for the equality of k population means • F = MSTR / MSE has k-1 df in numerator and n-k df in denominator = 6405 / 20096. 023 = 0. 319 n. b. If null hypothesis is T, the value of MSTR / MSE should appear to have been selected from this F distribution If null hypothesis is F, MSTR / MSE will be inflated because MSTR overestimates variance

 • Calculate p-value: P(F > F observed) and write conclusion • Summarize in

• Calculate p-value: P(F > F observed) and write conclusion • Summarize in an ANOVA table

 • • • SOURCE DF SS MS F Factor Error Total SST =

• • • SOURCE DF SS MS F Factor Error Total SST = SSTR + SSE P