In: Statistics and Probability
The data set “UCBAdmissions” in R contains admission decisions by gender at six departments of UC Berkeley. For this data set, carry out appropriate test for independence between the admission decision and gender for each of the departments.
What are your conclusions? Please submit your R script with the answer.
Install the package "vcd". You will find a function called assocstats().
install.package("vcd")
library(vcd)
> assocstats(UCBAdmissions)
$`Dept:A`
X^2 df P(> X^2)
Likelihood Ratio 19.054 1 1.2707e-05
Pearson 17.248 1 3.2804e-05
Phi-Coefficient : 0.136
Contingency Coeff.: 0.135
Cramer's V : 0.136
$`Dept:B`
X^2 df P(> X^2)
Likelihood Ratio 0.25864 1 0.61105
Pearson 0.25372 1 0.61447
Phi-Coefficient : 0.021
Contingency Coeff.: 0.021
Cramer's V : 0.021
$`Dept:C`
X^2 df P(> X^2)
Likelihood Ratio 0.75098 1 0.38616
Pearson 0.75354 1 0.38536
Phi-Coefficient : 0.029
Contingency Coeff.: 0.029
Cramer's V : 0.029
$`Dept:D`
X^2 df P(> X^2)
Likelihood Ratio 0.29787 1 0.58522
Pearson 0.29798 1 0.58515
Phi-Coefficient : 0.019
Contingency Coeff.: 0.019
Cramer's V : 0.019
$`Dept:E`
X^2 df P(> X^2)
Likelihood Ratio 0.99039 1 0.31965
Pearson 1.00107 1 0.31705
Phi-Coefficient : 0.041
Contingency Coeff.: 0.041
Cramer's V : 0.041
$`Dept:F`
X^2 df P(> X^2)
Likelihood Ratio 0.38362 1 0.53567
Pearson 0.38409 1 0.53542
Phi-Coefficient : 0.023
Contingency Coeff.: 0.023
Cramer's V : 0.0
Look at the p-values.Only department A has some dependence between admission decision and gender. For the rest, the conclusion is inconclusive as we cannot reject the null hypothesis of independence.