In: Statistics and Probability
Problem 2
(a) The night before the final exam, Alice will play this game 10 times. What is the probability that she will win herself at least $3 for ice cream?
(b) Alice teaches this game to Bob, who is taking another course. The night before his final exam, Bob plays the game 10 times. But Bob really likes ice cream, and he’s really stressed out, so he plays with a special pair of dice that are weighted so that p(5) = p(6) = 2p(4) = 2p(3) = 2p(2) = 2p(1). (In other words, he is twice as likely to roll a 5 or a 6 than any other number.) What is the probability that Bob will win himself at least $3 for ice cream?
(c) How many times should Alice play her game to ensure that she will have at least a 50% chance of winning at least $5? (NOTE: Alice will play with the original version in (a) not Bob’s cheating version in (b).) (HINT: This may be rather tedious to calculate by hand, so you may want to write a short program to calculate it. If you do, attach an image of your code as well as a short explanation of your procedure and the final answer.)
a) In any given throw of 2 dice, the sum of 2 numbers is 10 or more when die 1 and die 2 get any of the following
Die 1 | Die 2 | Sum | Probability |
4 | 6 | 10 | 1/6*1/6=1/36 |
5 | 5 | 10 | 1/6*1/6=1/36 |
5 | 6 | 11 | 1/6*1/6=1/36 |
6 | 4 | 10 | 1/6*1/6=1/36 |
6 | 5 | 11 | 1/6*1/6=1/36 |
6 | 6 | 12 | 1/6*1/6=1/36 |
sum | 1/6 |
From the above we can say that the probability of the sum of the two numbers is at least 10 on any given throw of 2 dice is 1/6
That is the probability that Alice wins any given throw of 2 dice is 1/6
a) Let X be the number of times Alice wins out of 10 games that she plays. We can say that X has a binomial distribution with parameters, number of trials (number of games played) n=10 and success probability ( the probability that Alice wins any given throw of 2 dice) p=1/6
The probability of winning X=x games is
the probability that she will win herself at least $3 for ice cream is same as the probability that she wins at least 3 games out of 10 that she plays
ans: the probability that she will win herself at least $3 for ice cream is 0.2248
b) given that p(5) = p(6) = 2p(4) = 2p(3) = 2p(2) = 2p(1) and the sum of probabilities is 1
In any given throw of 2 special dice of Bob, the sum of 2 numbers is 10 or more when die 1 and die 2 get any of the following
Die 1 | Die 2 | Sum | Probability |
4 | 6 | 10 | 1/8*1/4=1/32 |
5 | 5 | 10 | 1/4*1/4=1/16 |
5 | 6 | 11 | 1/4*1/4=1/16 |
6 | 4 | 10 | 1/6*1/8=1/32 |
6 | 5 | 11 | 1/4*1/4=1/16 |
6 | 6 | 12 | 1/4*1/4=1/16 |
sum | 5/16 |
From the above we can say that the probability of the sum of the two numbers is at least 10 on any given throw of 2 special dice is 5/16
That is the probability that Bob wins any given throw of 2 special dice is 5/16
Let X be the number of times Bob wins out of 10 games that he plays. We can say that X has a binomial distribution with parameters, number of trials (number of games played) n=10 and success probability ( the probability that Bob wins any given throw of 2 dice) p=5/16
The probability of winning X=x games is
the probability that Bob will win himself at least $3 for ice cream is same as the probability that he wins at least 3 games out of 10 that he plays
ans: the probability that Bob will win himself at least $3 for ice cream is 0.6499
c) Let n be the number of games that Alice plays
Let X be the number of games that Alice wins out of the n games that she plays.
The probability of winning X=x games is
the probability that she will win herself at least $5 for ice cream is same as the probability that she wins at least 5 games out of n that she plays
We want this probability to be at least 0.50
That is, we want
R code to get this (all statements starting with # are comments and can be removed)
#start with number of trials=10
n<-10
#search for n in a loop
repeat{
#get the probability of winning at least 5 in n games played
prob<-1-pbinom(4,n,1/6)
#stop when the probability is at least 0.50
if (prob>=0.5) break;
#increment n when probability is less than 0.5
n<-n+1
}
sprintf('Alice should play her game %d times',n)
# get this
You can also do this in excel using
get this