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.

This appendix provides a summary of the common mathematical notations used throughout this book. Familiarity with these symbols is helpful for understanding the theoretical underpinnings alongside the Python implementations.

Set Theory and Probability Basics

NotationMeaningExampleChapter(s)
SS, Ω\OmegaSample Space (the set of all possible outcomes)S={1,2,3,4,5,6}S = \{1, 2, 3, 4, 5, 6\} for a die roll.2
A,B,E,...A, B, E, ...Events (subsets of the sample space)A={2,4,6}A = \{2, 4, 6\} (rolling an even number).2
\emptysetEmpty Set (impossible event)Rolling a 7 on a standard die.2
ABA \cup BUnion (‘A or B’ or both occur){1,2,3}{3,4,5}={1,2,3,4,5}\{1, 2, 3\} \cup \{3, 4, 5\} = \{1, 2, 3, 4, 5\}2
ABA \cap BIntersection (‘A and B’ both occur){1,2,3}{3,4,5}={3}\{1, 2, 3\} \cap \{3, 4, 5\} = \{3\}2
AcA^c, Aˉ\bar{A}Complement (‘not A’)If S={1,2,3}S=\{1,2,3\}, A={1}A=\{1\}, then Ac={2,3}A^c = \{2, 3\}.2
ABA \setminus BSet Difference (‘A but not B’){1,2,3}{3,4,5}={1,2}\{1, 2, 3\} \setminus \{3, 4, 5\} = \{1, 2\}2
$A$Cardinality (number of elements in set A)
P(A)P(A)Probability of event A occurringP(Heads)=0.5P(\text{Heads}) = 0.5 for a fair coin.2
$P(AB)$Conditional Probability (prob. of A given B)$P(\text{Sum}>10

Counting Techniques

NotationMeaningExampleChapter(s)
n!n!Factorial (n×(n1)×...×1n \times (n-1) \times ... \times 1)5!=5×4×3×2×1=1205! = 5 \times 4 \times 3 \times 2 \times 1 = 1203
P(n,k)P(n, k), nPk^nP_kPermutations (ordered arrangements of k from n)Ways to award Gold, Silver, Bronze to 3 of 10 runners3
C(n,k)C(n, k), nCk^nC_k, (nk)\binom{n}{k}Combinations (unordered selections of k from n)Ways to choose a committee of 3 from 10 people3

Random Variables and Distributions

NotationMeaningExampleChapter(s)
X,Y,ZX, Y, ZRandom Variables (variables whose values are numerical outcomes)X=X = Number of heads in 3 coin flips.6-12
x,y,zx, y, zSpecific values (realizations) of random variablesXX could take the value x=2x=2.6-12
XDist(...)X \sim \text{Dist}(...)‘X follows the distribution Dist with given parameters’XBinomial(n=10,p=0.5)X \sim \text{Binomial}(n=10, p=0.5)7, 9
p(x)p(x), pX(x)p_X(x), P(X=x)P(X=x)Probability Mass Function (PMF) of a discrete RV XXpX(k)=P(X=k)p_X(k) = P(X=k) for k=0,1,...,nk=0, 1, ..., n in a Binomial distribution.6, 7
f(x)f(x), fX(x)f_X(x)Probability Density Function (PDF) of a continuous RV XXThe bell curve shape for a Normal distribution.8, 9
F(x)F(x), FX(x)F_X(x)Cumulative Distribution Function (CDF) P(Xx)P(X \le x)FX(x)=P(Xx)F_X(x) = P(X \le x)6, 8
E[X]E[X], μ\mu, μX\mu_XExpected Value (mean) of RV XXAverage value expected from many trials.6, 8
Var(X)Var(X), σ2\sigma^2, σX2\sigma^2_XVariance of RV XX (measure of spread)Var(X)=E[(Xμ)2]Var(X) = E[(X - \mu)^2]6, 8
SD(X)SD(X), σ\sigma, σX\sigma_XStandard Deviation of RV XX (Var(X)\sqrt{Var(X)})Spread measured in the same units as XX.6, 8

Multiple Random Variables

NotationMeaningChapter(s)
(X,Y)(X, Y)A pair of random variables10-12
p(x,y)p(x, y), pX,Y(x,y)p_{X,Y}(x, y)Joint PMF of discrete RVs X,YX, Y10
f(x,y)f(x, y), fX,Y(x,y)f_{X,Y}(x, y)Joint PDF of continuous RVs X,YX, Y10
F(x,y)F(x, y), FX,Y(x,y)F_{X,Y}(x, y)Joint CDF P(Xx,Yy)P(X \le x, Y \le y)10
pX(x)p_X(x), fX(x)f_X(x)Marginal PMF/PDF of XX (derived from joint distribution)10
$p(yx),, p_{YX}(y
$f(yx),, f_{YX}(y
Cov(X,Y)Cov(X, Y)Covariance between XX and YY (E[(XμX)(YμY)]E[(X-\mu_X)(Y-\mu_Y)])11
ρ(X,Y)\rho(X, Y), Corr(X,Y)Corr(X, Y)Correlation Coefficient between XX and YY (Cov(X,Y)σXσY\frac{Cov(X,Y)}{\sigma_X \sigma_Y})11

Limit Theorems and Convergence

NotationMeaningChapter(s)
XnpXX_n \xrightarrow{p} XConvergence in Probability13
XndXX_n \xrightarrow{d} XConvergence in Distribution14

Bayesian Inference

NotationMeaningChapter(s)
θ\thetaParameter of interest5, 15
π(θ)\pi(\theta)Prior distribution of θ\theta15
$L(\thetax)$Likelihood function
$p(\thetax)$Posterior distribution of θ\theta

Markov Chains

NotationMeaningChapter(s)
PijP_{ij}Transition probability from state ii to jj16
P\mathbf{P}Transition Probability Matrix16
π\piStationary distribution vector16

General Mathematical Symbols

NotationMeaningChapter(s)
\sumSummationThroughout
\intIntegralThroughout
\approxApproximately equal toThroughout
\proptoProportional to5, 15
R\mathbb{R}Set of real numbersThroughout
N\mathbb{N}Set of natural numbers (usually {1,2,3,...}\{1, 2, 3, ...\})Throughout
\in‘Element of’ or ‘belongs to’2
\forall‘For all’Throughout
\exists‘There exists’Throughout