Home » Archimedes archive » Acorn User » AU 1994-12.adf » !StarInfo_StarInfo » Craven/!Dice/!Help

Craven/!Dice/!Help

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1994-12.adf » !StarInfo_StarInfo
Filename: Craven/!Dice/!Help
Read OK:
File size: 083D bytes
Load address: 0000
Exec address: 0000
File contents
DICE SIMULATION PROGRAM
D.Craven, Greenhead College, Huddersfield
May 1994


The program is designed to illustrate properties of 3 common probability     distributions, namely Uniform, Binomial and Geometric.
It may be used as a classroom demonstration or for students to explore       various aspects, perhaps in small groups.  It is aimed primarily at 'A' levelmaths students, but some options may well be useful for other age groups.

The software is simple to use,(see example below) and is mouse driven with   some keyboard input. It is not multi-tasking, but should not interfere with  other loaded software.
All mouse buttons have the same effect.

Points that can be illustrated include:

1. Basic properties of the given distribution, including mean and variance,  shape and effect of parameter values (particularly for the Binomial          Distribution).

2. The behaviour of random samples : several large samples can be observed ina short space of time

3. The improvement of the fit of a theoretical model to an observed data set as the sample size increases.  This also includes the values of the sample   mean and variance compared with those of the population.


Example

Double click on !Dice to start the program.

Click anywhere within the GEOMETRIC DISTRIBUTION box.
Type in 100 for the number of successes and press 'Return'.
Select the number 6 only, then click on 'Done'.
Note the shape of the distribution.

