Skip to content

Instantly share code, notes, and snippets.

@dandavison
Created November 19, 2012 20:11
Show Gist options
  • Save dandavison/4113569 to your computer and use it in GitHub Desktop.
Save dandavison/4113569 to your computer and use it in GitHub Desktop.
Pew survey on religion and education
# http://religions.pewforum.org/pdf/table-education-by-tradition.pdf
TOTAL = 35298.0
Pr_postgrad = .11
Pr_atheist = 509 / TOTAL
Pr_postgrad_given_atheist = .21
Pr_postgrad_and_atheist = Pr_atheist * Pr_postgrad_given_atheist
Pr_postgrad_and_theist = (1 - Pr_atheist) * Pr_postgrad
Pr_atheist_given_postgrad = Pr_postgrad_and_atheist / (Pr_postgrad_and_atheist + Pr_postgrad_and_theist)
>>> Pr_atheist
0.014420080457816307
>>> Pr_atheist_given_postgrad
0.027173028817799108
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment