# Casino Questions: #1. (Game="Silly Dice": The player pays 1 dollar. A six ice is rolled. If a six comes the player get 4 dollars!) Imagine, this game is played by 50 people a day. What is the probability that more than 15 people will win on a given day? ########## #Solution: Since (1/6)*50<10, we can not use the normal approximation. p=1/6 q=1-p N=50 k=0:15 Prob=1-sum(dbinom(k,N,p)) Prob # In this case one could use the factorials without any thought and hecne the "standard" formula for the binomial coefficients. W=(p^(k))*q^(N-k) X=factorial(k) Y=factorial(N-k) Prob=1-sum((factorial(N)/(X*Y))*W) Prob ########## # 2. (Game=Roulette: The player pays 1 dollar. A wheel with 38 slots is spun. If a 00 arises (which is one of the 38 slots) the player gets 35 dollars!) Imagine, this game is played by 1,000 people a week. What is the probability that 20 or fewer people will win on a given week? ########## #Solution: p=1/38 q=1-p N=1000 k=0:20 Prob=sum(dbinom(0:20,N,p)) Prob #Solution 2: Since (1/38)*1000>=10, we can also use the normal approximation. z=(20.5-N*p)/(sqrt(p*q*N)) ProbApprox=pnorm(z,0,1) ProbApprox #Notice the 0.5 in 20.5. #We cannot sue the "standard" formula in the naive sense, try W=(p^(k))*q^(N-k) X=factorial(k) Y=factorial(N-k) Prob=1-sum((factorial(N)/(X*Y))*W) Prob ########## #3. (Game=Crazy Jelly Bean "Over 100 million dollars in prizes!: and over 30000 chances to win! The player pays 1 dollar. While blindfolded, a player uses a grabbing device to pick a jelly bean out of a swimming pool that contains roughly 280,000,000 jelly beans. 30,800 of these jelly beans are filled with gold! and can be exchanged for a check for 5,000 dollars! ) Imagine, this game is played by 35000 people a decade. What is the probability that more than 7 people win in a given decade? ########## # Solution: p=30800/(280*10^6) q=1-p N=35000 k=0:7 Prob=1-sum(dbinom(k,N,p)) Prob #Solution 2: Since, N>>k, and N>>N*p, we can use the Poisson Approximation: l=N*p X=l^k Y=factorial(k) ProbApprox=1-sum((X/Y)*(exp(-l))) ProbApprox # Once again, ewe cannot sue the "standard" formula in the naive sense.