Probability
The foundations of probability theory, from basic events to distributions and random variables.
https://morrisonkuhlsen.com/en/probability/
Probability
Probability is the area of Mathematics that studies uncertain phenomena. It lets us measure, compare and interpret the chances that something happens, helping us understand situations whose outcome cannot be predicted with complete certainty.
What is Probability?
Probability comes in whenever we deal with situations that involve uncertainty.
When we toss a coin, we don’t know for sure whether it will land heads or tails.
When we roll a die, we don’t know in advance which face will come up.
When we watch a queue, we don’t know exactly how long the next person will wait.
Even so, we can study these situations mathematically.
Probability answers questions such as:
- What is the chance that an event happens?
- Which outcomes are possible?
- Does one event influence another?
- How do we compute the chance that several events happen together?
- How do we make decisions under uncertainty?
Random experiment, sample space and event
Before computing probabilities, we need three fundamental ideas.
Random experiment
A situation whose outcome cannot be predicted with certainty before it happens. Example: tossing a coin, rolling a die or drawing a card.
Sample space
The set of all possible outcomes of a random experiment. It is usually written with the Greek letter Ω.
Event
Any subset of the sample space. In other words, a collection of outcomes that we want to analyze.
Example: rolling a die
When we roll an ordinary die, the possible outcomes are:
If we want to study the event “an even number comes up”, we have:
Here the event \(A\) is a subset of the sample space \(\Omega\).
The classical definition of probability
When all outcomes are equally likely, we can compute the probability of an event as the ratio:
When rolling a die, the probability of getting an even number is:
So the chance of getting an even number is:
The possible values of a probability
Every probability lies between 0 and 1.
This means that:
| Value | Interpretation |
|---|---|
| $$P(A)=0$$ | The event is impossible. |
| $$P(A)=1$$ | The event is certain. |
| $$0 < P(A) < 1$$ | The event is possible, but uncertain. |
The complement of an event
The complement of \(A\) is everything in the sample space that is not in \(A\).
It can be written as:
The probability of the complement is:
Example
If the probability that it rains today is:
Then the probability that it doesn’t rain is:
So the chance that it doesn’t rain is:
Union and intersection of events
In Probability we often study how two or more events relate to each other.
| Operation | Notation | Meaning |
|---|---|---|
| Union | $$A \cup B$$ | Event A happens, or event B, or both. |
| Intersection | $$A \cap B$$ | A and B happen at the same time. |
| Complement | $$A^c$$ | Event A does not happen. |
The addition rule
The addition rule gives the probability that \(A\) or \(B\) happens.
The term \(P(A \cap B)\) is subtracted because, when we add \(P(A)\) and \(P(B)\), the part the two events share is counted twice.
If \(A\) and \(B\) are mutually exclusive:
Conditional probability
Conditional probability measures the chance that an event happens given that another event has already happened.
The notation is:
It reads:
The probability of A given B.
The formula is:
provided that:
The multiplication rule
From conditional probability we get the multiplication rule:
We can also write:
This rule is very useful when we want the probability that two events happen together.
Independent events
Two events are independent when one happening does not change the probability of the other.
If \(A\) and \(B\) are independent, then:
and also:
Example
Tossing a coin twice is a textbook case of independence.
The result of the first toss does not change the result of the second.
If we want the probability of heads on both tosses:
So the chance is:
Bayes’ Theorem
Bayes’ Theorem is one of the most important ideas in Probability.
It lets us update a probability when we receive new information.
Where:
- \(P(A)\) is the initial probability of \(A\);
- \(P(B \mid A)\) is the probability of observing \(B\) given that \(A\) happened;
- \(P(B)\) is the total probability of \(B\);
- \(P(A \mid B)\) is the updated probability of \(A\) after observing \(B\).
Random variable
A random variable is a function that assigns numbers to the outcomes of a random experiment.
For example, when tossing two coins, we can define:
X = the number of heads obtained.
The sample space is:
where:
- \(H\) stands for heads;
- \(T\) stands for tails.
The random variable \(X\) can take the values:
| Outcome | Value of X |
|---|---|
| $$TT$$ | 0 heads |
| $$HT$$ or $$TH$$ | 1 head |
| $$HH$$ | 2 heads |
Expected value
The expected value is the theoretical mean of a random variable.
For a discrete random variable:
It does not have to be a value that actually shows up in the experiment.
It represents the average behavior we expect in the long run.
Variance of a random variable
The variance measures how spread out the random variable is around its expected value.
An equivalent and widely used form is:
The standard deviation is:
Probability distributions
A probability distribution describes how probability is spread across the possible values of a random variable.
| Distribution | Type | Common use |
|---|---|---|
| Bernoulli | Discrete | Experiments with only two outcomes: success or failure. |
| Binomial | Discrete | Counting successes in a fixed number of trials. |
| Poisson | Discrete | Counting occurrences in an interval of time or space. |
| Normal | Continuous | Modeling phenomena that are roughly symmetric around the mean. |
| Exponential | Continuous | Waiting time until an event occurs. |
The Bernoulli distribution
The Bernoulli distribution models an experiment with only two possible outcomes:
- success;
- failure.
If \(X\) follows a Bernoulli distribution with parameter \(p\), we write:
The probability function is:
for:
The Binomial distribution
The binomial distribution is used when we have:
- a fixed number of trials;
- independent trials;
- only two possible outcomes in each trial;
- the same probability of success in every trial.
If \(X\) follows a binomial distribution, we write:
The probability function is:
where:
- \(n\) is the number of trials;
- \(k\) is the number of successes;
- \(p\) is the probability of success.
The Poisson distribution
The Poisson distribution is used to model counts of events in an interval.
Examples:
- the number of customers who join a queue per hour;
- the number of calls received per minute;
- the number of accidents on a given stretch of road;
- the number of defects in a part.
If \(X\) follows a Poisson distribution with parameter \(\lambda\), we write:
Its probability function is:
where:
- \(\lambda\) is the average rate of occurrence;
- \(k\) is the number of occurrences.
The Normal distribution
The normal distribution is one of the most important distributions in Statistics.
It is bell-shaped, symmetric around the mean, and shows up in many natural, social and economic phenomena.
If \(X\) follows a normal distribution, we write:
Its density function is:
Where:
- \(\mu\) is the mean;
- \(\sigma\) is the standard deviation;
- \(\sigma^2\) is the variance.
A worked example: tossing coins
Consider the experiment of tossing a coin 3 times.
We want the probability of getting exactly 2 heads.
Here:
- number of trials: \(n = 3\);
- number of successes we want: \(k = 2\);
- probability of heads: \(p = \frac{1}{2}\).
We use the binomial distribution:
Since:
we have:
Therefore:
A worked example: an ordinary die
Consider rolling a fair die.
We want the probability of getting a number greater than 4.
The sample space is:
The event we want is:
So:
So the chance of getting a number greater than 4 is approximately:
How to read probabilities
| Probability | Intuitive reading |
|---|---|
| 0% | The event does not happen. |
| 25% | The event has a low chance of happening. |
| 50% | The event is as likely to happen as not. |
| 75% | The event has a high chance of happening. |
| 100% | The event happens for certain. |
Probability in practice
Probability shows up in many fields:
Statistics
It is the foundation of statistical inference, hypothesis tests, confidence intervals and probabilistic models.
Data science
It is used in predictive models, classification, machine learning and uncertainty analysis.
Queues and service
It helps study customer arrivals, waiting times, service capacity and the risk of congestion.
Games and draws
It lets us compute the odds in dice, cards, lotteries, coins and other random experiments.
Overview
| Concept | Main idea |
|---|---|
| Random experiment | A situation whose outcome is not known in advance. |
| Sample space | The set of all possible outcomes. |
| Event | A subset of the sample space. |
| Probability | A numerical measure of the chance that an event happens. |
| Conditional probability | The chance that an event happens given that another one has. |
| Independence | When one event does not change the probability of the other. |
| Random variable | A function that assigns numbers to the outcomes of a random experiment. |
| Probability distribution | How probability is spread across the possible values. |
Probability is the mathematical language of uncertainty. It lets us study random phenomena rigorously, compute chances, update what we know and make better-informed decisions when the outcome is not guaranteed.
“Probability theory is nothing but common sense reduced to calculation.”
— Pierre-Simon Laplace