----------------------------------------------------------------------
--- Knud van Eeden --- 26 February 2008 - 08:58 pm -------------------

BBCBASIC: Micro: Acorn: Graphics: Draw: Mathematics: Hexstat: Graph: Create: How to

===

Steps: Overview:

 1. -E.g. create the following program:

--- cut here: begin --------------------------------------------------

010  MODE 0
020  :
030  trialMinI = 1
040  trialMaxI = 10000
050  :
060  stepMinI = 1
070  stepMaxI = 500
080  :
090  yMaxI = -999999
100  yScreenMaxI = 500
110  :
120  DIM x( stepMaxI + 1 + stepMaxI )
130  :
140  FOR trialI = trialMinI TO trialMaxI
150    x0 = stepMaxI + 1
160    FOR stepI = stepMinI TO stepMaxI
170      IF RND( 2 ) = 1 THEN x0 = x0 + 1 ELSE x0 = x0 - 1
240    x( x0 ) = x( x0 ) + 1
245    MOVE 2 * x0, 0
247    DRAW 2 * x0, 10 * x( x0 )
250  NEXT
260  :
270  FOR stepI = stepMinI TO ( stepMaxI + 1 + stepMaxI )
280    IF  yMaxI < x( stepI ) THEN yMaxI = x( stepI )
290  NEXT
300  :
310  FOR stepI = stepMinI TO ( stepMaxI + 1 + stepMaxI )
320    MOVE stepI, 0
330    DRAW stepI, ( x( stepI ) / yMaxI ) * yScreenMaxI
340  NEXT
350  :
360  GCOL1
370  MOVE stepMaxI + 1, 0
380  DRAW stepMaxI + 1, 800
390  :

--- cut here: end ----------------------------------------------------

 2. -Run the program

 3. -That will show a screen output similar to the graph

===

Screencast: see also:



===

Image: see also:





=== Program: see also: === Video: see also: === Internet: see also: Mathematics: Probability: Distribution: Binomial: Hexstat: Links: Can you give an overview of links? http://www.knudvaneeden.com/tinyurl.php?urlKey=url000123 ----------------------------------------------------------------------