De Morgan’s Laws:
(A∪B)c=Ac∩Bc,(A∩B)c=Ac∪Bc.
Generalized:
(⋃Ai)c=⋂Aic,(⋂Ai)c=⋃Aic.
Cardinality
∣A∣: Number of elements in set A.
If A∩B=ϕ, then ∣A∪B∣=∣A∣+∣B∣.
For any sets: ∣A∪B∣=∣A∣+∣B∣−∣A∩B∣.
For three sets:
∣A∪B∪C∣=∣A∣+∣B∣+∣C∣−∣A∩B∣−∣B∩C∣−∣A∩C∣+∣A∩B∩C∣.
Cartesian product: ∣A×B∣=∣A∣×∣B∣.
Counting
Basic Principle of Counting:
For a task with k independent stages, where stage i has ni choices, total outcomes are: i=1∏kni
Factorial: n!=n×(n−1)×⋯×1, with 0!=1.
Permutation: n order k:
(n)k=(n−k)!n!
Combination: n choose k:
(kn)=k!(n−k)!n!.
Multinomial Coefficient: partition n items into k groups:
(n1,n2,…,nkn)=n1!n2!⋯nk!n!,wherei=1∑kni=n.
Probability
Random Experiment
Random Experiment: An experiment where all possible outcomes are known, but the specific outcome on a given trial cannot be predicted.
Sample Space (S or Ω): The set of all possible outcomes.
Elementary Outcome: A single outcome in the sample space.
Event: A subset of the sample space.
Probability
Classical Approach (for finite sample spaces with equally likely outcomes):
P(A)=∣S∣∣A∣
Relative Frequency Approach:
P(A)≈nNumber of times A occurs in n trials,
Axiomatic Definition (Kolmogorov, 1933):
Probability is a function assigning a number P(A) to each event A in a class F of subsets of Ω, satisfying:
Axiom 1: 0≤P(A)≤1.
Axiom 2: P(Ω)=1.
Axiom 3 (Countable Additivity): For disjoint events A1,A2,…,
P(A1∪A2∪⋯)=i=1∑∞P(Ai).
The triple (Ω,F,P) is called a probability space.
Probability Rules (from Axiomatic Definition):
P(ϕ)=0.
For finite disjoint events A1,…,An:
P(i=1⋃nAi)=i=1∑nP(Ai).
Complement: P(Ac)=1−P(A).
If A⊂B, then P(A)≤P(B).
Union of two events:
P(A∪B)=P(A)+P(B)−P(A∩B).
Union of three events:
P(A∪B∪C)=P(A)+P(B)+P(C)−P(A∩B)−P(B∩C)−P(A∩C)+P(A∩B∩C).
Equally Likely Outcomes:
For a finite sample space with equally likely outcomes, P(ω)=∣Ω∣1.
Probability of event A: P(A)=∣Ω∣∣A∣.
Countable vs. Uncountable Sample Spaces:
Countable: Finite or countably infinite (e.g., natural numbers).
Uncountable: Contains intervals (e.g., lifetime of a bulb).
Sampling Mechanisms
With Replacement, Order Matters:
Sample space: Ω=S×S×⋯×S (k-times), where S={1,2,…,n}.
Size: ∣Ω∣=nk.
Without Replacement, Order Matters:
Sample space: Ω={(s1,s2,…,sk):si∈S,si=sj if i=j}.
Size: ∣Ω∣=(n)k.
Without Replacement, Order Does Not Matter:
Sample space: Subsets of size k from {1,2,…,n}.
Size: ∣Ω∣=(kn).
Conditional Probability
Definition: The conditional probability of A given B, denoted by P(A∣B) is defined as:
P(A∣B)=P(B)P(AB)
For fixed B, P(⋅∣B) is a probability measure satisfying all probability axioms, called a conditional probability measure.
Multiplication Rule
For Two Events: For any events A and B:
P(AB)=P(B)P(A∣B)=P(A)P(B∣A)
For Three Events: For events A,B,C:
P(ABC)=P(A)P(B∣A)P(C∣AB),
For n Events: For events A1,A2,…,An:
P(A1A2⋯An)=P(A1)P(A2∣A1)P(A3∣A1A2)⋯P(An∣A1⋯An−1),
Law of Total Probability
Partition of Ω: A finite collection of events {B1,…,Bn} is a partition of Ω if they are pairwise disjoint (Bi∩Bj=∅ for i=j) and their union is Ω (⋃i=1nBi=Ω).
Law: If {B1,…,Bn} is a partition of Ω, then for any event A:
P(A)=i=1∑nP(A∩Bi)=i=1∑nP(A∣Bi)P(Bi).
Bayes' Theorem
Two Events:
P(B∣A)=P(A∣B)P(B)+P(A∣Bc)P(Bc)P(A∣B)P(B).
General Form: Let {B1,B2,…,Bn} be a partition of Ω:
P(Bk∣A)=∑i=1nP(A∣Bi)P(Bi)P(A∣Bk)P(Bk).
Terminology:
P(Bk): Prior probabilities (beliefs before observing A).
P(Bk∣A): Posterior probabilities (updated beliefs after observing A).
Independence of Events
Two Events: Events A and B are independent if:
P(AB)=P(A)P(B) or equivalently, P(A∣B)=P(A).
Three Events: Events A,B,C are mutually independent if:
P(AB)=P(A)P(B)P(AC)=P(A)P(C)P(BC)=P(B)P(C)P(ABC)=P(A)P(B)P(C)
N Events: 2≤k≤n and 1≤i1<i2<⋯<ik≤nP(Ai1Ai2⋯Aik)=P(Ai1)P(Ai2)⋯P(Aik)
Note: Pairwise independence does not imply mutual independence.
Independence Property:
If A and B are independent, then so are A and Bc, Ac and B, Ac and Bc.
Proof for A and Bc:
P(A∩Bc)=P(A)−P(A∩B)=P(A)−P(A)P(B)=P(A)(1−P(B))=P(A)P(Bc).
Conditional Independence
Definition: Events A and B are conditionally independent given event C if:
P(AB∣C)=P(A∣C)P(B∣C).
Denoted as (A⊥B)∣C.
Remarks:
Conditional independence given C does not imply marginal independence of A and B.
Marginal independence of A and B does not imply conditional independence given C.
Random Variable
Definition: A random variable (RV), denoted by X, is a real-valued function on the sample space Ω. That is, X:Ω→R, where R is the set of all real numbers.
Notation:
RVs are denoted by capital letters (X,Y,Z), unlike mathematical functions (f,g,h).
For a sample point ω∈Ω, the value of RV X is X(ω).
For a set B⊆R, the event {X∈B}={ω∈Ω:X(ω)∈B}=X−1(B).
Probability Distribution: The set of probabilities {P(X∈B):B⊆R}, where P(X∈B)=P(X−1(B)), is called the probability distribution of X.
Support: The set S(X) of possible values of X with positive probability is called the support of X.
Degenerate RV: A RV X is degenerate if there exists some real value a such that P(X=a)=1.
Discrete Random Variable
Definition: A random variable X is discrete if it takes values in a finite or countably infinite set, X∈{k1,k2,…}.
Probability Mass Function (PMF): The PMF of a discrete RV X is the function pX defined by:
pX(k)=P(X=k)
Probability for Events: For any subset B⊆S(X): P(X∈B)=k∈B∑pX(k).
Continuous Random Variable
A random variable X is continuous if it can assume any value in a finite or infinite interval.
Probability Density Function (PDF)
Definition: A function f(x) is a PDF for a continuous rv X if:
f(x)≥0 (non-negative).
∫−∞∞f(x)dx=1 (total area under the curve equals 1).
Properties:
P(a≤X≤b)=∫abf(x)dx, representing the area under f(x) over [a,b].
P(X=k)=∫kkf(x)dx=0
Probabilities are equal for inclusive/exclusive endpoints: P(a≤X≤b)=P(a<X≤b)=P(a≤X<b)=P(a<X<b).
Infinitesimal Method: If PDF f is continuous at a, then for small ε, P(a<X<a+ε)≈f(a)⋅ε, P(a−ε<X<a)≈f(a)⋅ε, P(a−ε<X<a+ε)≈f(a)⋅2ε.
Cumulative Distribution Function (CDF)
The PMF are defined only for discrete rvs and PDF are defined only for continuous rvs. But CDF apply to any rvs.
Definition: F(x)=P(X≤x), defined for all x∈R. P(a<X≤b)=F(b)−F(a).
Discrete: F(x)=k≤x∑P(X=k). F is a piecewise constant function, or step function. The set of jump points is S(X)={x:P(X=x)=F(x)−F(x−)}
Continuous: F(x)=∫−∞xf(t)dt.
If F is continuous and differentiable, then f(x)=F′(x). If not differentiable, then f(x) is arbitrary.
Properties of CDF:
x→−∞limF(x)=0, x→∞limF(x)=1.
Monotonicity: If x<y, then F(x)≤F(y).
Right continuity: F(a)=x→a+limF(x).
Left limit: F(a−)=x→a−limF(x)=P(X<a).
For discrete X, P(X=a)=F(a)−F(a−).
For continuous X, F(a)=F(a−).
Independence of Random Variables
General Definition: RVs X1,X2,…,Xn defined on the same probability space are independent if:
P(X1∈B1,X2∈B2,…,Xn∈Bn)=k=1∏nP(Xk∈Bk),
for all subsets B1,B2,…,Bn⊆R.
Discrete RVs: Discrete RVs X1,X2,…,Xn are independent if:
P(X1=x1,X2=x2,…,Xn=xn)=k=1∏nP(Xk=xk),
for all possible values x1,x2,…,xn.
Percentiles/Quantiles
The p-th quantile xp satisfies P(X≤xp)≥p and P(X≥xp)≥1−p.
Median: x0.5. First and third quartiles: x0.25, x0.75.
For continuous X, F(xp)=p, and quantiles are unique.
Moments of a Random Variable
Expectation: For a function g(X)
Discrete E[g(X)]=k∑g(k)P(X=k)
Continuous E[g(X)]=∫−∞∞g(x)f(x)dx
n-th Moment: E(Xn), where g(x)=xn.
Mean: μ=E(X)=k∑kP(X=k).
Variance: σ2=Var(X)=E((X−μ)2)=E(X2)−(E(X))2.
Standard Deviation: σ=Var(X).
Properties:
E(aX+b)=aE(X)+b.
Var(aX+b)=a2Var(X).
Var(X)=0 if and only if P(X=c)=1 for some constant c.
For rvs X1,…,Xn: E(k=0∑nakXk)=k=0∑nakE(Xk).
If
independent: Var(k=0∑nakXk)=k=0∑nak2Var(Xk).
Definition: X∼Ber(p) represents the result of a trial, success of fail, with success probablity p, where 0≤p≤1. X takes values in {0,1} and:
P(X=1)=p,P(X=0)=1−p.
Interpretation: Represents the outcome of a single Bernoulli trial (1 for success, 0 for failure).
Binomial Distribution
Definition: X∼Bin(n,p) represents the number of successful trials out of n independent trials with success probability p. Its possible values are {0,1,…,n} and its PMF is:
P(X=k)=(kn)pk(1−p)n−k
Nature: Arises as the sum Sn=i=1∑nXi, where each Xi∼Ber(p) (independent identical distributions).
Property: The probabilities sum to 1, as the binomial theorem:
k=0∑n(kn)pk(1−p)n−k=(p+1−p)n=1.
Geometric Distribution
Definition: X∼Geo(p) represents the number of trials until the first success in repeated independent trials with success probability p. Its support is S(X)={1,2,3,…} and its PMF is
P(X=k)=(1−p)k−1p
Alternative: Y=X−1 represents the number of failures before the first success, with support S(Y)={0,1,2,…} and PMF P(Y=k)=(1−p)kp
Memoryless Property: P(X=n+k∣X>n)=P(X=k), for n,k≥1. This means the probability of needing k more trials to get a success, given n failures, is the same as needing k trials from the start.
Tail Probability: P(X≥n)=(1−p)n−1, representing the probability of at least n trials (first n−1 failures).
Special Case: If p=0, then P(X=∞)=1.
Negative Binomial Distribution
Definition: X∼NB(k,p) represents the number of trials until the k-th success in repeated independent trials with success probability p. The Support is n∈{k,k+1,k+2,…}. Its PMF is
P(X=n)=(k−1n−1)pk(1−p)n−k
Alternative: Y=X−k represents the number of failures before the k-th success, with support S(Y)={0,1,2,…} and PMF P(Y=m)=(k−1m+k−1)pk(1−p)m.
Note: NB(1,p)=Geo(p).
Representation: X=X1+X2+⋯+Xk, where Xi∼Geo(p) are independent, each representing trials until the next success.
Hypergeometric Distribution
Definition: X∼HG(N,NA,n), represents the number of type A items in a sample of n items drawn without replacement from a population of N items.
PMF: Its PMF is P(X=k)=(nN)(kNA)(n−kN−NA), where max(0,n−NB)≤k≤min(n,NA).
Poisson Distribution
Definition: X∼Poi(λ), λ>0 represents the number of rare events in a fixed time period, with support S(X)={0,1,2,…} and PMF P(X=k)=k!e−λλk Used for events like accidents, tornadoes, or disease cases.
Definition: X∼Unif(a,b) has a uniform distribution on [a,b] if its pdf is f(x)=b−a1 for a≤x≤b, 0 otherwise.
Probability over [c,d]⊆[a,b]: P(c≤X≤d)=∫cdb−a1dx=b−ad−c
Uniform Distribution in higher dimensions.
Normal Distribution (Gaussian Distribution)
Standard Normal: Z∼N(0,1) with PDF φ(z) and CDF Φ(z).
φ(z)=2π1e−2z2,Φ(z)=∫−∞zφ(s)ds
∫−∞+∞e−2s2ds=2π
E(Z)=0, Var(Z)=1.
Symmetry: φ(z)=φ(−z), Φ(z)=1−Φ(−z).
General Normal: X=σZ+μ∼N(μ,σ2).
f(x)=2πσ21e−2σ2(x−μ)2,F(x)=Φ(σx−μ)
E(X)=μ, Var(X)=σ2.
Exponential Distribution
Definition: X∼Exp(λ) represents the waiting time until the first event in a process where events happen at a constant average rate λ per unit time, independently of each other. f(x)=λe−λx for x≥0, 0 otherwise.
CDF: F(t)=1−e−λt for t≥0, 0 otherwise.
P(X>t)=e−λt.
E(X)=λ1, E(X2)=λ22, Var(X)=λ21.
Memoryless Property: P(X>s+t∣X>s)=P(X>t).
Gamma Distribution
Gamma Function: Γ(k)=∫0∞xk−1e−xdx, Γ(n)=(n−1)! for integer n.
Definition: X∼Gamma(k,λ) represents waiting time until the kth event in a Poisson process.
f(x)=Γ(k)λke−λxxk−1
for x≥0.
If independent Xi∼Exp(λ), then i=1∑nXi∼Gamma(n,λ).
Moments: E(X)=λk, Var(X)=λ2k.
Distribution of a function of a random variable g(X)
Discrete Case:
PMF: P(Y=y)=P(g(X)=y)=k:g(k)=y∑P(X=k).
If g is one-to-one, P(Y=y)=P(X=g−1(y)).
Continuous Case:
CDF Method: Find FY(y)=P(g(X)≤y), then fY(y)=FY′(y).
Transformation Method (general):
For one-to-one differentiable g, fY(y)=fX(g−1(y))dydg−1(y)=∣g′(g−1(y))∣fX(g−1(y)) for y such that g−1(y) exists and g′(g−1(y))=0.
For many-to-one differentiable g: fY(y)=x:g(x)=yg′(x)=0∑∣g′(x)∣fX(x).
Moment Generating Function (MGF)
Definition: For a random variable X, the MGF is MX(t)=E[etX], t∈R. MX(n)(t)=E[XnetX]
Transformation: If Y=aX+b, then MY(t)=etbMX(at).
Finding Moments from MGF
Property: If MX(t) is differentiable at t=0, the n-th moment is E[Xn]=MX(n)(0).
(Exponential): X∼Exp(λ), MX(t)=λ−tλ for t<λ. MX(n)(t)=n!λ(λ−t)−n−1, so E[Xn]=MX(n)(0)=n!λ−n.
(Standard Normal): Z∼N(0,1), MZ(t)=et2/2.
Taylor expansion: et2/2=∑k=0∞k!(t2/2)k.
Moments: E[Zn]=0 if n is odd, E[Zn]=(n−1)!! if n is even (double factorial).
Equality in Distribution
Definition: X=dY if P(X∈B)=P(Y∈B) for all subsets B⊆R. Same PMF/PDF, MGF, Moments.
Theorem: If MX(t)=MY(t) for t∈(−δ,δ), then X=dY.
Joint Distribution of Random Variables
Let X1,X2,…,Xn be random variables on a sample space Ω. The random vector is defined as: X=(X1,X2,…,Xn):Ω→Rn
The joint (multivariate) distribution is: P(X∈B)=P((X1,…,Xn)∈B),B⊆Rn Marginal distributions are the distributions of individual coordinates Xi.
The joint CDF is F(x1,…,xn)=P(X1≤x1,…,Xn≤xn).
Discrete Joint Distribution
Definition: Let X1,…,Xn be discrete RVs. The joint PMF is:
p(k1,…,kn)=P(X1=k1,…,Xn=kn)≥0
k1,…,kn∑p(k1,…,kn)=1
For a real-valued function g:Rn→R:
E[g(X1,…,Xn)]=k1,…,kn∑g(k1,…,kn)p(k1,…,kn)
Functional Independence: If X1,…,Xm+n are independent, then Y=f(X1,…,Xm) and Z=g(Xm+1,…,Xm+n) are independent.
Exchangeable Random Variables
Definition: A sequence of rvs X1,…,Xn is exchangeable if for any permutation (k1,…,kn) of (1,…,n), (X1,…,Xn)=d(Xk1,…,Xkn)
Consequences of Exchangeability:
Joint probabilities remain invariant under permutation.
Xk are identically distributed and have the same marginal distributions. X1=dXk1 and further (X1,…,Xk)=d(Xi1,…,Xik)
PMF/PDF is symmetric.
Expectations of symmetric functions do not change under
permutation: E[g(X1,…,Xk)]=E[g(Xi1,…,Xik)]
Independent Identically Distributed (i.i.d) Random Variables
A sequence X1,X2,… is i.i.d. if all Xi are independent and each Xi has the same probability
distribution. Theorem: An i.i.d. sequence of random variables is exchangeable.
Let X1,…,Xk be sampled without replacement from {1,2,…,n}. Then the sequence is exchangeable.
If X1,…,Xn are exchangeable, then the sequence g(X1),…,g(Xn) for any function g is exchangable.
Sum of Random Variables
Convolution of Distributions
Discrete Sum
pX+Y(n)=k∑pX,Y(k,n−k)
If X and Y are independent, then
pX+Y(n)=k∑pX(k)pY(n−k)=(pX∗pY)(n)
This is called the convolution of X and Y.
Continuous Sum
fX+Y(z)=∫−∞∞fX,Y(x,z−x)dx
If X and Y are independent, then
fX+Y(z)=∫−∞∞fX(x)fY(z−x)dx=(fX∗fY)(z)
Convolutions of Distributions
Denote Sn=i=1∑nXi and each Xi is independent to each other.
Xi∼Ber(p), then Sn∼Bin(n,p)
Xi∼Bin(ni,p), then Sn∼Bin(∑ni,p)
Xi∼Geo(p), then Sn∼NB(n,p)
Xi∼Poi(λi), then Sn∼Poi(∑λi)
Xi∼Exp(λ), then Sn∼Gamma(n,λ). fX+Y(z)=λ2ze−λz
Xi∼Gamma(ki,λ), then Sn∼Gamma(∑ki,λ)
Xi∼N(μi,σi2) and Sn=i=1∑naiXi+b, then Sn∼N(μ,σ2) μ=∑aiμi+b,σ2=∑ai2σi2
If X,Y∼Unif(0,1), then
fX+Y(z)=⎩⎨⎧z,2−z,0,0≤z≤11<z≤2otherwise
Expectation and Variance of Sums
Linearity of expectation E[i=1∑ngi(Xi)]=i=1∑nE[gi(Xi)].
(Independence is not required).
Indicator Method
If X=∑Ii where each Ii is an indicator (bernoulli) rv, then E[X]=∑E[Ii]=∑P(Ii=1).
Product of expectations
If X1,…,Xn are independent, then E[i=1∏ngi(Xi)]=i=1∏nE[gi(Xi)].
Variance of a sum
If X1,…,Xn are independent with Var(Xi)<∞, then Var(i=1∑nXi)=i=1∑nVar(Xi).
Sample mean and sample variance
Let X1,X2,… be i.i.d. rvs with finite mean μ and variance σ2. Define the sample mean of the first n observations Xn=n1i=1∑nXi. Then E[Xn]=μ,Var(Xn)=nσ2.
Interpretation:Xn is an unbiased estimator of μ, and its variance shrinks at rate 1/n.
The effect of averaging: As n→∞, Var(Xn) vanishes, and so Xn converges to mean μ.
Moment Generating Functions (MGFs) of Sums
If X and Y are independent, then MX+Y(t)=MX(t)MY(t).
More generally, for independent X1,…,Xn: Mi∑Xi(t)=i=1∏nMXi(t).
Uniqueness & distribution of sums
If MX+Y(t) matches the MGF of a known rv Z, then X+Y and Z share the same distribution.
Covariance
Definition: For random variables X and Y, the covariance is Cov(X,Y)=E[(X−μX)(Y−μY)]=E[XY]−E[X]E[Y]
Cov(X,X)=Var(X)
Sign of Covariance
Cov(X,Y)>0: positively correlated. X and Y tend to deviate together.
Cov(X,Y)<0: negatively correlated. X and Y tend to deviate in opposite directions.
Cov(X,Y)=0: uncorrelated.
Independent implies uncorrelated, but uncorrelated doesn't imply independent. If X⊥Y, then Cov(X,Y)=0.
If IA and IB are indicators of events A and B, then Cov(IA,IB)=P(A∩B)−P(A)P(B)=P(B)[P(A∣B)−P(A)]
In particular, Cov(IA,IB)=0 if and only if A and B are independent.
Variance of Sum (with Covariances)
For X1,…,Xn with finite variances and covariances, Var(i=1∑nXi)=i=1∑nVar(Xi)+21≤i<j≤n∑Cov(Xi,Xj)
If they are uncorrelated, then Var(i=1∑nXi)=i=1∑nVar(Xi).
Properties of Covariance
Symmetry: Cov(X,Y)=Cov(Y,X).
Linearity in First Argument: Cov(aX+b,Y)=aCov(X,Y).