My daughter had to make a “probability game” for her fifth grade math class. She has been learning javascript and digital design so we worked together to design and build a roulette wheel for her class.
First, she drew out a series of sketches and we talked it over. She wanted a 0.5 inch thick plywood 2 foot diameter, but after some quick calculations we decided on a $1/4$ inch thick wheel and a 18″ diameter. I had to talk her into adding pegs and a ball bearing from a skateboard from amazon for $2. The inner diameter is $1/4$ inch so I also bought a package of dowels for $5 to make the pegs. I also bought a 1/2 sheet of plywood (that I used about 1/3 of) and some hardware from Home Depot.
She wanted 10 sections with combinations of the following outcomes: Small, Large and Tiny prizes as well as two event outcomes: Spin Again and Lose a Spin. Each student would have at most three turns. We had the following frequencies (out of 10):
Outcome | Frequency |
---|---|
Small | 3 |
Large | 2 |
Tiny | 1 |
Lose a spin | 3 |
Spin Again | 1 |
This led to a ~~fun~~ (frustrating) discussion monte carlo code, conditional probabilities and cumulative probabilities. Good job teacher! We got to answer questions like:
- What is the probability of getting a large prize in a game (three spins)?
- What is the probability you get no prize?
- What is the expected number of spins?
She really threw the math for a loop with the Spin Again and Lose a Spin options. We had to talk about systems with a random number of trials. My favorite part was exposing her to true randomness. She was convinced the wheel was biased because she got three larges in a row. I had to teach her that true random behavior was more unbalanced than her intuition might lead her to believe.
In order to understand a problem like this, it is all about the state space. There are four possible outcomes: three different prizes or no prize. To explain the effect the spin skips have on the outcomes, I had to make the diagram below. Each column represents one of the three spins, each circle represents a terminal outcome and each rectangle represents a result of a spin.
From this, we can compute the probabilities for each of the 17 outcomes:
1 | 2 | 3 | Prob | |
---|---|---|---|---|
1 | $P_L$ | 0.200 | ||
2 | $P_S$ | 0.300 | ||
3 | $P_T$ | 0.100 | ||
4 | L | $P_L$ | 0.060 | |
5 | L | $P_S$ | 0.090 | |
6 | L | $P_T$ | 0.030 | |
7 | L | L | 0.090 | |
8 | L | S | 0.030 | |
9 | S | $P_L$ | 0.020 | |
10 | S | $P_S$ | 0.030 | |
11 | S | $P_T$ | 0.010 | |
12 | S | L | 0.030 | |
13 | S | S | $P_L$ | 0.002 |
14 | S | S | $P_S$ | 0.003 |
15 | S | S | $P_T$ | 0.001 |
16 | S | S | L | 0.003 |
17 | S | S | S | 0.001 |
I would love to find a more elegant solution, but the strange movements of the state-space left me with little structure I could exploit.
And we can add these to get the event probabilities and (her homework) to generate the expected values of prizes she needs to bring when 20 students are going to play the game:
Probability | Expected Value | Ceiling | |
---|---|---|---|
$P_L$ | 28{aaa01f1184b23bc5204459599a780c2efd1a71f819cd2b338cab4b7a2f8e97d4} | 5.64 | 6 |
$P_S$ | 42{aaa01f1184b23bc5204459599a780c2efd1a71f819cd2b338cab4b7a2f8e97d4} | 8.44 | 9 |
$P_T$ | 14{aaa01f1184b23bc5204459599a780c2efd1a71f819cd2b338cab4b7a2f8e97d4} | 2.82 | 3 |
NP | 16{aaa01f1184b23bc5204459599a780c2efd1a71f819cd2b338cab4b7a2f8e97d4} | 3.10 | 4 |
We can also get the probabilities for the number of spins:
Count | Probability |
---|---|
One spin | 0.600 |
Two | 0.390 |
Three | 0.010 |
Simulation
When the probability gets hard . . . simulate, and let the law of large numbers work this out.
This demonstrated the probability of getting a prize was:
Probability | Expected Value | Ceiling | |
---|---|---|---|
$P_L$ | 28{aaa01f1184b23bc5204459599a780c2efd1a71f819cd2b338cab4b7a2f8e97d4} | 5.64 | 6 |
$P_S$ | 42{aaa01f1184b23bc5204459599a780c2efd1a71f819cd2b338cab4b7a2f8e97d4} | 8.46 | 9 |
$P_T$ | 14{aaa01f1184b23bc5204459599a780c2efd1a71f819cd2b338cab4b7a2f8e97d4} | 2.82 | 3 |
NP | 15{aaa01f1184b23bc5204459599a780c2efd1a71f819cd2b338cab4b7a2f8e97d4} | 3.08 | 4 |
Design
So I took her designs and helped her write the following code to draw the wheel in Adobe Illustrator. This didn’t take long to write, because I had written similar code to make a series of clocks for my 5 year old to teach him how to tell time. The code was important to auto-generate the designs, because we must have tried 10 different iterations of the game.
Which produced this Adobe Illustrator file that I could laser-cut:
From here, I designed a basic structure in Fusion 360. I cut the base and frame from $1/2$ inch birch plywood with a $1/4$ inch downcut endmill on a ShopBot.
A render:
And a design:
If you want the fusion file, request in comments and I’ll post.
Please let me know if you have any questions and I’ll share my design. Next up? We are going to print a new wheel to decide who washes the dishes! Kids get double the frequency.
Leave a Reply