Math and Logic in Games
with the numbers early on in the process can save considerable work
during testing and debugging.
One drawback in taking a class in probability and statistics is
that it usually assumes the student already has a basic understanding
of calculus, which is used to nd many solutions. However, there are
online websites that can oer some basic understanding of probabil-
ity without getting into too much detail.
e simplest probability is the ip of a coin, where there are only
two possible results (ignoring the probability of the coin landing on
its edge)—heads or tails. ere is a 50% chance of either result with
a ip. If the coin is ipped twice, there is still a 50% chance that the
result will be heads or tails. However, to see how oen either two
heads or two tails come up, a simple chart can be created with the
possible results (see Table 3.1)
ere is a 25% chance for any of these results. However, the like-
lihood of a coin coming up twice either heads or tails is only half that
of getting one heads and one tails. at is, there is a 50% chance of
tossing a heads and tails and only a 25% chance of tossing either two
heads or two tails.
As a coin is ipped more oen, it becomes less and less likely
to get all heads or all tails. With three ips, there are eight possible
results, and there is a two-in-eight chance (25%) to get all heads or
all tails, and a 75% chance to get a mixed result. Likewise, with four
ips, there are sixteen possible results, and there is a two-in-sixteen
chance (12.5%) to get all heads or all tails, and an 87.5% chance to
get a mixed result. Each time an extra ip is added, the results are to
First Toss Second Toss
Table 3.1. Results for two coin ips.