Escolar Documentos
Profissional Documentos
Cultura Documentos
! ! ! ! ! ! ! ! ! ! ! ! !
Concluded that there is very strong evidence of a difference in the mean percentage of women on Spocks judges venires and that of the other judges.
1 / 11
! ! ! ! ! ! ! ! ! ! ! ! !
2 / 11
! ! ! ! ! ! ! ! ! ! ! ! !
If we are interested in using a factor/categorical variable with levels, then we model with 1 indicator/dummy variables. Choose one level as the default (has no indicator variable) and all the other levels do. Q: Why do we use 1 indicator variables instead of ?
2 / 11
! ! ! ! ! ! ! ! ! ! ! ! !
If we are interested in using a factor/categorical variable with levels, then we model with 1 indicator/dummy variables. Choose one level as the default (has no indicator variable) and all the other levels do. A:
1, 2 ,3 ...,or l -1, by default it Q: Why do we use 1 indicator variables instead of ? belong In level l.
2 / 11
! ! ! ! ! ! ! ! ! ! ! ! !
Then, in Spock example: Ispock,i = 1, 0, if ith venire has Spocks judge otherwise
Fit the model: Yi = 0 + 1 Ispock,i + ei for i = 1, 2, . . . , 46 where Yi = % women on ith venire Simple Linear Regression Model
3 / 11
! ! ! ! ! ! ! ! ! ! ! ! !
) y
n i =1 xi yi nx y n 2 2 i = 1 xi n x
4 / 11
! ! ! ! ! ! ! ! ! ! ! ! !
) y
n i =1 xi yi nx y n 2 2 i = 1 xi n x
! ! ! ! ! ! ! ! ! ! ! ! !
Parameter Interpretation
For the model Yi = 0 + 1 Ispock,i + ei : E (Yi ) = 0 + 1 , 0 , if ith venire has Spocks judge if ith venire has another judge
So, 0 is the mean % of women in other judges venires 1 is the difference in the mean % of women (response) between Spocks and other judges venires 1 = 0: no difference between mean % women in Spocks and other judges 1 > 0 : mean % women is higher for Spocks than other judges 1 < 0: % women is lower for Spocks than other judges
Caution: If the factor has more levels, interpretation is slightly different: expectations are relative to the default factor level. Write out the model using indicators and take expectations to correctly interpret the parameters.
5 / 11
! ! ! ! ! ! ! ! ! ! ! ! !
6 / 11
! ! ! ! ! ! ! ! ! ! ! ! !
6 / 11
! ! ! ! ! ! ! ! ! ! ! ! !
6 / 11
! ! ! ! ! ! ! ! ! ! ! ! !
Assuming the following hold: Correct form of the model Gauss-Markov Conditions:
1. E (ei ) = 0 2. Var (ei ) = 2 (constant) 3. E (ei ej ) = 0 for i = j (uncorrelated errors)
ei are Normal Testing if the means differ is equivalent to testing if the 1 parameter is signicant in the regression.
7 / 11
! ! ! ! ! ! ! ! ! ! ! ! !
Connection to ANOVA
When 10 = 0 (like in Spock example), using the linear model is the same as One-Way Analysis of Variance (ANOVA): 1 factor - testing if the means of the groups are different. In general, it can be extended to multiple factors and factors with more than two levels: testing if all the factor level means are equal or if any of them differ. We will discuss ANOVA next class and use it to answer the questions of interest in Spock Conspiracy case study:
8 / 11
! ! ! ! ! ! ! ! ! ! ! ! !
Connection to ANOVA
When 10 = 0 (like in Spock example), using the linear model is the same as One-Way Analysis of Variance (ANOVA): 1 factor - testing if the means of the groups are different. In general, it can be extended to multiple factors and factors with more than two levels: testing if all the factor level means are equal or if any of them differ. We will discuss ANOVA next class and use it to answer the questions of interest in Spock Conspiracy case study:
Question of Interest 1: Is there evidence of difference in mean percent of women on Spocks judges venires when compared to other judges? One-Way ANOVA with 2 factor levels (Spock and other) Question of Interest 2: Is there evidence that there are differences in womens representation in venires of the other 6 judges? One-Way ANOVA with 6 factor levels (A,B,C,D,E,F)
8 / 11
! ! ! ! ! ! ! ! ! ! ! ! !
9 / 11
! ! ! ! ! ! ! ! ! ! ! ! !
> spock_linearreg = lm(percentwomen I_spock) > summary(spock_linearreg) Call: lm(formula = percentwomen I_spock) Residuals: Min 1Q -12.9919 -4.6669
Median 0.2581
3Q 3.7854
Max 19.4081
Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 29.492 1.160 25.42 < 2e-16 *** I_spock -14.870 2.623 -5.67 1.03e-06 *** --Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 Residual standard error: 7.056 on 44 degrees of freedom Multiple R-squared: 0.4222, Adjusted R-squared: 0.409 F-statistic: 32.15 on 1 and 44 DF, p-value: 1.03e-06
10 / 11
! ! ! ! !
11 / 11