This simulates the number of throws needed to get a six with a single die.   Over a long run, you may expect to get a six once in every six throws : so   why is the peak of the distribution not at 6?
Click on the 'Show mean and variance' box and note the results.
Click on the 'Repeat with new data' box  and try 1000 successes.  Note the   smoother shape of the distribution.
Click on 'show theoretical distribution' to compare the expected results withthose observed, and click on the same box again to flick back to your        observed values.
Try this comparison with different sample sizes, and note the relative valuesof the observed and theoretical mean and variance.
00000000  44 49 43 45 20 53 49 4d  55 4c 41 54 49 4f 4e 20  |DICE SIMULATION |
00000010  50 52 4f 47 52 41 4d 0a  44 2e 43 72 61 76 65 6e  |PROGRAM.D.Craven|
00000020  2c 20 47 72 65 65 6e 68  65 61 64 20 43 6f 6c 6c  |, Greenhead Coll|
00000030  65 67 65 2c 20 48 75 64  64 65 72 73 66 69 65 6c  |ege, Huddersfiel|
00000040  64 0a 4d 61 79 20 31 39  39 34 0a 0a 0a 54 68 65  |d.May 1994...The|
00000050  20 70 72 6f 67 72 61 6d  20 69 73 20 64 65 73 69  | program is desi|
00000060  67 6e 65 64 20 74 6f 20  69 6c 6c 75 73 74 72 61  |gned to illustra|
00000070  74 65 20 70 72 6f 70 65  72 74 69 65 73 20 6f 66  |te properties of|
00000080  20 33 20 63 6f 6d 6d 6f  6e 20 70 72 6f 62 61 62  | 3 common probab|
00000090  69 6c 69 74 79 20 20 20  20 20 64 69 73 74 72 69  |ility     distri|
000000a0  62 75 74 69 6f 6e 73 2c  20 6e 61 6d 65 6c 79 20  |butions, namely |
000000b0  55 6e 69 66 6f 72 6d 2c  20 42 69 6e 6f 6d 69 61  |Uniform, Binomia|
000000c0  6c 20 61 6e 64 20 47 65  6f 6d 65 74 72 69 63 2e  |l and Geometric.|
000000d0  0a 49 74 20 6d 61 79 20  62 65 20 75 73 65 64 20  |.It may be used |
000000e0  61 73 20 61 20 63 6c 61  73 73 72 6f 6f 6d 20 64  |as a classroom d|
000000f0  65 6d 6f 6e 73 74 72 61  74 69 6f 6e 20 6f 72 20  |emonstration or |
00000100  66 6f 72 20 73 74 75 64  65 6e 74 73 20 74 6f 20  |for students to |
00000110  65 78 70 6c 6f 72 65 20  20 20 20 20 20 20 76 61  |explore       va|
00000120  72 69 6f 75 73 20 61 73  70 65 63 74 73 2c 20 70  |rious aspects, p|
00000130  65 72 68 61 70 73 20 69  6e 20 73 6d 61 6c 6c 20  |erhaps in small |
00000140  67 72 6f 75 70 73 2e 20  20 49 74 20 69 73 20 61  |groups.  It is a|
00000150  69 6d 65 64 20 70 72 69  6d 61 72 69 6c 79 20 61  |imed primarily a|
00000160  74 20 27 41 27 20 6c 65  76 65 6c 6d 61 74 68 73  |t 'A' levelmaths|
00000170  20 73 74 75 64 65 6e 74  73 2c 20 62 75 74 20 73  | students, but s|
00000180  6f 6d 65 20 6f 70 74 69  6f 6e 73 20 6d 61 79 20  |ome options may |
00000190  77 65 6c 6c 20 62 65 20  75 73 65 66 75 6c 20 66  |well be useful f|
000001a0  6f 72 20 6f 74 68 65 72  20 61 67 65 20 67 72 6f  |or other age gro|
000001b0  75 70 73 2e 0a 0a 54 68  65 20 73 6f 66 74 77 61  |ups...The softwa|
000001c0  72 65 20 69 73 20 73 69  6d 70 6c 65 20 74 6f 20  |re is simple to |
000001d0  75 73 65 2c 28 73 65 65  20 65 78 61 6d 70 6c 65  |use,(see example|
000001e0  20 62 65 6c 6f 77 29 20  61 6e 64 20 69 73 20 6d  | below) and is m|
000001f0  6f 75 73 65 20 64 72 69  76 65 6e 20 77 69 74 68  |ouse driven with|
00000200  20 20 20 73 6f 6d 65 20  6b 65 79 62 6f 61 72 64  |   some keyboard|
00000210  20 69 6e 70 75 74 2e 20  49 74 20 69 73 20 6e 6f  | input. It is no|
00000220  74 20 6d 75 6c 74 69 2d  74 61 73 6b 69 6e 67 2c  |t multi-tasking,|
00000230  20 62 75 74 20 73 68 6f  75 6c 64 20 6e 6f 74 20  | but should not |
00000240  69 6e 74 65 72 66 65 72  65 20 77 69 74 68 20 20  |interfere with  |
00000250  6f 74 68 65 72 20 6c 6f  61 64 65 64 20 73 6f 66  |other loaded sof|
00000260  74 77 61 72 65 2e 0a 41  6c 6c 20 6d 6f 75 73 65  |tware..All mouse|
00000270  20 62 75 74 74 6f 6e 73  20 68 61 76 65 20 74 68  | buttons have th|
00000280  65 20 73 61 6d 65 20 65  66 66 65 63 74 2e 0a 0a  |e same effect...|
00000290  50 6f 69 6e 74 73 20 74  68 61 74 20 63 61 6e 20  |Points that can |
000002a0  62 65 20 69 6c 6c 75 73  74 72 61 74 65 64 20 69  |be illustrated i|
000002b0  6e 63 6c 75 64 65 3a 0a  0a 31 2e 20 42 61 73 69  |nclude:..1. Basi|
000002c0  63 20 70 72 6f 70 65 72  74 69 65 73 20 6f 66 20  |c properties of |
000002d0  74 68 65 20 67 69 76 65  6e 20 64 69 73 74 72 69  |the given distri|
000002e0  62 75 74 69 6f 6e 2c 20  69 6e 63 6c 75 64 69 6e  |bution, includin|
000002f0  67 20 6d 65 61 6e 20 61  6e 64 20 76 61 72 69 61  |g mean and varia|
00000300  6e 63 65 2c 20 20 73 68  61 70 65 20 61 6e 64 20  |nce,  shape and |
00000310  65 66 66 65 63 74 20 6f  66 20 70 61 72 61 6d 65  |effect of parame|
00000320  74 65 72 20 76 61 6c 75  65 73 20 28 70 61 72 74  |ter values (part|
00000330  69 63 75 6c 61 72 6c 79  20 66 6f 72 20 74 68 65  |icularly for the|
00000340  20 42 69 6e 6f 6d 69 61  6c 20 20 20 20 20 20 20  | Binomial       |
00000350  20 20 20 44 69 73 74 72  69 62 75 74 69 6f 6e 29  |   Distribution)|
00000360  2e 0a 0a 32 2e 20 54 68  65 20 62 65 68 61 76 69  |...2. The behavi|
00000370  6f 75 72 20 6f 66 20 72  61 6e 64 6f 6d 20 73 61  |our of random sa|
00000380  6d 70 6c 65 73 20 3a 20  73 65 76 65 72 61 6c 20  |mples : several |
00000390  6c 61 72 67 65 20 73 61  6d 70 6c 65 73 20 63 61  |large samples ca|
000003a0  6e 20 62 65 20 6f 62 73  65 72 76 65 64 20 69 6e  |n be observed in|
000003b0  61 20 73 68 6f 72 74 20  73 70 61 63 65 20 6f 66  |a short space of|
000003c0  20 74 69 6d 65 0a 0a 33  2e 20 54 68 65 20 69 6d  | time..3. The im|
000003d0  70 72 6f 76 65 6d 65 6e  74 20 6f 66 20 74 68 65  |provement of the|
000003e0  20 66 69 74 20 6f 66 20  61 20 74 68 65 6f 72 65  | fit of a theore|
000003f0  74 69 63 61 6c 20 6d 6f  64 65 6c 20 74 6f 20 61  |tical model to a|
00000400  6e 20 6f 62 73 65 72 76  65 64 20 64 61 74 61 20  |n observed data |
00000410  73 65 74 20 61 73 20 74  68 65 20 73 61 6d 70 6c  |set as the sampl|
00000420  65 20 73 69 7a 65 20 69  6e 63 72 65 61 73 65 73  |e size increases|
00000430  2e 20 20 54 68 69 73 20  61 6c 73 6f 20 69 6e 63  |.  This also inc|
00000440  6c 75 64 65 73 20 74 68  65 20 76 61 6c 75 65 73  |ludes the values|
00000450  20 6f 66 20 74 68 65 20  73 61 6d 70 6c 65 20 20  | of the sample  |
00000460  20 6d 65 61 6e 20 61 6e  64 20 76 61 72 69 61 6e  | mean and varian|
00000470  63 65 20 63 6f 6d 70 61  72 65 64 20 77 69 74 68  |ce compared with|
00000480  20 74 68 6f 73 65 20 6f  66 20 74 68 65 20 70 6f  | those of the po|
00000490  70 75 6c 61 74 69 6f 6e  2e 0a 0a 0a 45 78 61 6d  |pulation....Exam|
000004a0  70 6c 65 0a 0a 44 6f 75  62 6c 65 20 63 6c 69 63  |ple..Double clic|
000004b0  6b 20 6f 6e 20 21 44 69  63 65 20 74 6f 20 73 74  |k on !Dice to st|
000004c0  61 72 74 20 74 68 65 20  70 72 6f 67 72 61 6d 2e  |art the program.|
000004d0  0a 0a 43 6c 69 63 6b 20  61 6e 79 77 68 65 72 65  |..Click anywhere|
000004e0  20 77 69 74 68 69 6e 20  74 68 65 20 47 45 4f 4d  | within the GEOM|
000004f0  45 54 52 49 43 20 44 49  53 54 52 49 42 55 54 49  |ETRIC DISTRIBUTI|
00000500  4f 4e 20 62 6f 78 2e 0a  54 79 70 65 20 69 6e 20  |ON box..Type in |
00000510  31 30 30 20 66 6f 72 20  74 68 65 20 6e 75 6d 62  |100 for the numb|
00000520  65 72 20 6f 66 20 73 75  63 63 65 73 73 65 73 20  |er of successes |
00000530  61 6e 64 20 70 72 65 73  73 20 27 52 65 74 75 72  |and press 'Retur|
00000540  6e 27 2e 0a 53 65 6c 65  63 74 20 74 68 65 20 6e  |n'..Select the n|
00000550  75 6d 62 65 72 20 36 20  6f 6e 6c 79 2c 20 74 68  |umber 6 only, th|
00000560  65 6e 20 63 6c 69 63 6b  20 6f 6e 20 27 44 6f 6e  |en click on 'Don|
00000570  65 27 2e 0a 4e 6f 74 65  20 74 68 65 20 73 68 61  |e'..Note the sha|
00000580  70 65 20 6f 66 20 74 68  65 20 64 69 73 74 72 69  |pe of the distri|
00000590  62 75 74 69 6f 6e 2e 0a  0a 54 68 69 73 20 73 69  |bution...This si|
000005a0  6d 75 6c 61 74 65 73 20  74 68 65 20 6e 75 6d 62  |mulates the numb|
000005b0  65 72 20 6f 66 20 74 68  72 6f 77 73 20 6e 65 65  |er of throws nee|
000005c0  64 65 64 20 74 6f 20 67  65 74 20 61 20 73 69 78  |ded to get a six|
000005d0  20 77 69 74 68 20 61 20  73 69 6e 67 6c 65 20 64  | with a single d|
000005e0  69 65 2e 20 20 20 4f 76  65 72 20 61 20 6c 6f 6e  |ie.   Over a lon|
000005f0  67 20 72 75 6e 2c 20 79  6f 75 20 6d 61 79 20 65  |g run, you may e|
00000600  78 70 65 63 74 20 74 6f  20 67 65 74 20 61 20 73  |xpect to get a s|
00000610  69 78 20 6f 6e 63 65 20  69 6e 20 65 76 65 72 79  |ix once in every|
00000620  20 73 69 78 20 74 68 72  6f 77 73 20 3a 20 73 6f  | six throws : so|
00000630  20 20 20 77 68 79 20 69  73 20 74 68 65 20 70 65  |   why is the pe|
00000640  61 6b 20 6f 66 20 74 68  65 20 64 69 73 74 72 69  |ak of the distri|
00000650  62 75 74 69 6f 6e 20 6e  6f 74 20 61 74 20 36 3f  |bution not at 6?|
00000660  0a 43 6c 69 63 6b 20 6f  6e 20 74 68 65 20 27 53  |.Click on the 'S|
00000670  68 6f 77 20 6d 65 61 6e  20 61 6e 64 20 76 61 72  |how mean and var|
00000680  69 61 6e 63 65 27 20 62  6f 78 20 61 6e 64 20 6e  |iance' box and n|
00000690  6f 74 65 20 74 68 65 20  72 65 73 75 6c 74 73 2e  |ote the results.|
000006a0  0a 43 6c 69 63 6b 20 6f  6e 20 74 68 65 20 27 52  |.Click on the 'R|
000006b0  65 70 65 61 74 20 77 69  74 68 20 6e 65 77 20 64  |epeat with new d|
000006c0  61 74 61 27 20 62 6f 78  20 20 61 6e 64 20 74 72  |ata' box  and tr|
000006d0  79 20 31 30 30 30 20 73  75 63 63 65 73 73 65 73  |y 1000 successes|
000006e0  2e 20 20 4e 6f 74 65 20  74 68 65 20 20 20 73 6d  |.  Note the   sm|
000006f0  6f 6f 74 68 65 72 20 73  68 61 70 65 20 6f 66 20  |oother shape of |
00000700  74 68 65 20 64 69 73 74  72 69 62 75 74 69 6f 6e  |the distribution|
00000710  2e 0a 43 6c 69 63 6b 20  6f 6e 20 27 73 68 6f 77  |..Click on 'show|
00000720  20 74 68 65 6f 72 65 74  69 63 61 6c 20 64 69 73  | theoretical dis|
00000730  74 72 69 62 75 74 69 6f  6e 27 20 74 6f 20 63 6f  |tribution' to co|
00000740  6d 70 61 72 65 20 74 68  65 20 65 78 70 65 63 74  |mpare the expect|
00000750  65 64 20 72 65 73 75 6c  74 73 20 77 69 74 68 74  |ed results witht|
00000760  68 6f 73 65 20 6f 62 73  65 72 76 65 64 2c 20 61  |hose observed, a|
00000770  6e 64 20 63 6c 69 63 6b  20 6f 6e 20 74 68 65 20  |nd click on the |
00000780  73 61 6d 65 20 62 6f 78  20 61 67 61 69 6e 20 74  |same box again t|
00000790  6f 20 66 6c 69 63 6b 20  62 61 63 6b 20 74 6f 20  |o flick back to |
000007a0  79 6f 75 72 20 20 20 20  20 20 20 20 6f 62 73 65  |your        obse|
000007b0  72 76 65 64 20 76 61 6c  75 65 73 2e 0a 54 72 79  |rved values..Try|
000007c0  20 74 68 69 73 20 63 6f  6d 70 61 72 69 73 6f 6e  | this comparison|
000007d0  20 77 69 74 68 20 64 69  66 66 65 72 65 6e 74 20  | with different |
000007e0  73 61 6d 70 6c 65 20 73  69 7a 65 73 2c 20 61 6e  |sample sizes, an|
000007f0  64 20 6e 6f 74 65 20 74  68 65 20 72 65 6c 61 74  |d note the relat|
00000800  69 76 65 20 76 61 6c 75  65 73 6f 66 20 74 68 65  |ive valuesof the|
00000810  20 6f 62 73 65 72 76 65  64 20 61 6e 64 20 74 68  | observed and th|
00000820  65 6f 72 65 74 69 63 61  6c 20 6d 65 61 6e 20 61  |eoretical mean a|
00000830  6e 64 20 76 61 72 69 61  6e 63 65 2e 0a           |nd variance..|
0000083d