Shoot 50 free throws, where the probability of success is 80%.
What is the probability of hitting 45 or more free throws?
Answer: perform
the "hand" calculations with R:
> choose(50, 45) * 0.7^45 * (1-0.7)^(50-45) +
+ choose(50, 46) * 0.7^46 * (1-0.7)^(50-46) +
+ choose(50, 47) * 0.7^47 * (1-0.7)^(50-47) +
+ choose(50, 48) * 0.7^48 * (1-0.7)^(50-48) +
+ choose(50, 49) * 0.7^49 * (1-0.7)^(50-49) +
+ choose(50, 50) * 0.7^50 * (1-0.7)^(50-50)
[1] 0.0007228617
> # Next compute these probabilities with dbinom:
> dbinom(45, 50, 0.7) + dbinom(46, 50, 0.7) + dbinom(47, 50, 0.7) +
+ dbinom(48, 50, 0.7) + dbinom(49, 50, 0.7) + dbinom(50, 50, 0.7)
[1] 0.0007228617
> # Finally pbinom(44, 50, 0.7) computes the probability of
> # making 44 or fewer free throws. 1 - pbinom(44, 50, 0.7) is
> # the probability of making 45 or more free throws:
> 1 - pbinom(44, 50, 0.7)
[1] 0.0007228617
The probability that the Cubs can beat Team A in a single game is 60%.
What is the probability that they win 7 or more games in a 10 game series?
Answer: Perform the calculation first using dbinom:
> dbinom(7, 10, 0.6) + dbinom(8, 10, 0.6) +
+ dbinom(9, 10, 0.6) + dbinom(10, 10, 0.6)
[1] 0.3822806
Next, perform it with pbinom:
> 1 - pbinom(6, 10, 0.6)
[1] 0.3822806