Guest User

Untitled

a guest
Sep 27th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. f <- function(total, percent.asian, hired.asian, hired.non.asian) {
  2. asian <- round(percent.asian/100 * total)
  3. non.asian <- total-asian
  4. x <- matrix(c(asian-hired.asian, non.asian-hired.non.asian, hired.asian, hired.non.asian),
  5. nrow = 2,
  6. dimnames=list(Race=c("Asian", "non-Asian"),
  7. Status=c("Not hired", "Hired")))
  8. s <- fisher.test(x)
  9. s$p.value
  10. }
  11. 1/pnorm(round(qnorm(f(730, 77, 1, 6))))
  12. 1/pnorm(round(qnorm(f(1160, 85, 11, 14))))
  13. 1/pnorm(round(qnorm(f(130, 73, 4, 17))))
Add Comment
Please, Sign In to add comment