# Conditional Probability

> Conditional probability is the chance of an event given that another has happened. Learn the formula, trading examples, base rates and how to use filters properly.

Source: https://learn.tradelabsai.com/math/conditional-probability/  
Track: Math and Statistics · Level: Intermediate · Updated: 2026-10-03  
Publisher: TradeLabs AI (https://tradelabsai.com). Education, not financial advice.  
Cite as: TradeLabs Learn, "Conditional Probability", https://learn.tradelabsai.com/math/conditional-probability/

Conditional probability answers the question: given that something has happened, how likely is something else? The chance that a stock rises tomorrow might be about 50% on its own, but the chance that it rises given that it just reported a large earnings beat may be different. Most useful trading questions are conditional: what is the win rate of this setup when the trend is up, or when volatility is high? Understanding conditional probability helps traders build better filters and avoid common reasoning errors.

## The formula

```
P(A | B) = P(A and B) / P(B)
```

Read P(A | B) as "the probability of A given B".

## A trading example

**Example: A trend filter**
Over 1,000 historical signals for a pullback setup:

| | Uptrend | Downtrend | Total |
|---|---|---|---|
| Win | 360 | 140 | 500 |
| Loss | 240 | 260 | 500 |
| Total | 600 | 400 | 1,000 |

- P(win) = 500 / 1,000 = 50%
- P(win | uptrend) = 360 / 600 = 60%
- P(win | downtrend) = 140 / 400 = 35%

The setup's overall win rate is 50%, but conditional on an uptrend it is 60%. Taking only uptrend signals improves the win rate, at the cost of fewer trades. Whether it improves expected value also depends on win and loss sizes. See [Expected Value](https://learn.tradelabsai.com/math/expected-value/).

## Why conditional thinking matters

- **Filters:** trend filters, volatility filters and time of day filters are all conditional probabilities. See [Combining Signals](https://learn.tradelabsai.com/research/combining-signals/).
- **Regimes:** a strategy's win rate can differ greatly between calm and volatile markets. See [Structural Breaks and Regime Changes](https://learn.tradelabsai.com/math/regime-changes/).
- **Risk:** the probability of a large loss given a gap or news event is higher than unconditionally.
- **Correlation:** if one position loses, the probability that related positions also lose rises. See [Correlation Management](https://learn.tradelabsai.com/portfolio/correlation-management/).

## Common mistakes

### Confusing P(A | B) with P(B | A)

The probability of a crash given that the VIX spiked is not the same as the probability of a VIX spike given a crash. Nearly every crash comes with a VIX spike, but many VIX spikes are not followed by crashes. Mixing these up is called the inverse fallacy. Bayes' theorem connects the two. See [Bayes' Theorem](https://learn.tradelabsai.com/math/bayes-theorem/).

### Ignoring base rates

A pattern that appears before 80% of big rallies sounds powerful. But if the pattern also appears constantly at other times, and big rallies are rare, the chance of a big rally given the pattern may be small.

**Example: Base rates matter**
Big rallies (more than 5% in a week) occur in 2% of weeks. A signal appears before 80% of those rallies, but also in 20% of all other weeks. Using Bayes' theorem: P(rally | signal) = (0.80 × 0.02) / (0.80 × 0.02 + 0.20 × 0.98) = 0.016 / 0.212 ≈ 7.5%. A signal that "comes before most big rallies" still fails more than 90% of the time. See [Bayes' Theorem](https://learn.tradelabsai.com/math/bayes-theorem/).

### Overfitting conditions

Adding many conditions can produce high win rates on historical data by chance. Each extra filter reduces sample size. Conditions should make economic sense and be tested out of sample. See [Overfitting and Curve Fitting](https://learn.tradelabsai.com/research/overfitting-and-curve-fitting/).

## Independence

Events A and B are independent if P(A | B) = P(A). Coin flips are independent; trading outcomes often are not. Assuming independence when outcomes are related underestimates risk.

## Checking a filter honestly

When you add a condition, record how many trades remain and whether the improvement holds in a later period you did not use to choose the filter. A filter that lifts the win rate from 50% to 60% on 600 trades in one period, and from 50% to 58% in the next, is far more convincing than one that only works in the data it was built on. See [In-Sample vs Out-of-Sample Testing](https://learn.tradelabsai.com/research/out-of-sample-testing/).

## Frequently asked questions

### What is conditional probability?

The probability of an event given that another event has occurred, written P(A | B).

### How is conditional probability used in trading?

To measure how a setup's win rate changes under certain conditions, such as trends, volatility levels or news, which helps build filters.

### What is the base rate fallacy?

Ignoring how common an outcome is overall when judging a signal, which can make rare events seem more predictable than they are.

Next, learn to update beliefs with evidence in [Bayes' Theorem](https://learn.tradelabsai.com/math/bayes-theorem/).

## Continue learning

- Next lesson: [Bayes' Theorem](https://learn.tradelabsai.com/math/bayes-theorem/)
- Previous lesson: [Law of Large Numbers](https://learn.tradelabsai.com/math/law-of-large-numbers/)
- Related: [Law of Large Numbers](https://learn.tradelabsai.com/math/law-of-large-numbers/): The law of large numbers says averages converge to the true value as samples grow. Learn what it means for judging strategies and how many trades you need.
- Related: [Bayes' Theorem](https://learn.tradelabsai.com/math/bayes-theorem/): Bayes' theorem shows how to update a probability when new evidence arrives. Learn the formula, trading and prediction market examples, and base rate errors.
- Related: [Probability for Traders](https://learn.tradelabsai.com/math/probability-for-traders/): Probability is the language of uncertainty in trading. Learn the core rules, independent vs dependent events, odds, and how probability shapes sizing and edge.
- Related: [Combining Signals](https://learn.tradelabsai.com/research/combining-signals/): Combining several weak signals often beats relying on one strong one. Learn standardisation, weighting methods, correlation between signals and pitfalls to avoid.
- Related: [Gambler's Fallacy](https://learn.tradelabsai.com/psychology/gamblers-fallacy/): The gambler's fallacy is believing past random outcomes change future odds. Learn how it shows up after streaks and in prediction markets, and how to avoid it.
- Related: [Structural Breaks and Regime Changes](https://learn.tradelabsai.com/math/regime-changes/): Markets switch between regimes such as calm and turbulent, or trending and ranging. Learn how to detect regimes, the models used and how to adapt strategies.
