If two random variables have the same variance and expectation, do they have the same distribution?

If two random variables say $X$ and $Y$ have the same variance and expectation, do they have the same distrubution?

• No, you need to consider also higher moments. Only the normal distribution (the Gaussian) is completely determined by its expectation and variance. – Luke Oct 12 '17 at 9:18
• Are you assuming that X and Y both come from the same distribution family, i.e. both normal or both Gamma, or could X be gamma and Y normal? – user121049 Oct 12 '17 at 9:47
• @user121049 Yes let's say they come from the same distribution family – Keep_On_Cruising Oct 12 '17 at 9:52
• @O.Kro "distribution family" is a vague concept. In general, anyway, that only their first and second moments match is far from two RVs being the same. However, if they match up to a high order of moment, then you can say they are pretty "close" in distribution. This follows from the equivalence between distributions and characteristic functions. – Vim Oct 12 '17 at 10:04
• As mentioned above, if you are considering two arbitrary distributions in general, then the first two moments conditions are not sufficient to determine they are equal in distribution, and you can easily construct many simple counter example. If you are precisely considering some parametric families, then it depends the number of parameters (dimension of the parameter space) and the number of moment conditions you provided - only when the set of conditions are enough to solve all the parameters. – BGM Oct 12 '17 at 10:49

No.

Example 1: Let $X$ be binomially distributed with $n = 4$ and $p = 1/2$; then $\mu = 2$ and $\sigma^2 = 1$. Let $Y$ be normally distributed with $\mu = 2$ and $\sigma^2 = 1$. Clearly these do not have the same distribution; one is discrete and the other is continuous.

Example 2: Let $X$ be exponentially distributed with $\mu = 10$ ($\implies \sigma = 10$). Let $Y$ be normally distributed with $\mu = 10$ and $\sigma = 10$. These do not have the same distribution, since $Y$ can assume negative values but $X$ can't.

These examples feel kind of cheap because a normal distribution has its mean and variance (or standard deviation) as its parameters, so for a slightly more concrete example:

Let $$X = \begin{cases} 1,& \textrm{w/ probability 1/2} \\ -1, & \textrm{w/ probability 1/2} \end{cases}$$ and let $$Y = \begin{cases} 2,& \textrm{w/ probability 1/8} \\ 0, & \textrm{w/ probability 3/4} \\ -2, & \textrm{w/ probability 1/8.} \end{cases}$$ One can compute for both $X$ and $Y$ that $\mu = 0$ and $\sigma^2 = 1$.

• You wrote: "Let $X$ be exponentially distributed with $\mu = 10$ ($\implies \sigma = 10$). Let $Y$ be exponentially distributed with $\mu = 10$ and $\sigma = 10$. These do not have the same distribution." But the problem is, they do. A typo? – Michael Hardy Oct 13 '17 at 2:39
• Ha! Fair point. I'll edit. – Aaron Montgomery Oct 13 '17 at 2:40

The following two distributions both have expected value $0$ and variance $1$:

• the $N(0,1)$ distribution
• the uniform distribution on $\left[-\sqrt 3, +\sqrt 3\,\,\right]$