# If sample average converges in an iid sample, must it converge to the mean?

WLLN tells us that if $$X_1,...,X_n$$ are iid, with $$X_1$$ having finite mean $$\mu$$, then their sample average converges in probability to $$\mu$$.

Suppose instead we know that $$X_1,...,X_n$$ are iid and their sample average converges in probability to a constant. Can we argue that $$X_1$$ has a finite mean and hence that such a constant must be the mean of $$X_1$$?

For counter-examples, you might want to consider cases where the weak law of large numbers applies but the strong law of large numbers does not. These cases must have $$E[X_1]$$ undefined.

For example, adapting the second example in Wikipedia,

• suppose $$\mathbb P\left(X_1=\frac{(-2)^n}{n} \right)=\frac1{2^n}$$ for positive integer $$n$$
• this does not have a mean since $$\sum\limits_{n=1}^\infty \frac{(-2)^n}{n} \frac1{2^n}=\sum\limits_{n=1}^\infty \frac{(-1)^n}{n}$$ does not converge absolutely
• but the sum does converge conditionally to $$-\log_e(2)\approx -0.693$$ and the sample averages converge in probability to this

In this example, you need a large sample to see much convergence. For example with $$10^4$$ simulations each with sample sizes of $$10^2$$ (red), $$10^3$$ (green) and $$10^4$$ (blue), the following R code

Xbar <- function(cases){
Y <- rgeom(cases, 1/2) + 1 # R's geometric distribution starts at 0
X <- (-2)^Y / Y
mean(X)
}

set.seed(2023)
sims4 <- replicate(10^4, Xbar(10^4))
plot(density(sims4, from=-2, to=1), col="blue")
sims3 <- replicate(10^4, Xbar(10^3))
lines(density(sims3, from=-2, to=1), col="green")
sims2 <- replicate(10^4, Xbar(10^2))
lines(density(sims2, from=-2, to=1), col="red")
abline(v = -log(2))


shows the increasing concentration of the sample mean as the sample size increases • Thanks Henry, very nice answer. This gets me thinking of the restrictive definition of the mean in the Lebesgue sense, with $E[X]=E[X^{+}]-E[X^{-}].$ If, for instance, the mean was given by the conditionally convergent sum in your example, we would say the mean exists and the sample average would converge to it. What is a more general definition of the mean that would satisfy the property that a sample average (from an iid sample) that is known to converge in probability to a constant would always converge in probability to such a mean? Mar 19 at 23:19
• @Golden_Ratio - I do not know though others might. You might extend your question to whether you can have the traditional definition of mean that gives the SLLN with almost sure convergence and a weaker definition of mean which gives the WLLN with convergence in probability. Mar 20 at 0:00
• For a different example illustrating a difference between WLLN and SLLN, see stats.stackexchange.com/a/205564/2958 Jul 30 at 8:57