I am trying to solve the problem from MIT Open Coursware "Statistics for Applications" problem set. Specifically the first one:
"For $n \in N^*$, let $X_n$ be a random variable such that $P[X_n = \frac{1}{n}] = 1 - \frac{1}{n^2}$ and $P[X_n = n] = \frac{1}{n^2}$. Does $X_n$ converge in probability? In $L^2$?"
So as for convergence in probability (from definition) I need to show that $P[|X_n - X| \geq \varepsilon]$ converges to 0 as $n$ goes to infinity for every $\varepsilon \gt 0$.
I am not sure if my approach is correct:
Every random variable $X_1, X_2, \ldots$ can have two outcomes. Either $\frac{1}{n}$ with probability $1-\frac{1}{n^2}$ or $n$ with probability $\frac{1}{n^2}$.
So as I start to calculate those probabilities for different values of $n$ I get:
For $X_1$: $P[X_1 = 1] = 0$ and $P[X_1 = 1] = 1$ (don't know how to understand that)
For $X_2$: $P[X_2 = \frac{1}{2}] = \frac{3}{4}$ and $P[X_2=2] = \frac{1}{4}$
For $X_3$: $P[X_3 = \frac{1}{3}] = \frac{8}{9}$ and $P[X_3=3] = \frac{1}{9}$
and so on...
Now I notice that as n gets larger $X_n$ tends to favor $\frac{1}{n}$ more and more.
So I choose a random variable $X$ such that $P[X=\frac{1}{n}] = 1$ which basically means that $X=\frac{1}{n}$.
Now plugging everything to the definition of probability convergence:
$$\lim_{n\to\infty} P[|X_n - X| \geq \varepsilon] = \lim_{n\to\infty} P[|X_n - \frac{1}{n}| \geq \varepsilon]$$
Now I can discard the absolute value because for $n \in N^*$ $X_n$ is either $n$ or $\frac{1}{n}$ and in this case $n-\frac{1}{n}$ and $\frac{1}{n} - \frac{1}{n}$ are always greater or equal to 0.
Continuing:
$$\lim_{n\to\infty} P[X_n - \frac{1}{n} \geq \varepsilon]$$
And now this part is a bit tricky - I look what happens in the limit. So as $n \to \infty$:
$$P[X_n=\frac{1}{n}] = 1 \;and\; P[X_n=n] = 0$$
Which basically means that $X_n = \frac{1}{n}$ as $n \to \infty$. So now: $$\lim_{n\to\infty} P[X_n - \frac{1}{n} \geq \varepsilon] = P[0 \geq \varepsilon]$$
Which equals to 0 because $\varepsilon \gt 0$. So $X_n$ converges in probability.
So my questions are:
- Is this approach correct? I feel like the beginning is reasonable but at the end it is kind of shady, especially the limit calculation - could it be done in more steps to describe the reasoning better?
- What would be a formally correct way to prove that $X_n$ converges in probability?
- How to understand that for $X_1$ I get $P[X_1 = 1] = 0$ and $P[X_1 = 1] = 1$?
- If random variable $X$ is such that $P[X=\frac{1}{n}] = 1$ is it correct to write $P[X=\frac{1}{n}] = 1 \Leftrightarrow X=\frac{1}{n}$?
EDIT: Thanks for all the responses, they really cleared up things for me. I am wondering about convergence in $L^2$ - now that we have established that $X_n$ converges in probability to 0 can I use that result to prove that it also converges in $L^2$?
So now I need to show that $E[X_n^2]$ goes to 0 as $n$ goes to infinity. So now because I know that $X_n$ converges to 0 in probability could I write: $$ \lim_{n\to\infty} E[X_n^2] = E[0] = 0$$ ? Or is probability convergence to weak to infer that?
The other soulution would be: $$E[X_n^2] = E[(\frac{1}{n}(1-\frac{1}{n^2}) + n \frac{1}{n^2} )^2 ] = E[( \frac{1}{n} - \frac{1}{n^3} + \frac{1}{n})^2 ] = E[(\frac{2}{n} - \frac{1}{n^3})^2] \xrightarrow[n \to \infty]{} E[0] = 0$$
Is it correct?
EDIT2:
So:
$Pr[X_n^2 = (\frac{1}{n})^2] = 1-\frac{1}{n^2}$ and $Pr[X_n^2=n^2]= \frac{1}{n^2}$.
Then: $E[X_n^2]= (\frac{1}{n})^2 (1-\frac{1}{n^2}) + n^2 \frac{1}{n^2} = \frac{1}{n^2} - \frac{1}{n^4} + 1 \xrightarrow[n \to \infty]{} 1$
So now this means that $X_n$ does not converge to 0 in $L^2$. Which also means that the previous approach was wrong and probability convergence was to weak.