TL;DR
Probability is a way to put a number on uncertainty. You list every outcome an experiment could have, then give each event (a set of outcomes) a weight from 0 (impossible) to 1 (certain). Three simple rules keep those weights consistent, and the rest of probability follows from them.
Where you'll see it: in a weather forecast's chance of rain, in the estimated odds of a server failing, and in the confidence score a classifier attaches to its answer.
Intuition
Start with a die, and you already know the idea. Before you roll, you cannot say which face will come up, but you can say something useful: a fair die shows an even number half the time, and a six one time in six. Probability is the tool for making statements like that precise when the outcome is unknown.
Three words do most of the work.
- The sample space, written (capital omega), is the set of all possible outcomes of one run of the experiment. For one die, .
- An event is a yes-or-no question about the outcome. Formally it is a subset of . "The roll is even" is the event .
- A probability is a number attached to each event , saying how likely that event is.
flowchart LR E[Experiment] --> O[Sample space: all possible outcomes] O --> V[Events: subsets of outcomes] V --> P[Probability: a number from 0 to 1 for each event]
Why bother with a formal treatment? Because intuition fails quickly. People routinely get "at least one of three things happens" wrong, and they mix up "A given B" with "B given A". A small set of rules gives you a way to check a calculation, so the answer stops depending on how confident you feel.
The math
Sample space and events
A probability space is a triple . Here is the sample space, is the collection of events we are allowed to ask about (each one a subset of ), and is a function that assigns each event a number.
For a finite sample space, can simply be every subset of . The extra conditions on (closed under complement and countable union) only matter for infinite sample spaces, so you can ignore them for now.
Events combine with set operations. For events and :
- The union is "A or B or both" happens.
- The intersection is "A and B both" happen.
- The complement is "A does not happen".
The three axioms
The function must obey three rules, the Kolmogorov axioms:
- Non-negativity. for every event .
- Normalisation. . Some outcome must occur.
- Additivity. If are pairwise disjoint (no two can happen together), then
Three useful consequences follow directly:
- , where is the impossible event with no outcomes.
- , so always.
- If , then .
The most useful consequence is the addition rule for events that can overlap. Split into two disjoint pieces, and :
The second line holds because splits into the disjoint pieces and . Subtracting the second line from the first removes and leaves the result.
Equally likely outcomes
When is finite and every outcome is equally likely, the probability of an event is its share of the outcomes:
Here is the number of outcomes in . This is where counting comes in: counting principles tell you how large a set is without listing it. The formula is only valid when the equal-likelihood assumption actually holds, and you have to justify that from the physical setup.
Worked examples
Roll one fair die. and each outcome has probability .
- Event : the roll is even. , so .
- .
- The complement is "the roll is odd", .
- Check with the complement rule: . This matches the direct count .
Interpretation: over many rolls, an even number comes up about half the time. Computing the answer two ways is a cheap habit that catches arithmetic slips.
Roll two fair dice. The sample space has 36 equally likely ordered pairs . Let be "the first die is even" and be "the sum is 7".
- has outcomes: 3 even choices for the first die and 6 for the second. So .
- , so .
- is "first die even and sum 7": , so .
- Apply the addition rule: .
- Check by counting: , so again.
Interpretation: adding and alone would count the three pairs in twice. Subtracting the overlap fixes that.
A job runs on three servers. Assume each one fails in a given hour with probability 0.01, and assume the failures are unrelated to each other. What is the chance that at least one fails?
- Let be "at least one server fails". Its complement is "no server fails".
- For one specific server, the chance it does not fail is .
- With unrelated failures, the chance that all three survive is .
- So , and .
Interpretation: in about 3 hours out of 100, some server fails, even though each server on its own fails only 1 hour in 100. Counting the complement is far easier than adding up the one-, two- and three-failure cases. The answer depends on the "unrelated" assumption. If the servers share a power supply, the real risk is higher.
Tradeoffs and failure modes
| Situation | What goes wrong | Better choice |
|---|---|---|
| Counting equally likely outcomes for a loaded die or a biased process | The formula gives confident, wrong answers | Estimate from frequencies over many trials, or build a model with explicit weights |
| Continuous outcomes, such as a height or a waiting time | Each exact value has probability 0, so says nothing useful about a single point | Ask about intervals, and use a [[probability-density-function |
| Adding probabilities of overlapping events | The overlap is counted twice | Use the addition rule and subtract |
| Multiplying probabilities of events that are actually related | The result is too small or too large | Model the dependence explicitly with [[conditional-probability |
| Sample spaces never written down | Outcomes are missed or double-counted | List the outcomes first, then count |
Probability also has two interpretations. The frequency reading treats as the long-run share of trials where happens. The belief reading treats it as a degree of confidence. Both obey the same axioms, and the mathematics does not tell you which one to use. Pick the one that matches your question.
History
Gambling was the first motivation. Girolamo Cardano wrote an early analysis of dice games in the 1560s, in Liber de ludo aleae, which was published only long after his death. The analysis counted equally likely outcomes, which is the idea behind the classical formula above.
In 1654, Blaise Pascal and Pierre de Fermat exchanged letters about the "problem of points": how to divide the stakes of a game that was interrupted before it finished. Their answer reasoned about the possible ways the game could have ended.
Christiaan Huygens published one of the first printed treatments of probability in 1657, De ratiociniis in ludo aleae. Jacob Bernoulli's Ars Conjectandi, published in 1713 after his death, proved an early form of the law of large numbers, which links long-run frequencies to probabilities.
The modern axioms came in 1933, when Andrey Kolmogorov published Grundbegriffe der Wahrscheinlichkeitsrechnung. He grounded probability in measure theory, which is the setup the probability space above follows.