#copy and past provided code here in order to get data in appropriate format to use
Research Question
Is the proportion of male teachers teaching upper level classes higher than female teachers teaching upper level classes?
Response Variable
The response variable is called cls_level which is a categorical variable with two categories (Upper, Lower)
Explanatory Variable
The explanatory variable is called gender which is a categorical variable with two categories (Male, Female)
Parameters
\(p_w=\) The proportion of female teachers who teach upper level classes
\(p_m=\) The proportion of male teachers who teach upper level classes
Inferential Tool
Because we are hypothesizing that males teach more upper level classes than females, a hypothesis test will be used.
Hypotheses
\(H_0: p_m - p_w = 0\) vs. \(H_a: p_m - p_w > 0\)
Conditions
There is no pairing between the two groups (male vs. female) and we can assume that a random sample was taken, so independence is met.
\(\hat p= 306/463=.661, n_m=171, n_w=135\) For Sample Size conditions we need to multiply the samples by both the chance of failure and success and all of these must be above 10
\(\hat p * n_m = .661*171= 113.03\)
\((1-\hat p) * n_m = .339*171= 57.97\)
\(\hat p * n_w = .661 * 135 = 89.24\)
\((1-\hat p) * n_w = .339*135= 45.77\)
All values are above 10 so sample size conditons are met.
Observed Statistic
\(\hat p_m - \hat p_w= 171/268-135/195= .6381 - .6923= -0.0542\)
Test Statistic
prop.test(x=c(135, 171), n=c(195, 268), alternative = "greater", correct=FALSE)
##
## 2-sample test for equality of proportions without continuity
## correction
##
## data: c out of c135 out of 195171 out of 268
## X-squared = 1.4822, df = 1, p-value = 0.1117
## alternative hypothesis: greater
## 95 percent confidence interval:
## -0.01846335 1.00000000
## sample estimates:
## prop 1 prop 2
## 0.6923077 0.6380597
test statistic= Square Root of 1.4822= 1.217
P-value
p-value=.1117
The probability of getting \(\hat p_m - \hat p_w= -0.0542\) or larger, assuming \(\hat p_m - \hat p_w= 0\) is .1117
Conclusion
With a p-value of .1117 there is weak evidence that the proportion of male teachers teaching upper level classes is higher than female teachers teaching upper level classes at the University of Texas at Austin.
Scope of Inference
The data is gathered from end of semester student evaluations for 463 courses taught by a sample of 94 professors from the University of Texas at Austin. Therefore, this data can only be generalized to the University of Texas at Austin.