This page was automatically generated by NetLogo 3.1.2. Questions, problems? Contact feedback@ccl.northwestern.edu.
The applet requires Java 1.4.1 or higher. It will not run on Windows 95 or Mac OS 8 or 9. Mac users must have OS X 10.2.6 or higher and use a browser that supports Java 1.4. (Safari works, IE does not. Mac OS X comes with Safari. Open Safari and set it as your default web browser under Safari/Preferences/General.) On other operating systems, you may obtain the latest Java plugin from Sun's Java site.
Copyright © 2007 by Dor Abrahamson. All rights reserved.
created with NetLogo
view/download model file: Histo-Blocks.nlogo
WHAT IS IT?
This model is a part of the ProbLab curriculum. The ProbLab Curriculum is currently under development at the Embodied Design Research Laboratory (EDRL), University of California, Berkeley. For more information about the ProbLab Curriculum please refer to http://ccl.northwestern.edu/curriculum/ProbLab/.
Histo-Blocks is a model for exploring the binomial function. The stochastic object is a Ò4-Block,Ó a 2-by-2 matrix, in which each of the four squares independently can be either green or blue. The model shows connections between the combinatorial space of the stochastic device, the probabilities of independent events in this device, and the expected outcome distribution in experiments with this device.
(This model is on theoretical probability only -- not empirical probability -- so there is no simulated experiment here.)
HOW IT WORKS
The View displays the 16 unique possibilities of the green/blue 4-Block, arranged in five columns by the number of green squares (0 through 4). Labels on each of the green squares -- the favored events -- show the current p value, and labels on the blue blocks show the complementary (1 - p) value. The p value can be changed using a slider that is below the View. When you click on a column in the View, three monitors display information: the number of blocks in that column (n-choose-k), the compound probability of each of the blocks in that column (the product of the four independent probabilities), and the product of these two latter components. This product, number-of-blocks-in-a-column * compound-probability-of-each-block-in-the-column, represents the chance of randomly getting any one of the blocks in that column, when you operate the stochastic device. The plot shows a special histogram, in which each column is partitioned equally into as many parts as there are blocks in its corresponding View column, below. For example, the "2" column in the histogram in partitioned into 6 equal segments, because there are 6 unique 4-blocks in the "2" column in the View. Whereas the blocks are equal in height within the columns, they differ in height between columns (for p values other than .5). The relative heights index the compound probability. So the histogram blocks -- the "histo-blocks" -- feature the both factors at play in the binomial function: the n-choose-k coefficients are represented by the number of blocks in the column, and p^k * (1 -p)^(n - k) is represented by these blocks' heights.
HOW TO USE IT
Press on Setup, then Go. Now, grab the slider and change the p value.
Buttons:
Setup -- builds the "combinations tower" in the View.
Go -- enables the functioning of clicking on the screen and of the slider.
Switch:
plot-individual-blocks? -- toggles between having or not having the histogram partitioned.
auto-adjust-y-axis? -- when set to 'On,' the histogram will keep adjusting for new p values so that the tallest column reaches to the top. When off, the max y value is 1.
Sliders:
p -- sets the p value
Monitors:
Number of Items in This Column -- gives this information when you click on a column
Probability of Each Item in This Column -- ditto
n-choose-k * Compound p -- the product of the values in the above.
THINGS TO NOTICE
Note the probability values appearing in little labels on the squares. Also note the shape of the histogram. Both the labels and histogram change with p.
THINGS TO TRY
Set the p value (on the slider) to .6. Looking at the plot, what is special about this p value? Can you find other p values that give this same effect? With p set to .6, click anywhere on the middle column (2-green column). Observe the monitors. Now, with the mouse still down, drag the mouse one column to the right. What happened in the monitors?
Set the auto-adjust-y-axis? to 'Off,' and slide the p value. Look at the histogram as you do this. What is happening to the histogram? -- What is changing?; What is not changing? What does this mean, in terms of the probabilities?
EXTENDING THE MODEL
Add empirical functions to the model: create another histogram that reflects outcomes of a simulated probability experiment with a 4-block (a sample of 4 independent events that each take on one of two possible values). Place this new histogram on the interface such that it will readily compare to the histo-block histogram. You can partition this histogram, too, according to sub-groups in the outcomes.
NETLOGO FEATURES
This model uses a special procedure in order to partition the histogram columns.
RELATED MODELS
Several of ProbLab's models are related to Histo-Blocks, notably 9-Blocks Stalagmite.
CREDITS AND REFERENCES
Thanks to Dor Abrahamson for his work on the design of this model and the ProbLab curriculum. Thank you to Josh Unterman for his talent and work on producing this model.
To refer to this model in academic publications, please use: Abrahamson, D. (2006). NetLogo Histo-Blocks model. Embodied Design Research Laboratory, University of Berkeley - CA.






