A B C D E F G H
1 Example 2.1: Coin Tossing (with 4 Solutions)
2 Click the button, or hit the F9 key, to recalculate the spreadsheet and generate a new trial.
3
4
Cumulative You may change the Example by changing any
5 Coin Probability
Probability of the values with a green background.
6
7 Head 0.50 0.50
8 Tail 0.50 1.00
9 Seed for Random Numbers 12345
10 Number of Tosses = 10
11 Solution
Solution #1A #1B Solution #2A
12 Solution Solution Solution
13 using RN using using RN
14 Toss RAND( ) from Col C RAND( ) Toss Rnd01( ) from Col G
15 1 0.4954569 H T 1 #VALUE! #VALUE!
16 2 0.8374831 T T 2 #VALUE! #VALUE!
17 3 0.5563077 T T 3 #VALUE! #VALUE!
18 4 0.5831932 T T 4 #VALUE! #VALUE!
19 5 0.1043297 H H 5 #VALUE! #VALUE!
20 6 0.7641183 T H 6 #VALUE! #VALUE!
21 7 0.9387587 T T 7 #VALUE! #VALUE!
22 8 0.3451754 H T 8 #VALUE! #VALUE!
23 9 0.8379747 T T 9 #VALUE! #VALUE!
24 10 0.5657718 T H 10 #VALUE! #VALUE!
25
26 This example uses two different RNG (random number generators): namely, RAND() and
27 Rnd01().
28
29 With RAND() in Columns C:E, there is no way to set the RNG seed. Therefore, each click of
30 either button (or F9 to recalculate) always changes the results.
31
In contrast, with Rnd() in Columns G:I, clicking "Reset Seed & Run" always produces the same
32 results in those columns. Clicking "Generate New Trial" produces new results since it uses
33 different random numbers on each click.
34
35 Being able to set the RNG seed allows for controlled experimentation.
36
I J K L M
Solutions) 1
2 a new trial.
et and generate
3 Frequency of Heads
4 and Tails
the Example by changing any Bins Frequency
5
a green background. H 0
6
7 T 0
8
9 Reset Seed sets the RN seed.
10 then runs a new trial.
11 Solution
#2B NOTE: Solution #2B is the
12 recommended solution.
Solution
13 using
14 Rnd01( )
15 #VALUE!
16 #VALUE! Frequency of Heads and
17 #VALUE! Tails from Solution #2B
18 #VALUE!
19 #VALUE!
8
Occurrences
20 #VALUE!
21 #VALUE!
22 #VALUE! 4
23 #VALUE! 0 0
24 #VALUE! 0
25 H T
Bin
26
ors): namely, RAND() and
27
28
eed. Therefore,29each click of
30
31
Run" always produces the same
ces new results32
since it uses
33
34
tation. 35
36
Experiment: No Experiment for this Example
12345
Explanation of Model Logic: