This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "name", | |
"version": "0.1.0", | |
"private": true, | |
"dependencies": { | |
"@types/jest": "24.0.19", | |
"@types/node": "12.11.6", | |
"@types/react": "16.9.9", | |
"@types/react-dom": "16.9.2", | |
"immer": "^4.0.2", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pnorm(0, 0, 1) = 0.5 # Cumulative distribution function of 0 | |
qnorm(.25, 0, 1) = -0.675 # .25 quantile | |
hists(rnorm(10000, 0, 1)) # histogram of values from rnorm(10000 pseudo random sample) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dnorm(0, 0, 1) = 0.3989423 # PDF value at 0 | |
x = seq(from = -5, to = 5, by = .1) # make x points to draw distribution | |
plot(x, dnorm(x, 0, 1), type="l") # connect points by line in the plot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dnorm(0, 0, 1) = 0.3989423 # PDF value at 0 | |
x = seq(from = -5, to = 5, by = .1) # make x points to draw distribution | |
plot(x, dnorm(x, 0, 1), type="l") # connect points by line in the plot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |