*Download Expected Value.nlogo (38 KB)*

Expected Value is authored in the NetLogo modeling-and-simulation environment. The model is part of ProbLab, a curricular unit designed to enrich student understanding of the domain. The online unit package will include a suite of models, student worksheets, and a teacher guide. Below is an applet of 'Expected Value.' You can interact with this model by pressing the buttons and changing the slider values to run this model under different settings. Note that this model is still under development and is yet to undergo our rigorous checkout procedure.

Don't see nothin'?

Gist

The analogy utilized for the model is one of a tiled playground, with a certain number of marbles beneath each tile (0, 1, 2, 3, 4, 5 or 6). [If you insist, this could be about eggs that the Easter Bunny has hidden, or any other idea...] The distribution of marble groups by number-of-marbles -- how many tiles have 0, 1, 2 ... or 6 marbles beneath them -- is set by the sliders on the left. So we know the chance of finding 0, 1, 2 ... or 6 marbles. For instance, the higher you have set a slider as compared to other sliders (see the % monitors), the higher the chance of finding that number of marbles beneath a tile. The more marbles underneath the tile, the lighter the tile color is. A wandering kid (the little person on the screen) flips up some tiles at every go and counts up the marbles found beneath the tiles. The kid cannot see the color of the tiles -- the colors are for us.

The idea of 'expected value' is that we can formulate an educated guess of how many marbles the wandering kid will find. It's similar to asking, "How many marbles are there on average under each tile?" We need somehow to take into account the chance of getting each one of the marble sets.

The computer program will do much of the calculations for us, but here's the gist of what it does: Let's say that the ratio units we set up were 0 : 1 : 6 : 5 : 0 : 4 : 0. The number '5,' for example, indicates our value setting for marble sets of exactly 3 marbles. You can see immediately that the chance of getting a '2' is greater than the chance of getting a '3, because the chance of getting a '2' has more ratio units than the '3'. But in order to determine just how big the chance is of getting each marble set, we need to state the ratio units relative to each other. We need a common denominator. In this particular setting, there is a total of 16 "ratio units": 0 + 1 + 6 + 5 + 0 + 4 + 0 = 16. Now we can say that there is a 4/16 chance of getting a 5-marble set. That is a 25% chance of striking upon a tile that has exactly 5 marbles beneath it. We can also say that these sets of 5 marbles contribute .25 * 5, that is, 1.25 marbles, to the overall average value of a tile in the playground. Similarly, we can say there is a 5/16 chance of getting a set of 3, a 0/16 chance of getting 6-marble set, etc. If we sum up all pairs of 'value' and 'probability,' we get:

(0 * 0/16) + (1 * 1/16) + (2 * 6/16) + (3 * 5/16) + (4 * 0/16) + (5 * 4/16) + (6 * 0/16) = 48/16 = 3 marbles per tile.

This tells us that on any single pick, you should expect to find on average 3 marbles. Thus, if you were to flip over 10 tiles, you should expect to find a total of 30 marbles.

Questions to Ponder

Brace yourself, a riddle will come here, too. Some sunny day.

[

last updated January 4, 2005]