TITLE: Moments and weak convergence of probability measures
QUESTION [7 upvotes]: I was wondering, if you have a sequence of probability measures $(\mu_n)_n$ on $\mathbb R$ and you know that there is a probability measure $\mu$ such that for all $k\in\mathbb N=\{0,1,2,\cdots\}$ 
$$
\lim_{n\rightarrow\infty}\int x^kd\mu_n(x)=\int x^kd\mu(x),
$$
does it imply that for any continuous and bounded function $f$ you have
$$
\lim_{n\rightarrow\infty}\int f(x)d\mu_n(x)=\int f(x)d\mu(x) \qquad ?
$$
And if no, what if $\mu$ has compact support ?
EDIT : I'm kind of lost : I understand reading the answers that it is somehow necessary that $\mu$ is characterized by its moments, but on an other hand, I come up with this proof, where I don't see what's wrong with. Could you help ?
Since $\mu_n$ converges towards $\mu$ in moments, we have by density of the polynomials in $C_c(\mathbb R)$ that for any $h\in C_c(\mathbb R)$
$$
\lim_{n\rightarrow\infty}\int h(x)d\mu_n(x)=\int h(x)d\mu(x).
$$
Now, let $f\in C_b(\mathbb R)$, take any $h\in C_c(\mathbb R)$ satisfying $0\leq h \leq 1$, and write
$$
\left|\int f(x)d\mu_n(x)-\int f(x)d\mu(x)\right|
$$
$$
\leq \left|\int f(x)d\mu_n(x)-\int f(x)h(x)d\mu_n(x)\right|+\left|\int f(x)h(x)d\mu_n(x)-\int f(x)h(x)d\mu(x)\right|+\left|\int f(x)h(x)d\mu(x)-\int f(x)d\mu(x)\right|.
$$
Thus, using $\lim_n\mu_n(\mathbb R)=\mu(\mathbb R)$ (i.e the convergence of the "$0$-th moment"), we obtain
$$
\limsup_n\left|\int f(x)d\mu_n(x)-\int f(x)d\mu(x)\right|\leq 2\|f\|_{\infty}\int(1-h(x))d\mu(x).
$$
Finally, given $\epsilon >0$, one can choose $g$ such that
$$
\int(1-h(x))d\mu(x)\leq \frac{\epsilon}{2\|f\|_{\infty}},
$$
I have the impression that I obtain the result... Where's the mistake ?
Thanks in advance !

REPLY [2 votes]: There are some essential details missing in the other arguments, so I'll try to fill them in.  The basic outline of this argument is to use the "subsequence trick" to show that every subsequence of  $\mu_n$ has a further subsequence which converges to $\mu$: we will pass to an arbitrary subsequence, then use Helly's theorem to extract a further subsequence which converges in distribution (by tightness).  The idea here will be to show that the given moment condition allows us to show that all of these subsequences must converge to the same measure.   As has previously been commented, this entire argument only makes sense if $\mu$ is determined by its moments, so I make that assumption.  Several counterexamples to the claim are given in the other answers if you do not make that assumption.
Take such a subsequence (I will use $\mu_n$ itself for ease of notation) $\mu_n \to \mu$.  It is a fact (see for example Durrett 3.2.2) that we may without loss of generality work with a sequence $X_n \to X$ almost surely where the law of $X_n$ is $\mu_n$ and the law of $X$ is $\mu$.
Let $M$ be given and large. By the bounded convergence theorem for
each $k$ $EX_{n}^{k}1_{{|X_{n}|\leq M}}\to$$EX^{k}1_{{|X|\leq M}}.$
By the Cauchy-Schwarz and Markov inequalities $E|X_{n}^{k}1_{\{|X_{n}|>M\}}|\leq\sqrt{\frac{EX_{n}^{2k}E|X_{n}|}{M}}$.
This part is possibly superfluous, but I think it is worth showing that if the moments converge as sequences of real numbers (this assumption is necessary for the argument here, by the way--I need to bootstrap off of higher moments to get convergence), then the target random variable has finite moments.  Since $EX_{n}^{2k}$ and $EX_{n}$ converge as sequences of real numbers (remember, $k$ is fixed here),
there exists a uniform bound $K$ for which $\sup_{n}EX_{n}^{2k}E|X_{n}|<K$
so that $\sup_{n}E|X_{n}^{k}1_{\{|X_{n}|>M\}}|<\sqrt{\frac{K}{M}}$.
Taking $M\geq K$ we have $\sup_{n}EX_{n}^{k}\leq2M^{k+2}+1$ Then by Fatou's
Lemma, since $EX^{k}\leq\liminf_{n}EX_{n}^{k}<\infty$ it follows that $EX^{k}$
exists.
Noticing that $EX_{n}^{k}1_{\{|X_{n}|\leq M\}}\to EX^{k}1_{\{|X|\leq M\}}$
we have $\limsup_{n}|EX_{n}^{k}-EX^{k}|\leq\sup_{n}EX_{n}^{k}1_{{|X_{n}|\geq M}}+EX1_{{|X|\geq M}}$where
this last inequality holds for each $M$. Notice that $X1_{\{|X|\geq M\}}$
is dominated by $|X|$ and $X1_{\{|X|\geq M\}}\to0$ pointwise, so
that $\lim_{M\to\infty}EX1_{\{|X|\geq M\}}=0$ by the dominated convergence
theorem. Taking limits in $M$ and using $E|X_{n}^{k}1_{\{|X_{n}|>M\}}|\leq\sqrt{\frac{K}{M}}$ uniformly in $n$ we then obtain $\limsup_{n}|EX_{n}^{k}-EX^{k}|=0$.
This shows that every subsequence of $\mu_n$ (the original sequence) has a further subsequence which converges to some measure and that the moments of that measure must agree with the moments of $\mu$. Since there exists a topology in which convergence corresponds to weak convergence of measures, this implies that $\mu_n \to \mu$ weakly (and therefore in distribution by tightness).