Session Ready
Exercise

Proportion of males admitted for each department

Finally we'll make a table similar to the one we constructed earlier, except we'll first group the data by department. The goal is to compare the proportions of male admitted students across departments.

Proportions for each row of the data frame we create can be calculated as n / sum(n). Note that since the data are grouped by department and gender, sum(n) will be calculated for males and females separately for each department.

Instructions 1/2
undefined XP
  • 1
  • 2

ucb_admit has been pre-loaded for you.

Assign ucb_admission_counts as the count() of ucb_admit by department, gender, and admission status.