WHAT IS IT?
-----------
This  model simulates a binomial probability distribution or (in the limit)
normal distribution.

This model was created by a student in an effort to make sense of normal
distributions.  In particular, he sought to understand why height is distributed
normally in human populations. For a detailed account of this case, see:
Wilensky, U. (1997). What is Normal Anyway? Therapy for Epistemological Anxiety. 
Educational Studies in Mathematics. Volume 33, No. 2. pp. 171-202.
http://www.tufts.edu/~uwilensk/papers/normal/normal.html

The model works by analogizing height variations to rabbit hops.

A number of rabbits are placed at the center of the bottom line.  A move pattern
determines the way a rabbit moves.  Each rabbit can choose to hop right or left a
certain hop-size. The likelihood of a rabbit following each move pattern is given
in terms of ratios.  Each rabbit may have up to five different move patterns.

HOW TO USE IT?
--------------
    Setup

Method one (sliders setup): Press SETUP button. This creates the number of
rabbits from the NUMBER slider and up to three hops and associated probabilities
from the six sliders above the NUMBER slider.  Each time a rabbit hops, it
chooses one of the three moves -- hop1, hop2, or hop3 -- with a likelihood in the
ratio of prob1, prob2, and prob3 to each other.  For example, if prob1 = 2, prob2
= 4, and prob3 = 6, the rabbit has a 2-in-12 chance of making the hop1 move, a
4-in-12 chance of making the hop2 move, and a 6-in-12 chance of making the hop3
move.

Method two (manual setup): In the Command Center, type "setup [number] [list of
hops [list of probability ratios]" to initialize the rabbits (e.g. "setup 4000 [1
-1] [1 2]" will set up 4000 rabbits hopping either one unit to the right(1) or
one unit to the left (-1) with a chance of hopping to the left being twice as
much as that to the right.)  Up to five steps and corresponding probability
ratios can be used.

The GO-ONE-HOP button makes each rabbit hop once.

The GO button tells the rabbits to hop the number of times set by the HOPS
slider. For example, if HOPS is set to 10, the GO button makes each rabbit hop 10
times.  To stop the rabbits from hopping once they've started, release the GO
button.

There are two scale monitors and one scale slider in the Interface Window. 
X-SCALE is used to magnify the width of the screen to facilitate more hops. It is
manually set by users with the X-SCALE slider. The setting can be changed as the
model runs.  Y-SCALE is used to regulate the vertical scale -- to ensure that the
highest yellow distribution bar is always 80% of the height of the screen. This
is done at each hop.

The figure inside the "y-scale" monitor is the number of rabbits a
screen-size-long yellow line represents.  The figure inside the "x-scale" monitor
is the number of steps represented by a full screen. (The rabbits wrap the sceen,
so if they get to the edge, you should increase the x-scale.)

The following formulae can be used to evaluate the actual numbers of rabbits or
steps hopped:

Actual Number of Rabbits for a Yellow Line = height of line * ( y-scale / 100 )
(To find the height of a yellow line, shift-double-click on 		its top
patch.)

Cumulative Number of Steps Hopped so far = X-coordinate of a line * ( x-scale /
100 )

THINGS TO NOTICE
----------------
The purple average line shows where an average rabbit would be. Observe the
movement of this line -- both its position and velocity -- and try to relate
these to the settings.

Play with the NUMBER slider to see if what you predict is what you see when the
number of rabbits is small. For what numbers of rabbits are your predictions the
most accurate?

THINGS TO TRY
-------------
Try different values for list of steps. What happens to the distribution?

Try different values for probability ratios.  What happens to the distribution?

Is the distribution always symmetric? What would you expect?

EXTENDING THE MODEL
-------------------
Create a plot window for 'hopping'. First decide what to graph, and then
implement the proper StarLogoT plot functions.

STARLOGOT FEATURES
-----------------
The limitation on the number of turtles constrains the limits of the "number"
slider. You can change the settings in the Edit menu, under 'settings'. (Press
the 'More' button once inside the window.) This will allow you to have more
turtles on screen at one time. You must make the corresponding change to the
NUMBER slider after this - double click on the slider while holding down the
Shift button, and change 'max' to the new number. Having more rabbits to jump can
be useful for certain statistical simulations.

You can also change the settings to have a bigger graphics window to fit more
hops or show very fine distribution diagrams.

Note that since turtles cannot have list variables, the global lists steps and
probs are used to hold the movement patterns and ratios. The turtles access these
globals to know how to move. The procedures 'define-steps' and 'define-probs' use
the primitives 'first' and 'butfirst'. Both of these are list operators - that
is, they operate on lists of things. The 'first' of a list is simply its first
element. Likewise, the 'butfirst' of a list is a list of all elements except for
the first.