Rubric

Answer the questions in this document, compile to html, print to pdf, and submit to UNM Learn. Do not add this to your “ALL” .Rmd document.


Admissions rates

library(tidyverse)
## -- Attaching packages ------------------------------------------------------------------------------------------------- tidyverse 1.3.0 --
## v ggplot2 3.3.2     v purrr   0.3.4
## v tibble  3.0.3     v dplyr   1.0.0
## v tidyr   1.1.0     v stringr 1.4.0
## v readr   1.3.1     v forcats 0.5.0
## -- Conflicts ---------------------------------------------------------------------------------------------------- tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
# read the data
dat_adm <-
  read_csv(
    "ADA1_CL_14_SimpSchoolMajors.csv"
  ) %>%
  mutate(
    Gender     = factor(Gender    )
  , Acceptance = factor(Acceptance)
  , School     = factor(School    )
  )
## Parsed with column specification:
## cols(
##   Gender = col_character(),
##   Acceptance = col_character(),
##   School = col_character()
## )
str(dat_adm)
## tibble [560 x 3] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
##  $ Gender    : Factor w/ 2 levels "Female","Male": 1 2 1 1 2 1 2 1 1 1 ...
##  $ Acceptance: Factor w/ 2 levels "Failure","Success": 1 2 1 1 1 2 1 1 2 1 ...
##  $ School    : Factor w/ 2 levels "Art","Business": 2 1 2 2 2 2 2 2 1 2 ...
##  - attr(*, "spec")=
##   .. cols(
##   ..   Gender = col_character(),
##   ..   Acceptance = col_character(),
##   ..   School = col_character()
##   .. )

Admission rates by gender

## # A tibble: 4 x 4
##   Gender Acceptance Frequency Proportion
##   <fct>  <fct>          <int>      <dbl>
## 1 Female Failure          112       0.56
## 2 Female Success           88       0.44
## 3 Male   Failure          162       0.45
## 4 Male   Success          198       0.55

  1. (2 p) Interpret the table and associated plot.

For example: “The proportion of Females is XX, which is XX higher/lower than Males.”

Admission rates by gender, for each School

## # A tibble: 8 x 5
##   School   Gender Acceptance Frequency Proportion
##   <fct>    <fct>  <fct>          <int>      <dbl>
## 1 Art      Female Failure           16       0.2 
## 2 Art      Female Success           64       0.8 
## 3 Art      Male   Failure           60       0.25
## 4 Art      Male   Success          180       0.75
## 5 Business Female Failure           96       0.8 
## 6 Business Female Success           24       0.2 
## 7 Business Male   Failure          102       0.85
## 8 Business Male   Success           18       0.15

  1. (1 p) Interpret the table and assocated plot.

For example:

  • “For School XX, the proportion of Females is XX, which is XX higher/lower than Males.”
  • “For School YY, the proportion of Females is XX, which is XX higher/lower than Males.”
  1. (1 p) Compare the Acceptance by Gender (where schools were combined) to when Schools were treated separately. What do you observe?

  2. (1 p) Does this surprise you? Why?

  3. (1 p) What is the name of the “paradox” given to this data phenomenon?


Death penalty

Agresti (1990) studied the effects of racial characteristics on whether individuals convicted of homicide received the death penalty. The 326 subjects were defendants in homicide indictments in 20 Florida counties during 1976-1977.

Is there an association between death penalty, defendant’s race and victim’s race? What kind of association? We can display this table in a summarized format.

# read the data
dat_penalty <-
  read.table(text = "
Defendant Victim Death Frequency
White     White  Yes          19
White     White  No          132
White     Black  Yes           0
White     Black  No            9
Black     White  Yes          11
Black     White  No           52
Black     Black  Yes           6
Black     Black  No           97
"
  , header = TRUE
  ) %>%
  as_tibble() %>%
  mutate(
    Defendant  = factor(Defendant )
  , Victim     = factor(Victim    )
  , Death      = factor(Death     )
  )

str(dat_penalty)
## tibble [8 x 4] (S3: tbl_df/tbl/data.frame)
##  $ Defendant: Factor w/ 2 levels "Black","White": 2 2 2 2 1 1 1 1
##  $ Victim   : Factor w/ 2 levels "Black","White": 2 2 1 1 2 2 1 1
##  $ Death    : Factor w/ 2 levels "No","Yes": 2 1 2 1 2 1 2 1
##  $ Frequency: int [1:8] 19 132 0 9 11 52 6 97

Death penalty by Defendant race

## # A tibble: 4 x 4
##   Defendant Death Frequency Proportion
##   <fct>     <fct>     <int>      <dbl>
## 1 Black     No          149      0.898
## 2 Black     Yes          17      0.102
## 3 White     No          141      0.881
## 4 White     Yes          19      0.119

  1. (2 p) Interpret the table and assocated plot.

Death penalty by Defendant race, by Victim’s race

## # A tibble: 8 x 5
##   Victim Defendant Death Frequency Proportion
##   <fct>  <fct>     <fct>     <int>      <dbl>
## 1 Black  Black     No           97      0.942
## 2 Black  Black     Yes           6      0.058
## 3 Black  White     No            9      1    
## 4 Black  White     Yes           0      0    
## 5 White  Black     No           52      0.825
## 6 White  Black     Yes          11      0.175
## 7 White  White     No          132      0.874
## 8 White  White     Yes          19      0.126

  1. (1 p) Interpret the tables and assocated plot.

  2. (1 p) Compare the Death by Defendant (where victim’s race were combined) to when victim’s race were treated separately. What do you observe?