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 || --- | --- | --- || | probability of an event | probability a customer buys || | probability given evidence | probability of churn given low engagement || | 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:
## Worked Example 2Bayes’ rule updates belief when new evidence arrives:
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 mean?2. Why is expected value useful in business?3. Why can a high expected value still be risky?Answers
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))