Pachinko

Kurt Schmucker

Created with Stagecast Creator

Get help.

WHAT IT DOES

Pachinko is a probability simulation based on the Japanese game of the same name. It illustrates the principle of frequency distribution, in which some events are more frequent than others. Balls fall from a hopper at the top, bounce off of bumpers, and eventually fall into bins at the bottom. The bins record the number of balls they receive. Normally the bin in the middle will get the most balls, with bins to each side receiving progressively fewer. The bins at the ends receive the fewest. After running for awhile, you can plot on graph paper the number of balls in each bin. The curve should approximate the Gaussian Normal Distribution or "bell-shaped curve."

WHAT TO DO

- Run the simulation and observe the bin totals.

- Click on the ball dropper to turn it on and off.

- Use the "reset" command in the Creator menu to reset the bin totals.

WHAT TO LOOK FOR

Run the simulation and observe the bin totals. Reset the simulation and run it again. Repeat several times. Observe that the totals are slightly different each time but that in general the distribution of balls is similar.

HOW IT WORKS

The bumpers have no rules; they are completely passive.

The balls have rules which determine how they bounce off the bumpers. Take a look at these rules. Observe that there is a random rule box that contains two rules: bounce left and bounce right. Since this rule box is random, there is a 50-50 chance that each rule will be executed. Thus there is a 50-50 chance that a ball will bounce to the left or right. This is the basic logic for the entire simulation.

From this we can compute the probability that a ball will follow a given path from the ball dropper to a bin. For example, since the probability is 1/2 that a ball will fall to the left, the probability is 1/2 that it will arrive at the bumper to the left of the top one. At this bumper, the probability is again 1/2 that it will fall to the left, making the probability 1/2 x 1/2 = 1/4 that it will arrive at the bumper below and to its left. In this way, you can compute the probability that a ball will follow any given path.

1. Compute the probability that a ball will fall into one of the end bins.

Answer: 1/2 x 1/2 x 1/2 x 1/2 x 1/2 = 1/32

2. What is the probability that a ball will fall into one of the next-to-the-end bins?

Answer: 6 x 1/32 = 6/32 = 3/16

Why is it different from an end bin?

Answer: Because there are six paths from the ball dropper to the bin. (Verify this.)

How many more balls would you expect to fall into this bin than into an end bin?

Answer: Six times as many.

3. Compute the probabilities for the rest of the bins. Do they add up to 1?

IDEAS FOR CHANGES

1. (beginner) Add a second bounce right rule to the rule box for a ball. Hint: you can copy the existing bounce right rule with the Copy tool. Now the rule box has two bounce right rules, but only one bounce left rule. You have changed the probability so that it is twice as likely that a ball will go to the right as to the left.

What does this do to the totals in the bins? Run the simulation for awhile and observe the results. Plot the totals in a graph as you did before. How do the curves compare?

2. (advanced) Remove the second bounce right rule that you added in (1) so that the probabilities are again the same, the way they were initially. Now can you change the rules and/or rearrange the bumpers so that the SAME NUMBER of balls falls into each bin. Hint: Observe that there are only seven bins at the bottom. Can you solve this problem if the number of bins is not a power of two?

The solution is on the "8-bins" stage. To see it, display the sidelines, open the Stages drawer, and the "8 bins" stage into the window. Run the simulation and observe that (approximately) the same number of balls falls into each bin. This was done without adding any rules, just by adding one bin and one row of bumpers and filling in some ball paths. To our knowledge, this problem cannot be solved just by adding rules.

Why aren't there EXACTLY the same number of balls in each bin on the 8-bins stage?

Answer: For the same reason that flipping a coin ten times does not always result in five heads and five tails: because it's random and therefore unpredictable, at least with small numbers.


Stagecast Creator and InstantSim are trademarks of Stagecast Software, Inc.
Java is a registered trademark of Sun Microsystems, Inc.