The Cumulative Distribution Function of the Standard Normal

What does the 'entire' function look like?

# Let's plot probabilities from -4,4
curve(pnorm, -4, 4, ylab = "")

plot of chunk unnamed-chunk-1

Remember: is point on the curve shows the probability that a value drawn from the Standard Normal is smaller than the corresponding x value.

Interesting Values Along the Curve

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

A Random Standard Normal

hist(rnorm(10000), breaks = 50)

plot of chunk unnamed-chunk-3

plot(density(rnorm(10000)))
curve(dnorm, -4, 4, ylab = "", col = "blue", lty = "dashed", add = T, lwd = 3)

plot of chunk unnamed-chunk-3

x <- rnorm(10000)
qqnorm(x)
qqline(x)

plot of chunk unnamed-chunk-3

Note: Kernel density estimation is a procedure to obtain a continous estimate of the distribution from a sample of unknown distribution.

On Your Own: The Binomial Distribution

Figure out what the functions rbinom,dbinom,pbinom, qbinom do.

  1. Roll the dice: What is the probability to get 5 times a 6 at max?

  2. Draw a histogram of a random binomial distribution with 1000 observations and 10 trials and probability of success of .5?

  3. What is the mean of the distribution created in 2. ?

  4. Is your mean different from your colleagues' ? If so, why?