Statistics with R
Student Resources
Chapter 5: Discrete Probability Distributions
1. A random variable x has a binomial distribution with n=4 and p=1/6. What is the probability that x is 1?
- 0.3458
- 0.4158
- 0.4358
- 0.3858 X
Solution:
> dbinom(1, 4, 1/6)
[1] 0.3858025
2. A random variable x has a binomial distribution with n=64 and p=0.65. What is the probability that x is 47 or less?
- 0.9417 X
- 0.9717
- 0.8817
- 0.9017
Solution:
> pbinom(47, 64, 0.65)
[1] 0.9416856
or
> sum(dbinom(0 : 47, 64, 0.65))
[1] 0.9416856
3. A random variable x has a binomial distribution with n=100 and p=0.35. What is the probability x falls in the range from 26 to 34, inclusive?
- 0.3813
- 0.5413
- 0.4413 X
- 0.4913
Solution:
> sum(dbinom(26 : 34, 100, 0.35))
[1] 0.4412901
or
> pbinom(34, 100, 0.35) - pbinom(25, 100, 0.35)
[1] 0.4412901
4. A random variable x has a binomial distribution with n =28 and p=0.55. What is the probability that x will be greater than 18?
- 0.1787
- 0.1187 X
- 0.2256
- 0.0887
Solution:
> 1 - pbinom(18, 28, 0.55)
[1] 0.1187211
or
> sum(dbinom(19 : 28, 28, 0.55))
[1] 0.1187211
5. Suppose x is a Poisson-distributed random variable with an expected value of 5 occurrences per interval. What is p(x=3)?
- 0.2004
- 0.1404 X
- 0.1704
- 0.0904
Solution:
> dpois(3, 5)
[1] 0.1403739
6. Suppose x is a Poisson-distributed random variable with an expected value of 12 occurrences per interval. What is p(x<10)?
- 0.2424 X
- 0.2124
- 0.2824
- 0.2624
Solution:
> ppois(9, 12)
[1] 0.2423922
or
> sum(dpois(0 : 9, 12))
[1] 0.2423922
7. Suppose x is a Poisson-distributed random variable with an expected value of 55 occurrences per interval. What is p(45<x<60)?
- 0.6055
- 0.6755
- 0.6355 X
- 0.6955
Solution:
> ppois(59, 55) - ppois(45, 55)
[1] 0.6354798
or
> sum(dpois(46 : 59, 55))
[1] 0.6354798
8. Suppose x is a Poisson-distributed random variable with an expected value of 105 occurrences per interval. What is p(x>90)?
- 0.9641
- 0.8741
- 0.8341
- 0.9241 X
Solution:
> ppois(90, 105, lower.tail = FALSE)
[1] 0.9240666
or
> 1 - ppois(90, 105)
[1] 0.9240666
9. An urn has 10 marbles: 3 red, 7 black. If we draw a random sample of 4, what is the probability we will end up with 2 red and 2 black?
- 0.1787
- 0.1187 X
- 0.2256
- 0.0887
Solution:
> dhyper(2, 3, 7, 4)
[1] 0.3
or
> choose(3, 2) * choose(7, 2) / choose(10, 4)
[1] 0.3
10. Suppose 10 cards are drawn from a deck of 52 cards consisting of 13 hearts, 13 diamonds, 13 clubs, and 13 spades. What is the probability that the hand of 10 cards will include 3 hearts, 3 diamonds, 2 clubs, and 2 spades?
- 0.0315 X
- 0.0515
- 0.0815
- 0.0215
Solution:
> choose(13, 3) * choose(13, 3) * choose(13, 2) * choose(13, 2) / choose(52, 10)
[1] 0.03145677