library(TeachingDemos) dbinom(32, 100, .22) par(mfrow=c(2,2)) plot(0:100, dbinom(0:100, 100, .22)) plot(0:100, pbinom(0:100, 100, .22)) pbinom(32, 100, .22) pbinom(31, 100, .22) 1-pbinom(31, 100, .22) 1-pbinom(6, 10, .5) 1-pbinom(3, 10, .5) 1-ppois(2, 1) 1-ppois(3, 1) 1-pnorm(10, 15, 2) pnorm(10, 15, 2) ?pnorm pnorm(10, mean=15, sd=2) pnorm(11, mean=15, sd=2) pnorm(10, mean=15, sd=2) pnorm(11, mean=15, sd=2) choose(10, 5) plot(0:10, choose(10, 0:10)) par(mfrow=c(1,1)) plot(0:10, choose(10, 0:10)) plot(0:10, choose(10, 0:10), type = "h") plot(0:5, choose(5, 0:5), type = "h") plot(0:50, choose(50, 0:50), type = "h") clt.examp() clt.examp(2) clt.examp(3) clt.examp(10) clt.examp(100) clt.examp(10) plot(0:10, dbinom(0:10, 10, .5)) plot(0:10, dbinom(0:10, 10, .1)) plot(0:20, dbinom(0:20, 20, .1)) plot(0:40, dbinom(0:40, 40, .1)) plot(0:50, dbinom(0:50, 50, .1)) plot(0:50, dpois(0:50, 5) ) plot(0:50, dpois(0:50, 5)) plot(0:50, dpois(0:50, 3)) plot(0:50, dpois(0:50, 5)) plot(0:50, dpois(0:50, 10)) plot(0:300, dnorm(0:300, 175, 8)) plot(140:210, dnorm(140:210, 175, 8)) pnorm(183, 175, 8) 1-pnorm(183, 175, 8) 1-pnorm(183, 163, 8) pnorm(183, 163, 8) 65/200 44/200 9/200 probs = dpois(0:4, 0.61) probs probs*200