Determine the chances of getting between a 0.85 and a 1.00 in two spins on The Price is Right Big Wheel game.
The Big Wheel contains 20 values in 5 cent increments ranging from 5 to 100. The contestant can spin the wheel twice, and the value of each spin is added to their total price money amount.
To determine to chances of getting a sum between 85 cents and 1.00 dollar with two spins, we can implement a function to generate all possible combinations of values and from there find the number of ways to obtain a total value of 0.85, 0.9, 0.95, or 1.00.
In [ ]:
importnumpyasnpvalues=[5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100]#20 possible spin values on the big wheelspinCombinations=[[spin1,spin2]forspin1invaluesforspin2invalues]# all possible combinations of spinsSpinSum=[[spin1+spin2]forspin1invaluesforspin2invalues]#all possible sums of two spinsSpinStreak=0foriinrange(len(SpinSum)):#evaluates combined sum of all combinations of two spinsforSpinsinSpinSum[i]:if(Spins>=85andSpins<=100):print(spinCombinations[i],'=',SpinSum[i],'cents')SpinStreak+=1#if sum is between 85 and 100 then the spinStreak is appendedprint('Total number of combinations >=85 and <=100: ',SpinStreak)print('Total number of combinations >=85 and <=100 divided by all possible sums of two spins: ',SpinStreak,'/',len(SpinSum),'=',(SpinStreak/len(SpinSum))*100,'%')
There are 400 different combinations of numbers that can be obtained by with two spins of The Big Wheel.
There are 70 different combinations of numbers that the sum of their values is between 85 cents and 1.00 dollar.
The probability is the total combinations of sum between 85 cents and 1.00 divided by all total combinations of values., which is 70/400 or 17.5%.
Big Wheel Simulator
The simulation below has two functions:
twoSpins() generates two random integers between 5 and 100 by increments of 5 which will define the values of our two spins. It then returns the combined sum of the two spin.
BetweenEightFiveAndOneHundred() evaluates the value returned by twoSpins(). If the value is between our required combined sum of greater than 85 or less than 100, it returns a value of 1. If not, it returns a value of 0.
The array spinStreakSum stores the values return by the BetweenEightFiveAndOneHundred() function. By iterating the function a large number of times, spinStreakSum will repeatedly appended to store all the returned values of our BetweenEightFiveAndOneHundred() function.
The sum of spinStreakSum is the sum of all values of 1 in the array. By taking the sum of spinStreakSum and diving it by its length, we get a mean value which, when multiplied by 100, gives us the percentage probability of obtaining a combined sum greater than 85 or less than 100 over the period of a large number of spins.
importrandomspinStreakSum=#empty array to fill with 0 or 1 valuesdeftwoSpins():#function to generate to random spins between 5 and 100 and returns combined sumSpin1=random.randrange(5,101,5)Spin2=random.randrange(5,101,5)SpinTotal=Spin1+Spin2returnSpinTotaldefBetweenEightyFiveAndOneHundred():#function evaluates the total in twoSpins() and returns 1 if spinTotal is >=85 or <=100spinTotal=twoSpins()if(spinTotal>=85andspinTotal<=100):return1else:return0foriinrange(100000):# large number of iterations to fill the spinStreakSum array to obtain an accurate estimatespinStreakSum.append(BetweenEightyFiveAndOneHundred())print('probability of obtaining a sum greater than 85 cents or less than 1.00 dollar:')print(sum(spinStreakSum),'/',len(spinStreakSum),'=',(sum(spinStreakSum)/len(spinStreakSum))*100,'%')
probability of obtaining a sum greater than 85 cents or less than 1.00 dollar:
17405 / 100000 = 17.405 %
The Big Wheel Simulator supports the statistical probability determined in our first function of approximately 17.5%