Calculus & Probability Boot Camp (Lessons 1–9)
Prepared from the provided lesson transcript files (SRT). Date: January 24, 2026
How to use these notes
• Use each lesson section as a standalone refresher: key ideas → formulas → common pitfalls →
example.
• For homework: start from the 'What you should be able to do' checklist, then use the code blocks to
verify your work.
• Whenever you see an integral or expectation, think: (1) closed-form? (2) numerical integration? (3)
Monte Carlo simulation?
Quick reference (high-frequency ideas)
Derivatives (calculus)
• Product rule: (fg)' = f'g + fg'
• Quotient rule: (f/g)' = (f'g − fg') / g^2
• Chain rule: d/dx f(g(x)) = f'(g(x)) · g'(x)
• Critical points for optimization: solve f'(x) = 0 and check second derivative / endpoints.
Root finding (solve f(x)=0)
• Bisection: guaranteed if f(a)·f(b) < 0 (sign change). Converges linearly, very robust.
• Newton: x_{k+1} = x_k − f(x_k)/f'(x_k). Fast near the root, but can diverge if the start is poor.
• Always sanity-check: does the solution make sense, and is f(x*) close to 0?
Integration (area / probability / expectation)
• Definite integral: ∫_a^b f(x) dx (area under curve; can represent probability mass for a PDF).
• Fundamental theorem: ∫_a^b f(x) dx = F(b) − F(a) where F' = f.
• Numerical integration: rectangle (Riemann) rule, trapezoid rule, Simpson’s rule, Monte Carlo
integration; trade accuracy vs. compute.
Probability essentials
• Conditional probability: P(A|B) = P(A∩B) / P(B) (if P(B)>0).
• Independence: P(A∩B)=P(A)P(B) (equivalently P(A|B)=P(A)).
• Random variable (RV): a numerical function of an outcome. CDF F(x)=P(X≤x). PDF/PMF describes
distribution.
, Expectation and variance
• Discrete: E[g(X)] = Σ g(x) p(x). Continuous: E[g(X)] = ∫ g(x) f(x) dx.
• Variance: Var(X) = E[X^2] − (E[X])^2. Std dev = sqrt(Var).
• Linearity: E[aX+b] = aE[X]+b; Var(aX+b)=a^2 Var(X).
• Covariance: Cov(X,Y)=E[XY]−E[X]E[Y]. Correlation: Corr(X,Y)=Cov(X,Y)/(σ_X σ_Y).
• Variance of sums: Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y). If X ⟂ Y then Cov=0 so variances add.
• LOTUS: E[g(X)] = Σ g(x)p(x) or ∫ g(x)f(x)dx (often easiest even when the distribution of Y=g(X) is hard).
• MGF (when it exists): M_X(t)=E[e^{tX}]. Moments via derivatives: M′(0)=E[X], M″(0)=E[X^2].
• Law of total expectation: E[Y]=E[E[Y|X]]. (Often paired with conditioning in joint RV problems.)