Synthia
Generic and flexible data structure generator
examples.basic.BiasedCoin Class Reference

Detailed Description

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
Author
Sylvain Hallé

Definition at line 45 of file BiasedCoin.java.

Static Public Member Functions

static void main (String[] args)
 

Member Function Documentation

◆ main()

static void examples.basic.BiasedCoin.main ( String[]  args)
static

Definition at line 47 of file BiasedCoin.java.


The documentation for this class was generated from the following file: