Probability is a measure that describes the likelihood of a particular event occurring within a set of possible events. It is expressed on a scale ranging from 0 (indicating that an event is impossible) to 1 (indicating that an event is certain). It can also be expressed as a percentage between 0% and 100%.
Probability provides a framework for quantifying the uncertainty associated with predictions, inferences, decisions and random events. To understand and calculate it, it is essential to understand the following concepts:
The probability of an event is calculated as the ratio of the number of favorable outcomes for that event to the total number of outcomes in the sample space. For example, the probability of getting an even number when rolling a die is:
As we have seen, an event is the result of a random experiment and always has a probability associated with it. Often we may be interested in relating the probabilities between two events, and this is done through operations between events.
The event that occurs if at least one of the two events occurs. It is denoted by . For example, if is the event of getting a 2 on a die roll and is the event of getting a 3, then is the event of getting a 2 or a 3.
The event that occurs if both events occur at the same time. It is denoted by . For example, if is the event of getting a number less than 4 and is the event of getting an even number, then is the event of getting a 2 (because it is even and the only number less than 4).
The event that occurs if the given event does not occur. It is denoted by . For example, if is the event of getting an even number by rolling a die, then is the event of getting an odd number.
The event that occurs if the first event occurs but not the second. It is denoted by . For example, if is the event of obtaining a number less than 4 and is the event of obtaining an even number, then is the event of obtaining a 1 or a 3.
There are several types of probability, each suitable for different contexts or situations. Some of the most common are:
These types of probability allow addressing different situations and problems in the field of statistics and probability, and are fundamental in many applications, including decision making, Machine Learning and scientific research.
Bayes' theorem is a fundamental tool in statistics that allows us to update our beliefs in the face of new evidence.
Let's imagine we have a bag with 100 marbles: 30 are red and 70 are blue. If we draw a marble at random, the probability that it is red is 30% and the probability that it is blue is 70%. Now, suppose a friend, unseen by us, picks a marble out of the bag and says, "The marble I picked has stripes on it." If we now knew that 50% of the red marbles have stripes and only 10% of the blue marbles have stripes, given this new information, what is the probability that the marble our friend chose is red? This is where Bayes' theorem applies.
This way we can recalculate the probability that the marble is red and has stripes, given the new information.