Session Ready
Exercise

Simpson's paradox (2)

Let's dive deeper into the data from the previous exercise and see whether this relationship between gender and admission ratio actually is significant. The data is again displayed below.

Instructions
100 XP
  • You can get the number of men and women that are admitted by multiplying the total number that applied by the percentage that has been accepted. For men this is \(3715 \approx 0.44 * 8442\) and for women this is \(1513 \approx 0.35 * 4321\).
  • Use the prop.test() function on the data and print the output to the console. Remember that you can get prop.test() a data matrix as input, like so: prop.test(matrix). Alternatively you can provide the x argument of the function a vector of successes (number of men and number of women admitted) and the n argument a vector of total counts (total applicants), like so: prop.test(x = c(10, 10), n = (20, 20)).