Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Probability is how machine learning talks about uncertainty. Instead of saying what will happen with certainty, a model can express how likely a result is and how confident we should be in a decision.## Core Ideas| Concept | Meaning | Business example || --- | --- | --- || P(A)P(A) | probability of an event | probability a customer buys || P(AB)P(A \mid B) | probability given evidence | probability of churn given low engagement || E[X]E[X] | expected value | average payoff of a campaign || Variance | uncertainty around the average | stability of a KPI |mermaidflowchart LR A[Define event] --> B[Estimate probability] --> C[Update with evidence] --> D[Choose action]Alt text: Probability estimates a chance, updates it with evidence, and informs a decision.## Worked Example 1If 25 of 100 visitors purchase, then:

P(purchase)=25100=0.25P(\text{purchase}) = \frac{25}{100} = 0.25

## Worked Example 2Bayes’ rule updates belief when new evidence arrives:

P(HO)=P(OH)P(H)P(O)P(H \mid O) = \frac{P(O \mid H)P(H)}{P(O)}

For example, it can tell us how likely a customer is high-value given that they opened a premium offer email.## Guided Practice1. What does P(AB)P(A \mid B) mean?2. Why is expected value useful in business?3. Why can a high expected value still be risky?

Answers
1. The chance of A given B 2. It summarizes average payoff under uncertainty 3. Because the outcomes may vary a lot around the average
Next: Math Cheat-Sheet

p_purchase = 25 / 100print('purchase probability =', p_purchase)print('purchase rate =', f'{p_purchase:.1%}')
p_open_given_high = 0.40p_open_given_low = 0.10p_high = 0.30p_open = p_open_given_high * p_high + p_open_given_low * (1 - p_high)p_high_given_open = (p_open_given_high * p_high) / p_openprint('P(open) =', round(p_open, 3))print('P(high-value | open) =', round(p_high_given_open, 3))