Wednesday, February 28, 2007

Problems for JV chapter 5

5.2 Roll a pair of dice. Let X be the largest value shown on the two dice. Use sample() to generate 5 values for X.
> sample(1:6,size=2,replace=T) repeat 5 times
[1] 2 2

X-values: 2,4,3,4,5

5.14
If Z is Normal(0,1) find the following:
1) P(Z=<2.2)> pnorm(2.2, mean=0,sd=1)
2) P(-1<2)> diff(pnorm(c(-1,2))) = 0.8185946
3) P(Z>2.5) = 0.006209665
> 1-pnorm(2.5, mean=0, sd=1)
4) b such that P(-b < Z < b)
>qnorm(c(.05, .5, .95)))
b = 1.644854

5.18
given mean=3.20, sd=0.35, what is P(3.5<4)?> pnorm(4, mean=3.20, sd=0.35) - pnorm(3.5, mean=3.20, sd=0.35)
[1] 0.1845475




Tuesday, February 6, 2007

CDC teaches statistics

This web page has a description of some statistical concepts and then quizzes you on them. I think this is at least a helpful way to practice what we've been learning, as well as a good example of putting statistical concepts into practice.
http://www.cdc.gov/descd/MiniModules/sd_sem/page01.htm