If random variables $X$ and $Y$ have the same moment for all order, then they have the same distribution?

64 Views Asked by At

I want to know If random variables $X$ and $Y$ have the same moment for all order, then they have the same.

I know this statement is true if the space of $X$ and $Y$ are compact by Weierstrass approximation.

But does it still hold true if they can take any real value?