Inequalities and limit theorems proofs — step by step with the playlist, Markov, Chebyshev, the law of large numbers and the CLT with the mgf (and the bound I wrote the wrong way round)
In a class mock exam I was asked to prove Chebyshev and I wrote, very confidently, “≥ σ²/t²”. I had applied Markov to and, when moving to the complementary event, I flipped the inequality where I shouldn’t: my “proof” ended up saying that the probability of moving away from the mean is at least , and with a small that is greater than 1. The lecturer only wrote in the margin “probability 4?”. Since then, every time I close a bound I ask myself what happens with a very small and a very large .
Here, step by step, are the proofs of the topic inequalities and limit theorems: the two inequalities, the law of large numbers, the two faces of the central limit theorem, the idea of its proof with the moment generating function, the Poisson that becomes normal and the sample size. Each one says what is to be proved, where you start from, what justifies each step and how to check it with R. The example is the same as in the theory: the length of a song on the gym playlist, with , with mean 3.5 and standard deviation 1.5.
Table of Contents
Before we start: the rules we will use
| Rule | What it says | Where it is used |
|---|---|---|
| Expectation as an integral | Markov | |
| Integral of something positive | If , ; removing pieces only makes it smaller | Markov |
| Monotonicity | If on , | Markov |
| Equal events | , if | Chebyshev |
| Mean and variance of | , if independent | Law of large numbers |
| mgf of a sum | if independent | CLT, Poisson |
| mgf of | CLT, Poisson | |
| Taylor of | CLT, Poisson | |
| Limit of the number | , also if depends on and tends to | CLT |
| Continuity theorem | If near 0, | CLT, Poisson |
Proof 1: Markov’s inequality
What is to be proved
If has finite mean, for any :
Why it matters. It is the first bound that only needs the mean. And it is the building block of the topic: Chebyshev is Markov applied to , and the law of large numbers is Chebyshev applied to .
Where we start from
Only from the fact that is not negative and the definition of expectation. We do it for a continuous variable with density ; in the discrete case the integrals become sums and the reasoning is the same.
Step 1: split the mean in two pieces
We split the values of into those that do not reach and those that do:
Step 2: drop the first piece
In the first piece, and , so the integral is . If we remove it, what is left is smaller or equal:
This is where we use that is not negative. If it were, the first piece could be negative and removing it would raise the result.
Step 3: replace by
In the second piece every satisfies , so and, by monotonicity:
The last two equalities: comes out of the integral because it is a constant, and the integral of the density over is the probability of landing there.
Step 4: solve
Putting steps 2 and 3 together, . Since , we divide without changing the direction:
The drawing shows each loss: the part of the mean that comes from the short songs (step 2) and what is lost by flattening each of the tail down to the value (step 3). With , the bound loses almost everything: that is why it is so loose.
Check it with R
l <- 2/3; fX <- function(x) l * exp(-l * (x - 2)) t <- 7 c(upper = integrate(function(x) x * fX(x), t, Inf)$value, # the piece we keep lower = integrate(function(x) x * fX(x), 2, t)$value, # the piece we drop t_times_P = t * (1 - pexp(t - 2, l))) # t · P(X >= 7)
Output:
upper lower t_times_P 0.3032289 3.1967711 0.2497180
The two pieces add up to 3.5, the mean. The piece of songs of 7 minutes or more is 0.30 and, after replacing each by 7, it becomes . The chain is : the two inequalities of the proof, with numbers.
Check you’ve got it: what bound does Markov give for a song lasting 3 minutes or more, and why is it useless?
. It is true, but it says nothing: you already knew a probability is . It happens whenever . The real one is . Markov only says something when is well above the mean.
Proof 2: Chebyshev’s inequality
What is to be proved
If has finite mean and variance , for any :
and, with , its two usual forms: and .
Why it matters. Markov looks at one side only and needs . Chebyshev measures the distance to the mean on both sides, for any variable with finite variance: with , at least 75 % of the values fall within , whatever the distribution.
Where we start from
From Markov, which requires a non-negative variable. can be negative, but its square cannot.
Step 1: the non-negative variable
Let . It is and its mean is the variance: .
Why the square and not : Markov would also work, but it would give , a mean you almost never know. The mean of the square is .
Step 2: Markov with
We apply Markov to with the value :
Step 3: the same event, written with
Since and the square root is increasing, happens exactly when . They are the same event, so they have the same probability:
Step 4: the forms with
With , . And since “being less than away” is the complement of “being or more away”:
Watch the direction: subtracting an amount that is at most leaves something that is at least . This is where I went wrong in the mock exam. The quick check: with a very large the outside bound must tend to 0, and with the outside bound is 1 or more and says nothing (a probability is always ).
Writing . With a small it would give probabilities greater than 1. Outside bounds are always upper ones () and inside ones, lower ones ().
Check it with R
set.seed(2026) x <- 2 + rexp(100000, 2/3) # 100,000 songs c(square = mean((x - 3.5)^2 >= 9), # P(Y >= t^2), with t = 3 distance = mean(abs(x - 3.5) >= 3), # P(|X - mu| >= t): the same event bound = 2.25 / 9) # sigma^2 / t^2
Output:
square distance bound 0.04921 0.04921 0.25000
The first two columns are the same number, 0.04921, because they count exactly the same songs: that is step 3. The bound, 0.25, is above, as Chebyshev promises.
Check you’ve got it: what does Chebyshev guarantee for songs between 0.5 and 6.5 minutes long, and how many really fall there?
The interval is , so : at least . In reality, since no song is shorter than 2 minutes, only the upper tail falls outside, : 0.95 stays inside. The gap is the price of not using the shape of the distribution.
Proof 3: the weak law of large numbers
What is to be proved
If are independent, with and , for any :
Why it matters. It is the reason averaging works: with enough data, the sample mean gets close to the population mean. It justifies estimating with .
Where we start from
From Chebyshev (proof 2), applied to instead of , and from the mean and variance of a mean of independent variables (topic 6).
Step 1: the mean and variance of
By linearity of expectation, . By independence, the variance of the sum is the sum of the variances, and the constant comes out squared:
Step 2: Chebyshev for
is a variable with mean and variance . Chebyshev with says:
Why you can: Chebyshev holds for any variable with finite mean and variance, and is just one more, with mean and variance .
Step 3: the complement and the limit
is the same as . Moving to the complement, as in step 4 of Chebyshev:
With fixed, as , and the probability, which cannot exceed 1, is squeezed between something that tends to 1 and 1 itself: it tends to 1. That is the convergence in probability of to .
This is the weak law. There is a strong law, which says that the sequence of means of one and the same sequence of songs tends to with probability 1 (what the running mean in the theory drew). Its proof is not part of ME1.
Check it with R
With the playlist and , we simulate 2000 times the mean of songs and count how many are a quarter of a minute or more away from 3.5:
set.seed(2026) outside <- function(n) mean(replicate(2000, abs(mean(2 + rexp(n, 2/3)) - 3.5) >= 0.25)) round(c(n50 = outside(50), n200 = outside(200), n720 = outside(720)), 4) round(2.25 / (c(50, 200, 720) * 0.25^2), 4) # the bound sigma^2 / (n c^2)
Output:
n50 n200 n720 0.2355 0.0165 0.0000 [1] 0.72 0.18 0.05
With 50 songs it moves away 23.6 % of the time (the bound allowed 72 %); with 200, 1.65 % (the bound, 18 %); with 720, none of the 2000 (the bound, 5 %). The probability of moving away goes to 0, always below the bound.
Check you’ve got it: where is independence used, and what would happen if the n songs were the same one repeated?
Only in step 1, so that the variance of the sum is the sum of the variances. If they were the same song, , its variance would stay at 2.25 and the bound with would be . The probability of moving away would be 0.88 with one song or with a thousand: repeating a data point tells you nothing new.
Proof 4: the law for relative frequencies
What is to be proved
If are independent Bernoulli and is the proportion of successes (skipped songs, for example), for any :
and the second bound does not depend on : it serves to choose before knowing what is.
Why it matters. It says that the relative frequency gets close to the probability, the idea of probability “in the long run”. And the bound without answers the question of any survey: how much data do I need before knowing anything.
Where we start from
From proof 3 and the mean and variance of a Bernoulli: and .
Step 1: the law of large numbers with
It is proof 3 with and :
Step 2: the worst case of
is a downward parabola. Its derivative, , is zero at , where it equals . So, for any , , and:
Step 3: the that guarantees a precision
If you want to be within of with probability at least , it is enough for the bound to be :
Why it is enough: , and if the bound is , that is . To solve for you multiply by : the direction does not change.
To estimate the proportion of songs you skip with an error of 0.05 and probability 0.95: songs, without knowing anything about .
Check it with R
p <- seq(0, 1, by = 0.25) p * (1 - p) # never exceeds 0.25, and reaches it at p = 0.5 1 / (4 * 0.05 * 0.05^2) # n for error 0.05 with prob. 0.95
Output:
[1] 0.0000 0.1875 0.2500 0.1875 0.0000 [1] 2000
Check you’ve got it: if you know you skip at most one song in ten, how many songs are enough for the same error and the same probability?
720 are enough. The parabola goes up on , so with its maximum is , not 1/4. With the bound of step 1, , compared with 2000.
Proof 5: the two faces of the CLT
What is to be proved
That standardising the mean and standardising the sum give the same variable:
and, therefore, that if , then and .
Why it matters. In the exam you are asked sometimes about the session mean and sometimes about the total. Here you see it is the same result and which standard deviation goes with each: with the mean, with the sum. Mixing them up is the most repeated mistake.
Where we start from
From and what you saw in topic 5: if , .
Step 1: multiply top and bottom by
In the denominator, . It is the same calculation that gives .
Step 2: undo the standardisation
Solving, and . If is almost , each is almost a normal with that mean and standard deviation:
And for any , translates, solving for , into:
Why you can solve for them like this: is the form from topic 5, with mean and standard deviation . With the sum, and .
Check it with R
set.seed(2026) x <- 2 + rexp(20, 2/3); n <- 20; mu <- 3.5; sigma <- 1.5 c(via_the_mean = (mean(x) - mu) / (sigma / sqrt(n)), via_the_sum = (sum(x) - n * mu) / (sigma * sqrt(n)))
Output:
via_the_mean via_the_sum
2.896556 2.896556
For the same 20-song session, the two standardisations give the same number, 2.90: this session came out long, almost three standard deviations above what was expected. Choosing one or the other in the exam is a matter of convenience: if you are asked about the total, the sum; if about the mean, the mean.
Check you’ve got it: what probability does the CLT give for a 20-song session lasting more than 80 minutes? Do it with the sum and with the mean.
With the sum: . With the mean: 80 minutes are 4 on average, and . The same , as step 1 says, and .
Proof 6: the idea of the CLT with the moment generating function
What is to be proved
That if the are iid with mean , variance and an mgf that exists near 0, the mgf of tends to that of an , which is . By the continuity theorem (notes, theorem 9), that is enough for .
In the notes the CLT is stated without proof; this is the idea, and it is good for understanding why you get a normal and not something else.
Why it matters. It explains why a normal comes out whatever the starting distribution. And the scheme (standardise, mgf, Taylor near 0, limit of the number ) is the one in proof 7 and in the binomial of “Prove it yourself”.
Where we start from
From the mgf rules (sum of independents and ), Taylor and the limit of the number .
Step 1: standardise each term
Let . They are iid with and , and
Step 2: the mgf of
By independence, the mgf of the sum is the product, and the constant goes inside the argument:
The two rules one after the other: the constant goes inside the argument (), and by independence the mgf of the sum is the product. Since the are identical, the factors are equal: hence the power .
Step 3: Taylor of near 0
The mgf stores the moments in its derivatives at 0: , and . So, for small ,
With , which is small when is large:
(the terms with and beyond, multiplied by , still tend to 0).
Step 4: the limit
by the limit of the number with . And is the mgf of the :
What is taken for granted: the first equality of step 4 takes out as a common factor to get the form from the table. And the final arrow is the continuity theorem: if the mgfs get close near 0, so do the distribution functions.
Why a normal: in step 3 only the mean (0) and the variance (1) of each term survive. All the information about the shape (skewness, tails) is in the terms of order 3 and higher, which the crushes. That is why the starting distribution does not matter.
For the song
With the playlist, , and is an exp(1) (by the rule: an exp(2/3) multiplied by 2/3). Its mgf is for , so and
Check it with R
M <- function(t, n) (exp(-t / sqrt(n)) / (1 - t / sqrt(n)))^n # mgf of Z_n for the song round(sapply(c(1, 5, 20, 100, 1000), function(n) M(1, n)), 4) round(exp(1^2 / 2), 4) # mgf of the N(0, 1) at t = 1
Output:
[1] Inf 2.0706 1.8036 1.7092 1.6666 [1] 1.6487
How to read it
Infwith : the mgf of a single standardised song does not exist at (it needs ). The long tail of the exponential does not allow it.- 2.0706, 1.8036, 1.7092, 1.6666: with 5, 20, 100 and 1000 songs the value goes down towards 1.6487, which is . In the drawing, the and curves stick to the normal one near 0 and separate at the ends: the convergence is “in a neighbourhood of 0”, as the continuity theorem requires.
Check you’ve got it: in step 3, why is the term in s equal to 0, and what would happen if we did not subtract the mean?
It is 0 because and is centred. Without subtracting , the derivative at 0 would be and the bracket would contain ; times , , which grows without end: there is no limit. That is why the CLT talks about .
Proof 7: the Poisson becomes normal
What is to be proved
If , then tends in distribution to an as . This is what justifies in the theory.
Why it matters. When you count events with a high mean (the ads of many sessions), the Poisson is computed with the normal. And it is the technique of proof 6 with every step done by hand.
Where we start from
There are two routes. The short one, with the CLT: is the sum of independent Poisson (topic 3: the mgf of the sum is ), with , so . The long one, directly with the mgf, shows how proof 6 works in a concrete case. We take the long one.
Step 1: the mgf of
With and the rules for and adding a constant ():
Where it comes from: . Subtracting gives the factor ; the goes inside the argument (rule for ).
Step 2: Taylor of the exponent
Multiplying by and subtracting :
It is the Taylor expansion of from the table with , without the 1. Multiplying by : , . And since the exponential is continuous, the limit of the exponent carries over to .
Step 3: the limit
The term cancels, stays and the rest tend to 0. So
the mgf of the . The same with a binomial: as with fixed (you have it in “Prove it yourself”).
Check it with R
MP <- function(t, m) exp(m * (exp(t / sqrt(m)) - 1) - t * sqrt(m)) # mgf of (T - m)/sqrt(m) round(sapply(c(1, 10, 60, 1000), function(m) MP(1, m)), 4)
Output:
[1] 2.0509 1.7457 1.6858 1.6575
With and 1000 at : 2.05, 1.75, 1.69, 1.66, going down towards . With , the ads of 30 sessions in the theory, the mgf is already four hundredths from the normal, and the approximation of was off by two thousandths.
Check you’ve got it: why do we divide by the square root of m and not by m?
Because the standard deviation of is , and standardising means dividing by it. Dividing by , the would become and the mgf would tend to 1, the mgf of a constant: collapses to 0.
Proof 8: the sample size, with Chebyshev and with the CLT
What is to be proved
The minimum such that :
where is the quantile of the : qnorm(1 - alpha/2), 1.96 for .
Why it matters. “How much data do I need?” is a fixed exam question. The two formulas together show the price of assuming nothing: Chebyshev holds with any distribution; the CLT gives a much smaller , but an approximate one.
Step 1: with Chebyshev
By proof 3, . It is enough for that bound to be :
In the last step we multiply by , which does not change the direction.
Step 2: with the CLT
For large , , so:
We want that to be , that is, . Since is increasing, its inverse is applied to both sides:
What step 2 skips: , because by symmetry; and is , adding 1 and dividing by 2.
Check it with R
sigma <- 1.5; alpha <- 0.05; c0 <- c(0.5, 0.25, 0.1) # precisions, in minutes
rbind(Chebyshev = ceiling(sigma^2 / (alpha * c0^2)),
CLT = ceiling((qnorm(1 - alpha / 2) * sigma / c0)^2))
Output:
[,1] [,2] [,3] Chebyshev 180 720 4500 CLT 35 139 865
Both formulas have in the denominator: halving the precision multiplies by 4. And the ratio between the two is always the same, : with , Chebyshev asks for about five times more.
Check you’ve got it: what n do the two formulas ask for with a precision of 0.25 minutes and alpha = 0.1?
Chebyshev: . CLT: the quantile is and , which is rounded up: 98. Both go down, and Chebyshev still asks for more than three times as many.
Prove it yourself
Try each one on paper before opening the solution.
- Markov with powers. Prove that, for any and , . Which inequality of the topic do you get with and instead of ?
- The binomial becomes normal. If , use the CLT to justify that tends to an and write the approximation of with continuity correction.
- Twelve uniforms. Let be the sum of 12 independent uniforms . Prove that has mean 0 and variance 1, and explain why it is almost an .
Solution 1: Markov with powers
is non-negative. Since and is increasing on , : the same event. Applying Markov to with the value :
With and instead of you get : Chebyshev. With a larger the bound falls faster with (like ), but it needs a higher moment.
Solution 2: the binomial becomes normal
has the same distribution as with independent Bernoulli . Each has and , finite. By the CLT:
only takes integer values; each value is associated with the interval , so is the interval up to :
Solution 3: twelve uniforms
Each has mean and variance (topic 4). By linearity and independence:
By the CLT, ; with the denominator is 1 and you get exactly . Since the uniform is symmetric, the CLT already works very well with 12: it was a classic trick to simulate normals before rnorm existed. It is not exactly normal: it never leaves .
When to use each result
| If you are asked for… | Use | What you need |
|---|---|---|
| A bound with only the mean, | Markov | |
| A bound for moving away from the mean | Chebyshev | , |
| Proving that approaches | Weak law (Chebyshev with ) | , , independence |
| The for a proportion without knowing | , | |
| An approximate probability of or | CLT | , , large |
| Proving that a family becomes normal | mgf of the standardised variable → | The mgf |
| The for a precision of | Chebyshev or CLT (proof 8) | , , |
Typical mistakes when proving
Using Markov without saying the variable is non-negative. It is the hypothesis used in step 2: write it down.
Replacing by or by . The constant comes out squared (), but the sum of equal variances brings an : you get . And it only holds if they are independent.
Flipping the inequality when moving to the complement when you shouldn’t, or not flipping it when you should. If , then . Check with a very large : the outside bound must go to 0 and the inside one to 1.
In the CLT proof, forgetting the inside the argument of the mgf, , and writing . That is the mgf of the unstandardised sum, which converges to nothing.
Solving for and leaving the answer as a decimal or rounding down. is a number of observations and the inequality is : always round up.
Try it in the R playground
Open the R playground on the site (or RStudio) and paste this script. It checks the three pieces of this article with the playlist:
set.seed(2026) x <- 2 + rexp(100000, 2/3) # 1. Markov and Chebyshev: bound against the simulated frequency t <- c(5, 7, 9) rbind(Markov = 3.5 / t, simulated = sapply(t, function(s) mean(x >= s))) k <- c(1.5, 2, 3) rbind(Chebyshev = 1 / k^2, simulated = sapply(k, function(j) mean(abs(x - 3.5) >= 1.5 * j))) # 2. The mgf of Z_n approaches the normal one M <- function(t, n) (exp(-t / sqrt(n)) / (1 - t / sqrt(n)))^n curve(exp(x^2 / 2), -1, 1, lwd = 2, ylab = "mgf") for (n in c(5, 20, 100)) curve(M(x, n), -1, 1, add = TRUE, lty = 2) # 3. The n of proof 8, checked by simulation n <- 139 mean(replicate(2000, abs(mean(2 + rexp(n, 2/3)) - 3.5) < 0.25)) # close to 0.95
Things to look at:
- That in both tables the simulated row is always below the bound, and well below the further out you go.
- That the dashed curves join the solid one () as grows, sooner near 0 than at the ends.
- That with the CLT’s 139 songs the proportion of means within 0.25 of 3.5 comes out close to 0.95.
Summary
| Proof | Key idea | Result |
|---|---|---|
| 1. Markov | Split , drop the lower part and flatten the upper part down to | |
| 2. Chebyshev | Markov on , with | |
| 3. Weak law | Chebyshev on , with variance | |
| 4. Frequencies | ||
| 5. Two faces | Multiply top and bottom by | |
| 6. CLT with the mgf | Taylor: only mean and variance survive | |
| 7. Poisson | The cancels | |
| 8. Sample size | Solve from the bound or from | or |
Now, on to computing: the inequalities and limit theorems practice in R repeats these checks with large simulations, histograms and quantile-quantile plots. If a proof gets stuck, go back to the theory, where each result first appears with the playlist.
Next step: practiceInequalities and limit theorems in R — practice with 100,000 songs, running means, replicate and qqnorm (and the histogram that was a single bar)Did this article help you? Here is how you can support SergioLearns →



