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.

Welcome to the Math Cheat-Sheet — your one-stop shop for remembering just enough math to sound impressive in meetings and actually understand your ML models.

You’ve survived symbols, matrices, derivatives, and probabilities. Now it’s time to stitch them all together into practical business cases.


🧮 1. Quick Recap: What We’ve Learned

ConceptMeaningBusiness Analogy
Σ (Sigma)Add things upTotal monthly sales
μ (Mu)Mean / AverageAverage customer spend
σ² (Sigma²)VarianceHow moody your KPIs are
∂ (Partial derivative)Tiny change“What happens if I increase discount by 1%?”
**P(AB)**Conditional probability“Chance of renewal if user used the app daily”

💼 2. Worked Example: Linear Regression = Business Forecasting

Goal: Predict sales from ad spend.

[ y = β₀ + β₁x ]

TermMeaning
( y )Predicted sales
( β₀ )Base sales (no ads)
( β₁ )Effect per $ of ad spend
( x )Advertising budget

Example: [ y = 5000 + 3x ]

If you spend $1,000 on ads: [ y = 5000 + 3(1000) = 8000 ]

💬 “For every 1spentonads,weget1 spent on ads, we get 3 in sales uplift.” ROI just became an equation!


🧩 Try It Yourself

# 👇 Run this in JupyterLite or Colab
import numpy as np

# Ad spend in $
x = np.array([0, 500, 1000, 1500])
# Sales in $
y = 5000 + 3*x

for spend, sale in zip(x, y):
    print(f"Ad spend: ${spend:>4} → Predicted sales: ${sale}")

📉 3. Worked Example: Derivative = Sensitivity Analysis

Say your revenue depends on price: [ R(p) = p \times (100 - 2p) ]

Derivative: [ \frac{dR}{dp} = 100 - 4p ]

Set derivative = 0 to find the optimal price: [ 100 - 4p = 0 \Rightarrow p = 25 ]

Optimal price: $25 per unit ✅ Maximum revenue: ( R(25) = 25 × (100 - 50) = 1250 )

💬 “You just did profit optimization — without Excel!”


🧩 Try It Yourself

import sympy as sp

p = sp.Symbol('p')
R = p * (100 - 2*p)
optimal_price = sp.solve(sp.diff(R, p), p)[0]
max_revenue = R.subs(p, optimal_price)
float(optimal_price), float(max_revenue)

🎲 4. Worked Example: Probability = Customer Retention

Scenario: 20% of customers are at high churn risk. If they call support, churn probability drops to 5%. 60% of at-risk customers actually call support.

What’s the overall churn rate?

Using total probability: [ P(\text{Churn}) = P(\text{Support})P(\text{Churn|Support}) + P(\text{No Support})P(\text{Churn|No Support}) ] [ = (0.6)(0.05) + (0.4)(0.20) = 0.03 + 0.08 = 0.11 ]

✅ Overall churn = 11%

💬 “A 9% improvement just by nudging customers to call support.” Probability = revenue protection math!


🧩 Try It Yourself

p_support = 0.6
p_churn_support = 0.05
p_churn_no_support = 0.20

p_churn = (p_support*p_churn_support) + ((1-p_support)*p_churn_no_support)
print(f"Overall churn probability: {p_churn:.2%}")

🧠 5. Worked Example: Expected Value = Smart Business Betting

Scenario: A marketing campaign has 3 possible outcomes:

OutcomeProfit ($)Probability
Huge success50,0000.2
Moderate success10,0000.5
Fail-5,0000.3

[ E[X] = (0.2)(50000) + (0.5)(10000) + (0.3)(-5000) = 10,000 + 5,000 - 1,500 = 13,500 ]

Expected profit = $13,500

💬 “Even risky campaigns can be smart bets if the math checks out.”


🧩 Try It Yourself

outcomes = np.array([50000, 10000, -5000])
probs = np.array([0.2, 0.5, 0.3])

expected_value = np.sum(outcomes * probs)
print(f"Expected campaign profit: ${expected_value:,.0f}")

🧩 Bonus: Variance = Business Uncertainty

Let’s see how volatile that campaign could be:

[ Var(X) = E[X^2] - (E[X])^2 ]

variance = np.sum((outcomes**2) * probs) - expected_value**2
std_dev = np.sqrt(variance)
print(f"Variance: {variance:,.0f}, Std Dev: ${std_dev:,.0f}")

💬 “Variance is your CFO’s favorite anxiety metric.”


🧭 6. Quick Business-Math Reference

TopicFormulaPlain English
Mean( μ = \frac{1}{n}\sum x_i )Average value
Variance( σ² = \frac{1}{n}\sum (x_i - μ)^2 )Spread of data
Linear model( y = β₀ + β₁x )Relationship between two things
Derivative( \frac{dy}{dx} )Rate of change
Expected Value( E[X] = \sum P(x)x )Weighted average
Bayes’ Rule( P(AB) = \frac{P(BA)P(A)}{P(B)} )Update beliefs after new info

🧩 Practice Corner: “Business Math Speed Round”

Fill in the blanks:

ScenarioFormulaResult
Forecast sales if ( y = 5000 + 2x ), ( x=1000 )______
Find optimal price if ( R(p) = p(120 - 3p) )______
Compute expected profit with outcomes 10k,10k, 5k, (-$2k) and probs 0.3, 0.5, 0.2______

Hint: You’ve seen all of these above. Try coding them in your Colab workspace!


🚀 Summary

You can now:

  • Speak math and business fluently 🧮💼

  • Translate formulas into insights

  • Run tiny Python tests to verify your intuition

  • Impress both data scientists and executives

🎉 Congratulations! You’ve officially completed the Math Foundations of Machine Learning for Business. You now possess the power to decode formulas like they’re budget reports.


🔜 Next Up

👉 Head to Data Handling & Visualization to turn theory into real business intelligence.

# Your code here