# Probability Questions within R [closed]

I'm learning about Probability with Binomial, Poisson and Normal Distributions. I came across some study examples on-line that ask you to do it within R. I was given 10 exercises which were: I did all 10 within R with this code but I have no idea if the results are correct as I don't know how to check them. My code is:

round(pbinom(5, size = 10, prob = 0.65, lower = F), 4)
round(1 - dbinom(30, size = 100, prob = .2), 4)
round(dbinom(15:30, size = 50, prob = .32), 4)
round(dpois(6, lambda = 6) - dpois(8, lambda = 6), 4)
round(ppois(35, lambda = 41, lower = F), 4)
round(sum(dpois(2:5, lambda = 1)), 4)
round(pnorm(12, mean = 7, sd = 2.5, lower = F), 4)
round(pnorm(9.8, mean = 10, sd = 1, lower = F), 4)
round(1 - pnorm(38, mean = 50, sd = 5, lower = F), 4)
round(pnorm(4, mean = 5, sd = 3.6, lower = F), 4)


and the results I got within R are as follows: If anyone can indicate if my code is actually correct and I'm studying it correctly, it would really help me.

• Personally I use the default lower=TRUE and subtract from 1 if necessary, as this corresponds to the CDF. Your answer to (iii) could either use sum as in (vi) or use the difference of two pbinom. Your answer to (x) should be similar I suspect is currently wrong. I have not checked the others – Henry Nov 26 '15 at 18:59
• @Henry: There is a reason the R goods introduced lower=FALSE, in some cases it can preserve higher numerical precision. – kjetil b halvorsen May 2 '17 at 21:21

i)round(pbinom(6,10,p=.65,lower.tail=FALSE),4)