164 ◾ Simple Statistical Methods for Software Engineering
Life Is a Random Variable
Results, in general, are random in nature; some could be in our favor and some not.
Process results do not precisely remain favorable all the time, neither do they become
unfavorable all the time. Results toggle between favor and disfavor, randomly.
The measure of the probability of an event is the ratio of the num-
ber of cases favorable to that event, to the total number of cases.
René Descartes
e discovery of probability goes back to the Renaissance times (see Box 11.1).
A process that toggles between favor and disfavor is called the Bernoulli process,
named after the inventor. Mathematically, a Bernoulli process takes randomly only
two values, 1 and 0. Repeated flipping a coin is a Bernoulli process; we get a head or
tail, success or failure, “1 or 0.” Every toss is a Bernoulli experiment. e Bernoulli
random variable was invented by Jacob Bernoulli, a Swiss mathematician (see Box
11.2 for a short biography).
Results from trials converge to the “expected value” as the number increases.
In an unbiased coin, the “expected value” of the probability of success (probability
of appearance of heads) is 0.5. More number of trials are closer to the value of the
probability of success. is is known as the law of large numbers. Using this law,
we can predict a stable long-term behavior. It took Bernoulli more than 20 years
to develop a sufficiently rigorous mathematical proof. He named this his golden
Fermat and Pascal helped lay the fundamental groundwork for the theory
of probability. From this brief but productive collaboration on the problem of
points, they are now regarded as joint founders of probability theory. Fermat
is credited with carrying out the first ever rigorous probability calculation. In
it, he was asked by a professional gambler why if he bet on rolling at least one
six in four throws of a die he won in the long term, whereas betting on throw-
ing at least one double-six in 24 throws of two dice resulted in his losing.
Fermat subsequently proved why this was the case mathematically. (http://
en.wikipedia.org/wiki/Problem_of_points)
Christiaan Huygens (1657) gave a comprehensive treatment of the subject.
Jacob Bernoulli’s Ars Conjectandi (posthumous, 1713) put probability on
a sound mathematical footing, showing how to calculate a wide range of
complex probabilities.