# Almost sure convergence vs convergence of probability density functions

Let $$X_n, X$$ be $$[0, 1]$$-valued random variables whose laws are absolutely continuous with respect to Lebesgue measure. Suppose $$X_n \to X$$ a.s. Does this imply that the pdfs of $$X_n$$ converge to that of $$X$$ in some suitable sense?

For concreteness, the three I have in mind are convergence a.e., convergence in $$L^p$$, and convergence in measure; where the measure theoretic statements are with respect to the Lebesgue measure. However I suspect none of these are true. On the other hand, it would seem unusual for there to be no convergence at all on the pdfs. What is the right type of convergence to be looking at?

The answer is no. Indeed, for natural $$n$$ let $$p_n(x):=1+\tfrac12\,\text{sign}\,\sin(2\pi nx)$$ if $$x\in[0,1]$$, with $$p_n(x):=0$$ if $$x\notin[0,1]$$. Then $$p_n$$ is a pdf, with the corresponding cdf $$F_n$$, so that $$F_n(x)=\int_{-\infty}^x p_n(t)\,dt$$ for all real $$x$$. The cdf $$F_n$$ is continuously and strictly increasing on $$[0,1]$$, with $$F_n(0)=0$$ and $$F_n(1)=1$$. Hence, for each $$u\in(0,1)$$ there is a unique root $$x=F_n^{-1}(u)$$ of the equation $$F_n(x)=u$$. Moreover, the function $$F_n^{-1}\colon(0,1)\to\mathbb R$$ is continuous.

Further, $$F_n(x)\to x$$ for all $$x\in[0,1]$$ and hence $$F_n^{-1}(u)\to u$$ for all $$u\in(0,1)$$ (as $$n\to\infty$$).

Let now $$X_n:=F_n^{-1}(U)$$ and $$X:=U$$, where $$U$$ is any random variable uniformly distributed on $$(0,1)$$. Then $$X_n\to X$$ almost surely. Also, $$F_n$$ is the cdf of $$X_n$$ and hence $$p_n$$ is the pdf of $$X_n$$.

However, the pdf $$p_n$$ of $$X_n$$ does not converge to the pdf (say $$p$$) of $$X$$ even in measure -- because otherwise, by dominated convergence, $$p_n$$ would converge to $$p$$ in $$L^1$$, whereas the $$L^1$$ norm of $$p_n-p$$ is $$\int_0^1|p_n(x)-1|\,dx=\frac12\not\to0.$$

On a positive note, the almost sure convergence of $$X_n$$ to $$X$$ will of course imply the convergence of $$X_n$$ to $$X$$ in distribution, so that the pdf $$p_n$$ of $$X_n$$ will converge to the pdf $$p$$ of $$X$$ in the weak sense that $$\int_{\mathbb R}f(x)p_n(x)\,dx\to\int_{\mathbb R}f(x)p(x)\,dx$$ for each bounded continuous function $$f\colon\mathbb R\to\mathbb R$$.

• Nice example! Do you think there’s some suitable notion of convergence we could get? Feb 5, 2021 at 17:36
• Given the “riemann lebesgue lemma” style of the counterexample, I suspect the right convergence may be weak-* convergence in L^$\infty$. Feb 5, 2021 at 17:45
• @NateRiver : I have added a "positve note". Feb 5, 2021 at 17:53
• Thank you! I wonder if we can get something stronger, like convergence of $\int_{\mathbb R}f(x)p_n(x)\,dx$ to $\int_{\mathbb R}f(x)p(x)\,dx$ for all essentially bounded measurable $f$. In other words weak convergence as elements of the dual of $L^\infty$ rather than $C_b^0$. I think this a priori is strictly stronger but I’m not entirely sure. Feb 7, 2021 at 1:21
• @NateRiver : I think you cannot do it for $L^\infty$. Indeed, for your purposes the condition that $X_n\to X$ almost surely is only as good as that $X_n\to X$ in distribution. But then you can construct a Borel set $A$ (necessarily with $P(X\in \partial A)>0$) such that $\int 1_A p_n=P(X_n\in A)\not\to P(X\in A)=\int 1_A p$, where $p$ is the pdf of $X$. Feb 7, 2021 at 17:07