Skip to content

Instantly share code, notes, and snippets.

@heiwais25
Created September 15, 2017 06:21
Show Gist options
  • Save heiwais25/26f885e88f4485d744376650847528cf to your computer and use it in GitHub Desktop.
Save heiwais25/26f885e88f4485d744376650847528cf to your computer and use it in GitHub Desktop.
1. P(x=2) : dpois(2,2) = 0.271
2. P(X>2) : 1 - ppois(2,2) = 0.323
3. P(X<2) : ppois(2,2) = 0.677
4. P(0.5<X<2) : pgamma(2,2,1/2) - pgamma(0.5,2,1/2) = 0.238
5. P(X<z) = 0.8 : qnorm(.8, 0, 1) = 0.842
6. P(-1.96 < X < 1.96) : pnorm(1.96, 0, 1) - pnorm(-1.96, 0, 1) = 0.950
7. P(-z < X < z) = 0.98 : qnorm(0.99, 0, 1) = 2.32 # Due to its symmetry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment