![]() |
Synthia
Generic and flexible data structure generator
|
Uses RandomBoolean to simulate a series of biased coin tosses.
The program shows the number of times the picker produces "heads" (i.e. true) and compares this to the expected number of heads as dictated by the probability. A possible run of the program is:
Flips Heads Expected 100 31 30 200 58 60 300 84 90 400 119 120 500 155 150 600 188 180 700 218 210 800 251 240 900 282 270 1000 312 300
Definition at line 45 of file BiasedCoin.java.
Static Public Member Functions | |
| static void | main (String[] args) |
|
static |
Definition at line 47 of file BiasedCoin.java.