You can sum vectors in R using the command sum(). For example, to sum the probabilities from
Question:
You can sum vectors in R using the command sum(). For example, to sum the probabilities from Y ∼ Binomial(10, 0.5)
from Y = 2 to Y = 7, the command is sum( dbinom(2:7, 10, 0.5) )
For each of the probabilities below, give the appropriate R command two ways: firstly using pbinom(), and secondly using sum(dbinom()). Run the commands in R and show they give the same answers.
a. P(Y ≤ 12) when Y ∼ Binomial(15, 0.7).
b. P(Y < 30) when Y ∼ Binomial(50, 0.6).
c. P(Y > 72) when Y ∼ Binomial(80, 0.9).
d. P(60 ≤ Y ≤ 70) when Y ∼ Binomial(100, 0.6).
e. P(15 < Y < 20) when Y ∼ Binomial(30, 0.5)
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Mathematics And Statistics For Science
ISBN: 9783031053177
1st Edition
Authors: James Sneyd, Rachel M. Fewster, Duncan McGillivray
Question Posted: