In: Statistics and Probability
i) Plot a cumulative probability distribution similar to the one in the coin
toss experiment, but for the probability of the number of sixes rolled in 10
rolls of a die (a die has 6 sides!).
ii) If we observe four sixes in 10 rolls, is this die likely to be loaded? If we observe a six four times out ten what is a 95% confidence interval on the underlying probability of rolling a six?
iii) Say instead we had rolled 40 sixes out of 100. Is the die likely to be loaded? What is a 95% confidence interval on the probability of rolling a six?
iv) Say instead we had rolled 400 sixes out of 1000. Is the die likely to be loaded? What is a 95% confidence interval on the probability of rolling a six? Hint: use binom.test() for parts ii-iv.
Work needs to be done in Rstudio
i)
Binomial Probability Distribution | |
n = | 10 |
p = | 0.1667 |
k | P( x = k ) |
0 | 0.1615 |
1 | 0.3230 |
2 | 0.2907 |
3 | 0.1550 |
4 | 0.0543 |
5 | 0.0130 |
6 | 0.0022 |
7 | 0.0002 |
8 | 0.0000 |
9 | 0.0000 |
10 | 0.0000 |
ii)
# ii
binom.test(4,10,p=1/6)
# iii
binom.test(40,100,p=1/6)
# iv
binom.test(400,1000,p=1/6)
95% confidence interval is in output for each case
Please give me a thumbs-up if this helps you out. Thank you! :)