Basic probability

Successive wins

You signed up for a tennis tournament in which you win a prize if you win (at least) two successive games in a row of three. Your two opponents are your friend and the club champion. Given the option to play friend-champion-friend or champion-friend-champion, which scenario would you pick? What is the expected number of wins in each case?

Let the probability of winning against your friend be and against the chamion be . We know that .

Putting the comparison of the two scenarios aside, let us try to compute the probabilities of two successive wins. To get two successive wins in a row of three games, we should either win all three, lose the first one only, or lose the last one only. If we are playing friend-champion-friend, the total probability is Likewise, the probability of two successive wins in a champion-friend-champion setup is

We are now ready to compare the the scenarios. Since , it follows that , so At first glance, this may be surprising and counter-intuitive. Why should we opt to play the more seasoned player twice, if we can do that only once? The answer lies in the middle game. If we loose it, then no matter how well we play the first and third games, we cannot obtain two successive wins. In the friend-champion-friend scenario, the middle game is the hardest one, hence the lower overall chance of two successive wins.

Flippant juror

As part of his jury duty, an undergraduate student was chosen to participate in a jury of three members (majority rules). To express his disinterest in the case, he decides to vote by flipping a fair coin. The other two members of the jury independently will make the right decision with probability . How does this arrangement compare to a single member jury which decides on the correct outcome with the same probability ?

The three person jury would decide on the right outcome only if at least two of the members choose that option. There are four voting scenarios which lead to this outcome: all correct, first two correct, first and third correct, second and third correct. Adding them up, we get It turns out the three member jury is as efficient as a single member jury!

First six

How many times do you need to throw a die on average before you get a 6?

The is the prototypical example of a geometric distribution. Since the probability of throwing a is , the expected number of throws is .

Let us go over the derivation of this result. Instead of using a die, imagine we have a coin which comes up heads with probability , and we are interested in the expected number of throws until we get heads. The probability of getting heads for the first time in the -th throw is The expected value of is Note that we used the formula . For more information, see the discussion of generating functions.

Perfect hand

In a game of bridge, what is the probability that you are dealt a perfect hand (13 cards of one color)?

Walking in Manhattan

Imagine a city whose streets form a perfect grid. Starting at the point with coordinates , how many ways are there to walk to the intersection in steps?

The key to this problem is finding a suitable interpretation of the suitable paths. Given a path, we will associate to it a list of instructions X and Y: "X" stands for a step in the positive -direction (right), and likewise for "Y". A path between and must be made up of instructions, of which are X and the remaining Y. Conversely, given such a string of Xs and Ys, we can construct a path.

We have reduced the problem to counting strings of length with Xs and Ys. The answer to this simple combinatorial problem is

A personal taste for money

Ten white and ten black balls are placed in an urn. You are allowed to choose one of the two colors. A ball is drawn from the urn, and it the color matches you get $10. If the colors are not a match, there is no prize. If the game is to be played only once, how much are you willing to pay for it?

The probability of getting matching colors is , so the expected value of the game is Whether anyone would be willing to pay $5 for this game is an entirely different question. First, if we were allowed to play the game many times, and we paid less than $5 for it, we expect to have positive earnings. On the other hand, there is no reason to pay more than $5 from the game, that is, unless we derive additional gains by playing this game (e.g., it is enjoyable, we network, etc.).

If we are only allowed to play once, paying $5 seems like an even steeper price. In the end of the day, making a decision requires weighing the possibility of wining $5 against the possibility of loosing $5. The point of this discussion is that expected value is useful when evaluating games, but it should not be the only criterion we take into consideration. There are numerous additional factors, but one should always look at the variance and any potential stop limits.

St. Petersburg paradox

A casino offers a game in which a fair coin is tossed at each stage. The initial steak is $$2$. If the coin comes up tails, you receive the steak. If we get heads, the steak is doubled, and the process repeats. How much should they charge for this game?

What if every time we get heads, the steak is increased by one? How much should they charge?

Even split

What is the probability of getting exactly 50 heads if you flip 100 fair coins? Can you find a concrete figure approximating the result without using additional computational power?

The probability for obtaining an even split is To get an approximate value, we will use the Stirling's approximation formula which states that Substituting, we can simplify the expression above to Without approximations, the actual value is closer to .

