#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.

Visualization(s)

evals %>%
  ggplot(aes( x = gender, fill = cls_level)) +
  geom_bar(position = "fill") +
  xlab("Gender of Professor") + 
  ylab("Proportion") +
  ggtitle("Class Level Taught based on Gender") + 
  scale_fill_discrete(name="Class Level")

Summary Statistics

evals<-table(evals$cls_level,evals$gender,
              dnn=c("Level of Class","Gender"),useNA="no")
addmargins(evals)
##               Gender
## Level of Class female male Sum
##          lower     60   97 157
##          upper    135  171 306
##          Sum      195  268 463
round(prop.table(evals, margin=2),4)
##               Gender
## Level of Class female   male
##          lower 0.3077 0.3619
##          upper 0.6923 0.6381

Interpretation

Based on the summary statistics and stacked bar chart, it appears that gender is associated with the level of class taught.The proportion of female professors that taught upper level classes is 69.23% while the proportion of male professors that taught upper level classes is 63.81%.