Why two versions? WLLN says "the sample mean is probably close to μ for large n." SLLN says something stronger: "the sample mean will eventually settle at μ and stay there, guaranteed." For machine learning, WLLN is usually sufficient.
Training Convergence: Stochastic gradient descent (SGD) uses LN—the gradient of a mini-batch converges to the true gradient as batch size increases.
Monte Carlo Methods: Estimating expectations (value functions in RL, posterior means in Bayesian ML) relies on LLN to guarantee accuracy.
Sample Complexity: LN tells us how many examples we need to estimate quantities to desired precision. The O(1/n) variance decay is fundamental to learning theory.
Ensemble Methods: Why does averaging predictions from many models reduce error? LN! Individual model errors average out.
A/B Testing: LLN justifies using sample proportions to estimate click-through rates, conversion rates, etc.
Recall Explain to a 12-Year-Old
Imagine you're trying to figure out how tall kids in your school are on average. You measure one kid—maybe they're really tall, like 180 cm. You think, "Wow, everyone must be tall!" But then you measure another kid—150 cm. Now you're confused.
But what if you measure 10 kids? Then 50 kids? Then 200 kids? As you measure more and more, your average gets closer to the real average height of all kids in the school.
The Law of Large Numbers is like a magical promise: "If you keep collecting more data, your average will get closer and closer to the truth." It's not that randomness goes away—some kids are tall, some are short—but the average stabilizes.
This is why scientists do lots of experiments, why polls ask thousands of people, and why casinos always make money (they've played millions of games, so the average always works out in their favor).
Bootstrap Sampling — Relies on LLN for resampling-based inference
Expected Value — The μ that sample means converge to
Independent and Identically Distributed — The i.i.d. assumption required for LLN
#flashcards/ai-ml
What does the Law of Large Numbers state? :: As you repeat an experiment more times, the sample mean Xˉn converges to the expected value μ. The probability that ∣Xˉn−μ∣ exceds any fixed ϵ goes to zero as n→∞.
What is the difference between Weak LN and Strong LLN?
Weak LLN: P(∣Xˉn−μ∣≥ϵ)→0 (convergence in probability). Strong LLN: P(limn→∞Xˉn=μ)=1 (almost sure convergence). SLN is stronger—guarantees eventual settling at μ.
What is the variance of the sample mean Xˉn if each Xi has variance σ2?
Var(Xˉn)=σ2/n. This decreases as n increases, which is why larger samples give more precise estimates.
How fast does the error in sample mean decrease with sample size?
The standard deviation of Xˉn is σ/n, so error decreases as O(1/n). To halve the error, you need 4× the samples.
What assumptions are required for the Law of Large Numbers?
The random variables must be (1) independent and (2) identically distributed (i.i.d.) with (3) finite expected value μ (and finite variance for WLLN via Chebyshev).
If you flip a fair coin n times, what does LN say about the proportion of heads?
The proportion of heads Xˉn converges to p=0.5 as n→∞. The probability that ∣Xˉn−0.5∣>ϵ goes to zero for any ϵ>0.
How is LN used in Monte Carlo integration?
Sample random points; compute a function value at each point. The sample mean of these values converges to the expected value (the integral) by LLN. Error scales as 1/n.
Why do mini-batch gradients in SGD converge to the true gradient?
By LLN. Each mini-batch gives a noisy gradient estimate. As batch size increases, the sample mean of gradients converges to the true gradient ∇L.
What bound does Chebyshev's inequality give for LN?
P(∣Xˉn−μ∣≥ϵ)≤σ2/(nϵ2). This provides a distribution-free guarantee that works for any random variable with finite variance.
Why doesn't LLN mean you'll get exactly 500 heads in 1000 fair coin flips?
LN guarantees convergence in probability, not deterministic convergence. The sample mean gets arbitrarily close to 0.5, but randomness remains—you might get 498, 501503 heads. Absolute fluctuations don't vanish.
Law of Large Numbers ek bahut powerful concept hai joume bata hai ki jab hum kisi experiment kobaar-baar repeat karte hain, toh average result true expected value ke pas ata jata hai. Sochiye ek sika phenk rahe ho—pehli baar heads aya, toh ap soch sakte ho "100% heads!" Lekin jaise-jaise ap aur phenkte ho (10 baar, phir 100 baar, phir 10,000 baar), toh proportion 50% ke karib settle hone lagta hai. Yahi LN ka essence hai.
Machine learning mein yeh concept critical hai. Jab aap SGD use karte ho training ke liye, har mini-batch ek noisy gradient deta hai, lekin LLN guarantee karta hai ki average gradient true gradient ke paas converge karega as batch size badhegi. Isi tarah, Monte Carlo methods mein hum expectations ko estimate karte hain by sampling—sample mean converges to true mean by LLN. Yeh principle A/B testing, ensemble methods, aur confidence intervals ka bhi base hai.
Ek important baat: error decrease hoti hai as 1/n rate se. Matlab agar aapko error half karni hai, toh 4 times zyada samples chahiye. Isliye ML models ko perfect banana itna expensive hota hai—last 1% accuracy ke liye exponentially zyada data aur compute chahiye. LN hume yeh mathematical guarantee deta hai ki consistent sampling se truth ke paas pahunch sakte hain, chahe individual samples random hi kyun na ho.