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




2 comments:

Mike said...

this is a good idea for a blog entry. one thing that might make it even more valuable would be a bit of running commentary, or explanation. such as for 5.14 #4. that one took a bit of reasoning, and i was impressed with the way you figured it out.

Mike said...

nudge, nudge...