Whether distributions with the same moments are identical Following are similar to but different from previous posts here and here


*

*Given two distributions which admit moments of all orders, if all the moments of two distributions are the same, then are they identical distributions a.e.?

*Given two distributions which admit moment generating functions, if
they have the same moments, are their moment generating functions
the same?   

 A: Let me answer in reverse order:
2. Yes. If their MGFs exist, they'll be the same*.
see here and here for example
Indeed it follows from the result you give in the post this comes from; if the MGF uniquely** determines the distribution, and two distributions have MGFs and they have the same distribution, they must have the same MGF (otherwise you'd have a counterexample to 'MGFs uniquely determine distributions'). 
* for certain values of 'same', due to that phrase 'almost everywhere'
** 'almost everywhere'


*

*No - since counterexamples exist.


Kendall and Stuart list a continuous distribution family (possibly originally due to Stieltjes or someone of that vintage, but my recollection is unclear, it's been a few decades) that have identical moment sequences and yet are different. 
The book by Romano and Siegel (Counterexamples in Probability and Statistics) lists counterexamples in section 3.14 and 3.15 (pages 48-49). (Actually, looking at them, I think both of those were in Kendall and Stuart.)
Romano, J. P. and Siegel, A. F. (1986),
Counterexamples in Probability and Statistics.
Boca Raton: Chapman and Hall/CRC.
For 3.15 they credit Feller, 1971, p227
That second example involves the family of densities 
$$f(x;\alpha) = \frac{1}{24}\exp(-x^{1/4})[1-\alpha \sin(x^{1/4})], \quad x>0;\,0<\alpha<1$$
The densities differ as $\alpha$ changes, but the moment sequences are the same.
That the moment sequences are the same involves splitting $f$ into the parts
$\frac{1}{24}\exp(-x^{1/4}) -\alpha \frac{1}{24}\exp(-x^{1/4})\sin(x^{1/4})$
and then showing that the second part contributes 0 to each moment, so they are all the same as the moments of the first part.
Here's what two of the densities look like. The blue is the case at the left limit ($\alpha=0$), the green is the case with $\alpha=0.5$. The right-side graph is the same
but with log-log scales on the axes.

Better still, perhaps, to have taken a much bigger range and used a fourth-root scale on the x-axis, making the blue curve straight, and the green one move like a sin curve above and below it, something like so:

The wiggles above and below the blue curve - whether of larger or smaller magnitude - turn out to leave all positive integer moments unaltered. 

Note that this also means we can get a distribution all of whose odd moments are zero, but which is asymmetric, by choosing $X_1,X_2$ with different $\alpha$ and taking a 50-50 mix of $X_1$, and $-X_2$. The result must have all odd moments cancel, but the two halves aren't the same.
