Exercise

Female Proportion Borrowing

In the last exercise, you stratified by year and race (or ethnicity). However, there are lots of other ways you can partition the data. In this exercise and the next, you'll find the proportion of female borrowers in urban and rural areas by year. This exercise is slightly different from the last one because rather than simply finding counts of things you want to get the proportion of female borrowers conditioned on the year.

In this exercise, we have defined a function that finds the proportion of female borrowers for urban and rural areas: female_residence_prop().

Instructions

100 XP
  • Call female_residence_prop() to find the proportion of female borrowers for urban and rural areas for 2015:
    • The first argument is the data, mort.
    • The second argument is a logical vector corresponding to the row numbers of 2015.