It is worth noting that we computed there is almost 8% chance of getting an even split between heads and tails when using 100 coins. Depending on prior experience, this may intuitively appear as a fairly high value.

An even number of heads

You flip fair coins independently. What is the probability to get an even number of heads?

We can iterate over all even integers between and and add up the probabilities for obtaining that particular number of heads. The resulting expression is Trying out some small values for , it is easy to see that the answer is 1/2 independently from .

There is a simple trick which helps us evaluate the expression above. Recall the formula Replacing with , we get Adding and subtracting the two allows us to filter only even or odd values for : Plugging in , we find that

In fact, this line of reasoning generalizes substantially. We can use it to show that given arbitrary coins (not necessarily fair), the probability of obtaining an even number of heads is if and only if at least one of the coins is fair.

It is worth mentioning that the problem has a very simpler but less enlightening solution. Imagine we have a configuration of coins, and we take the first one and flip it. If we started with an even configuration, we end up with an odd one, and vice versa. This line of reasoning shows that there are equal number of even and odd arrangements. Since all configurations of coins are equally likely, it follows that the probability of getting an even (or odd) one is exactly .

Alternatively, it is also possible to solve this problem by induction. Consider a sequence of coin tosses and associated random variables such that if the $i$-th toss came up heads, and otherwise. Since all coins are fair, we know that Then set . As a base case, we note Next, assume that . We can use conditional probability to compute

Collecting famous mathematicians

Tasty-o-crunch, a new brand of cereal, decided to include cards featuring famous mathematicians with their product. Each box contains one of 10 possible cards all of which are equally likely to appear. How many boxes of cereal do you need to buy on average to get a complete set?

This problem may appear somewhat difficult at first, but there is a simple observation which leads to a solution. It is worth spending a bit of time grappling with the problem in order to get a better sense where the difficulty lies.

Let denote the number of boxes it takes us to collect distinct mathematicians. Clearly, . Once we have our first card, the probability of drawing the same one is . If we think of this as a coin which comes up tails with probability , the expected number of boxes we need to buy before obtaining our second card is . This shows that . Continuing this line of reasoning, we compute Adding all of these, we find the desired answer

What if there were 100 distinct cards instead of 10? The sum is much more tiresome to compute. Fortunately, there is an approximation we can use: Here denotes the Euler-Mascheroni constant. Using the approximation, we find that .

The advantages of using the Euler-Mascheroni approximation are twofold. First, we can compute in constant time, whereas the original formula would require linear time in . Second, for large values of floating point errors can accumulate quickly, so using the original formula may actually lead to a worse approximation of the actual value than the Euler-Mascheroni approximation.

The second best

Eight players enter a tennis tournament with a bracket structure. Suppose that the best player will always win against the second best, who in turn wins against the next best, and so on. If the first round allocation is random, what is the probability that the second best player will play in the final? What if the tournament included players?

The rock-paper-scissors tournament

Two friends enter a rock-paper-scissors bracket with $6$ other players. All players are evenly matched, so the probability of winning any particular game is 1/2. If the initial arrangement is random, what is the chance that the two friends will face each other at some point during the tournament? What is the answer if the tournament has players in total?

Comparing an

Amy has fair coins, while her brother Brad only has . If both flip all of their coins, what is the probability that Amy will end up with more heads than Brad?

Singles row

A number of single men and women independently bought tickets for a movie, and they end up sitting in a single row. If a man and a woman occupy adjacent seats, we will call them a potential couple. Assuming that the seating arrangement is random, and there are men and women, how many potential couples are there on average?

Two loans

An aspiring loan shark, Tony, has made two month-long loans. He becomes worried that some of them will default. After a sleepless night of computations, he figures out that the chance of default for the first loan is 10%, and for the second is 20%. What are the possible values for the probability that at least one of the loans will default? What are the possible correlations between the two events?

Fair from unfair

You are given a coin, but you are afraid it is not fair. Is it possible to simulate a fair coin using it? You can assume successive tosses are independent.

Fair from unfair

Conversely, imagine that you have a fair coin. How can you simulate a coin which comes up heads with probability ?