1 Estimating and Testing 2 0 (n-1)s 2 / 2 has a 2 distribution with n-1 degrees of freedom Like other parameters, can create CIs and hypothesis tests since we know the distribution
2 Estimating and Testing 1 2 / 1 2 / 2 2 has an F distribution with n 1 -1 and n 2 -1 d.f. Like other parameters, can create CIs and hypothesis tests since we know the distribution
3 One-Way ANOVA Example As a training specialist, you want to determine whether three different training methods are equally effective so you want to compare the mean time to complete a task after individuals are trained with the three different methods. (Random variable: completion time) One-Way ANOVA hypothesis test H 0 : 1 = 2 = 3 =... = k H A : The means are not all equal (at least one pair differs from each other) Three Requirements k independent random samples Random variables are normally distributed Equal population variances for the random variables
4 One-Way ANOVA Data Set Sample One Sample Two...Sample k Data Values... Meanx1x1 x2x2 xkxk Variances12s12 s22s22...sk2sk2 Sample Sizen1n1 n2n2 nknk x 1,1 x 1,2 x 1,3 … x 2,1 x 2,2 x 2,3 … x k,1 x k,2 x k,3 … ___
5 One-Way ANOVA One-Way ANOVA hypothesis test H 0 : 1 = 2 = 3 =... = k H A : The means are not all equal (at least one pair differs from each other) Test Statistic F = BSV / WSV with k-1, n T -k d.f. Decision Rule Reject H 0 if F > F Intuition If BSV is “large” then H 0 is unlikely to be true Note: Always one-tailed and >
6 F Distribution 0 ? P(F > ) = 0.05 P(F < ) = and 10 d.f
7 Select F Distribution 5% Critical Values Numerator Degrees of Freedom … … Denominator Degrees of Freedom
8 One-Way ANOVA: Example H 0 : 1 = 2 = 3 H A : The means are not all equal Test Statistic F = BSV / WSV with k- 1,n T -k d.f. Decision Rule Reject H 0 if F > F Intuition If BSV is “large” then H 0 is unlikely to be true Sample One Sample Two Sample Three x s2s2 n _ n T =, x = =
9 One-Way ANOVA: Another Example H 0 : 1 = 2 = 3 H A : The means are not all equal Test Statistic F = BSV / WSV with k- 1,n T -k d.f. Decision Rule Reject H 0 if F > F Intuition If BSV is “large” then H 0 is unlikely to be true Sample One Sample Two Sample Three x s2s2 n _ n T =, x = =
10 Data Analysis: ANOVA-Single Factor GroupsCountSumAverageVariance Column Column Column ANOVA Source of Variation SSdfMSFP- value F crit Between Groups Within Groups Total25613
11 Two-Way ANOVA Example Suppose 10 individuals are asked to judge the taste quality of three beers: Budweiser, Bass Ale, and London Pride. Based on some complicated rating system, each individual assigns a numerical score to each beer (all 10 individuals taste each of the three beers). Note that we now have two factors: raters and beers Questions Is the average taste rating equal for each beer? Is the average taste rating equal for each rater? Can do an ANOVA hypothesis test for each question: H 0 : 1 = 2 = 3 =... = k H A : The means are not all equal (at least one pair differs from each other)
12 Two-Way ANOVA: Example Suppose 10 individuals are asked to judge the taste quality of three beers: Budweiser, Bass Ale, and London Pride. Based on some complicated rating system, each individual assigns a numerical score to each beer (all 10 individuals taste each of the three beers). Once the data are collected, you estimate the following ANOVA table: Sourcedf Sum of Squares Mean Square F Beer Rater Error
13 Another Example Treatments ABC Blocks These data values were obtained from a randomized block design experiment. First, Pretend that these data were collected using a completely randomized design. Can we conclude at the 5% significance level that there are differences in the treatment means? How does your answer change if you account for the randomized block design?
14 Pretend One-Way GroupsCountSumAverageVariance Treatment A Treatment B Treatment C ANOVA Source of Variation SSdfMSFP- value F crit Between Groups Within Groups Total
15 But is Actually Two-Way ANOVA: Two-Factor Without Replication Source of Variation SSdfMSFP- value F crit Rows Columns Error Total
16 One-Way ANOVA via Regression Sample One Sample Two Sample Three S1S2S3Treatment …… “Stack” data using dummy variables
17 One-Way ANOVA via Regression ANOVA (from ANOVA output) Source of Variation SSdfMSFP- value F crit Between Within Total25613 ANOVA (from Regression output) dfSSMS FSignificance Regression Residual Total13256
18 The Regression ANOVA Table Regression Statistics Multiple R0.988 R Squared0.977 Adj. R Squared0.972 Standard Error0.739 Obs.14 ANOVA dfSSMSFSignificance Regression Residual Total13256 Coeff.Std. Errort statp valueLower 95%Upper 95% Intercept S S F test for: Ho: 1 = 2 = … = k = 0 (excluding the intercept) H A : at least one i 0
19 Regression and Two-Way ANOVA Treatments ABC Blocks “Stack” data using dummy variables ABCB2B3B4B5Value ……
20 Regression and Two-Way ANOVA Source | SS df MS Number of obs = F( 6, 8) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = treatment | Coef. Std. Err. t P>|t| [95% Conf. Int] b | c | b2 | b3 | b4 | b5 | _cons | Need Partial F test (later in course)