What does the 'entire' function look like?
# Let's plot probabilities from -4,4
curve(pnorm, -4, 4, ylab = "")
Remember: is point on the curve shows the probability that a value drawn from the Standard Normal is smaller than the corresponding x value.
Have you encountered these numbers before?
x <- round(qnorm(c(0.9, 0.95, 0.975)), digits = 4)
pnorm(x)
## [1] 0.900 0.950 0.975
hist(rnorm(10000), breaks = 50)
plot(density(rnorm(10000)))
curve(dnorm, -4, 4, ylab = "", col = "blue", lty = "dashed", add = T, lwd = 3)
x <- rnorm(10000)
qqnorm(x)
qqline(x)
Note: Kernel density estimation is a procedure to obtain a continous estimate of the distribution from a sample of unknown distribution.
Figure out what the functions rbinom,dbinom,pbinom, qbinom do.
Roll the dice: What is the probability to get 5 times a 6 at max?
Draw a histogram of a random binomial distribution with 1000 observations and 10 trials and probability of success of .5?
What is the mean of the distribution created in 2. ?
Is your mean different from your colleagues' ? If so, why?