Graphics Programs Reference
In-Depth Information
The histogram confirms our impression that there is a wide variation in the
outcomes after 100 games. The house is about as likely to have lost money
as to have profited. However, the distribution shown above is irregular
enough to indicate that we really should run more trials to see a better
approximation to the actual distribution. Let's try 1000 trials.
hist(profits(100, 1000), -40:2:40); axis tight
80
70
60
50
40
30
20
10
0
40
30
20
10
0
10
20
30
40
According to the Central Limit Theorem , when both n and k are large, the
histogram should be shaped like a “bell curve”, and we begin to see this
shape emerging above. Let's move on to 10,000 trials.
hist(profits(100, 10000), -40:2:40); axis tight
700
600
500
400
300
200
100
0
40
30
20
10
0
10
20
30
40
Search WWH ::




Custom Search