Math Extras!‎ > ‎

Mathematics of Luck - Probability

Most games gives many concrete examples of getting "lucky" and "unlucky." Examining these concepts requires the study of probability.


Understanding Probability of Success/Failure with Repeated Events

Some events are difficult to predict. In video games or card games, generally probabilities are fixed and easy to grasp. For example, let's say you have a 10% chance to obtain new boots from an boss in a video game that will enhance your abilities in the game (you have a 90% chance to fail). In the likely event that you don't get the new boots, you might feel inclined to try facing the boss again and have another go at that 10% chance. Again, you are unlikely to get them. Then you try again and fail. The cycle continues. 

The question arises: How many attempts will it take you to get them? You might be thinking "10 attempts and I will surely get them!" However, this is not the case. At 10 attempts you are likely to get them, but it is not guaranteed. There is also the chance that you get them after just a few attempts as well. Again, it is unlikely, but can happen. Here is another common misconception: If you make two attempts with a success rate of 10% this implies you have a 20% chance of success. This sort of thinking is never true and can lead to improper understanding of probability.

I think it is important to mention that the mathematical idea of good luck is being successful despite having a high chance of failure and the mathematical idea of bad luck is failure despite having a high chance of success.

    Example of Bad Luck - Texas Hold'Em Poker: Let's say you are playing against just one other person (called "heads up"). Let's say you have two Kings, a rare and great hand in Poker. Unfortunately, your opponent has two Aces, an 
         equally rare but even better hand than yours. While the chance of getting these hands is equal, the chance of both of you getting these great hands at the same time is very very low. In this scenario, you are unlucky because
         your two Kings have an 82.4% chance of being better than a random hand. Quite favorable! However, your opponent's hand is one of the few hands that are stronger than yours.  This is bad luck because even though you have 
         great odds, your opponent's are betterAnd here is the key Poker: You don't know what cards your opponent has. You only know how good your hand is. The odds of them having two Aces is less than one percent! In 
         situations like this, it is likely that you bet money on your Kings because it is an awesome hand (and is generally a very lucky hand to get). However, your opponent will likely bet even more because their hand is even     
         betterNote - In this situation, the person with Aces is doubly lucky in that: 1. They have an outstanding hand (unlikely).  2. They are going up against another amazing hand which they will likely beat (Aces are an 81% favorite) 
         and their opponent won't be expecting it.
         
    Example of Good Luck - Continuing in the example from above. In Poker, you are dealt five "community cards" that you can use to improve your hand. Again let's say you have two Kings and your opponent has two Aces. Let's say 
         that the first four cards (called the "flop" and "turn") are inconsequential and don't improve either of your hands. At this point, the only way you could beat the two Aces is if the fifth community card (called the "river") turned 
         out to be a King which would give you three Kings (better than two Aces). The odds of a third King coming up at this point would be 4.5%. So, if it happens and you end up winning by getting a third King on the river you would 
         be the lucky one now because you won in a situation with the odds were astronomically stacked against you (95% in your opponent's favor). 

    Hot Streaks: Are they a fallacy? - People often consider themselves "on a hot streak" if they are repeatedly succeeding and/or getting lucky. People who are consider themselves on a hot streak will often keep gambling or gaming or          rolling the dice. So they question is - are hot streaks real or not? The answer depends on the situation. In games of chance like Poker or video games the answer is generally that there is no such thing. Probabilities are 
         controlled by random number generators or shuffling of cards and are not predictable, so if you have already "gotten lucky" multiple times there is no predicting whether you will continue to get lucky. However, in games of skill like say 
         basketball or bowling, hot streaks are a real thing due to other factors. Like for example, in basketball, let's say LeBron James makes five 3-point shots in a row. Let's say his usual 3-point make percentage is 40%. While there is 
         a low chance of him making 5 in a row (1%), it is a reality and happens due to physical factors such as being "in a rhythm" (physical mechanics repeatedly done correctly), or being healthy and rested, or having confidence 
         (a psychology of success), or having weak opposition. In situations like this, the player may legitimately be "hot" and have an increase in their probability of success. However, it's not guaranteed to continue. Additionally, the 
         other team might take greater measures to stop the hot streak which could actually reduce his probability of success.


Another question arises - How do you calculate probabilities of success?

The binomial distribution or probability mass function is a mathematical formula that calculates these probability of success situations precisely.      
  • p is the probability of success
  • x is the number of attempts
  • n is the number of winning/successful attempts
The function itself will return the probability of getting exactly n successful attempts in x total attempts where the probability of success is p. It is pretty complicated, so let's start with some examples.

Example 1 - Coin Flips
The probability of flipping heads or tails is 50% on an unweighted coin. Let's say we wanted to find the probability of flipping 5 heads in a row. Flipping heads would be considered a success and individual probability would be 50% or p=0.50. Since we will be doing 5 attempts -> x=5, and since we want them all to be successful attempts -> n=5 also. 


So we would have ~3.1% chance to flip 5 heads in a row. Additionally, we could try to adjust the parameters to see how it affects the probability mass function. 

Let's say we wanted to calculate the probability that we would flip 3 heads out of 5 total flips. 

So we would have ~31.2% chance to flip precisely 3 heads out of 5.


Example 2 - Obtaining a Rare Item from a Video Game Boss
Returning to the 10% chance at obtaining new boots from the video game boss, p=0.1 (10% drop chance) and n=1 (once we have one successful attempt, that means we have the boots and probably won't feel inclined to face the boss again). So, let's plug in those value and examine the function.

...

Another question - What was that crazy function? How do I understand or remember it?


Work in progress, to be continued...


Comments