coin_simulation
coin_simulation,
an Octave code which
looks at ways of simulating or visualizing the results of
many tosses of a fair or biased coin.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the MIT license
Languages:
coin_simulation is available in
a MATLAB version and
an Octave version.
Related Data and Programs:
coin_simulation_test
octave_simulation,
an Octave code which
uses simulation to study card games, contests, and other processes
which have a random element. Usually, the purpose is to try to
predict the average behavior of the system over many trials.
Source Code:
-
coin_average_plot.m,
displays the running averages of N tosses of a coin.
-
coin_barchart.m,
displays a barchart of Heads versus tails after N tosses of a coin.
-
coin_biased.m,
simulates N tosses of a biased coin;
-
coin_plot.m,
displays the tosses in a sequence of N tosses of a coin.
-
coin_sign_plot.m,
displays the sign (-1, 0 or +1) of the running sum of N tosses
of a fair coin.
-
coin_streak.m,
indicates streaks of the same value in N tosses of a coin.
-
coin_streak_plot.m,
displays the Head/Tail streaks in N tosses of a coin.
-
coin_sum_plot.m,
displays the running sums of N tosses of a coin.
-
coin_uniform.m,
simulates N tosses of a fair coin;
-
coins_average_plot.m,
displays the running averages of M sets of N tosses of a coin.
-
coins_biased.m,
simulates M sets of N tosses of a biased coin;
-
coins_plot.m,
displays the tosses in M sequences of N tosses of a coin.
-
coins_sum_plot.m,
displays the running sums in M sets of N tosses of a coin.
-
coins_uniform.m,
simulates M sets of N tosses of a fair coin;
-
r8row_print.m,
prints an R8ROW;
-
r8row_print_some.m,
prints some of an R8ROW;
-
r8row_running_average.m,
computes the running averages of an R8ROW;
-
r8row_running_sum.m,
computes the running averages of an R8ROW;
-
r8row_uniform_ab.m,
returns an R8ROW of scaled pseudorandom numbers;
-
r8vec_print.m,
prints an R8VEC;
-
r8vec_running_average.m,
computes the running averages of an R8VEC;
-
r8vec_running_sign3.m,
computes the running sign3 of an R8VEC;
-
r8vec_running_sum.m,
computes the running averages of an R8VEC;
Last modified on 15 November 2022.