If I have two different symmetric (with respect to the median) distributions $X$ and $Y$, is the difference $X-Y$ also a symmetric (with respect to the median) distribution?

  • 6
    $\begingroup$ The distribution of $X-Y$ is not a "difference between two distributions", it's the distribution of the difference between symmetrically-distributed random variables; The difference in distributions would be $F_X(t)-F_Y(t)$; which is not a distribution; similarly a difference of pdfs would not be a pdf... please amend your title description $\endgroup$
    – Glen_b
    Dec 15, 2017 at 22:42
  • 3
    $\begingroup$ @Glen_b: I edited the OP's title to say so, but in future please go ahead and edit it yourself. Colloquially I think everyone understood what the OP meant. $\endgroup$
    – smci
    Dec 16, 2017 at 9:23
  • 1
    $\begingroup$ @smci Actually, I chose to ask the OP to do it rather than doing it myself for a reason (if you check my profile you'll see I have over 3100 posts edited -- I understand the general rules about editing). Thanks for helping out, though. I also think a little more care with expressing what is meant would solve a substantial fraction of the novice questions on site; and I think clarity is especially important in a title. $\endgroup$
    – Glen_b
    Dec 17, 2017 at 7:34

3 Answers 3


Let $X \sim f(x)$ and $Y \sim g(y)$ be PDFs symmetric about medians $a$ and $b$ respectively. As long as $X$ and $Y$ are independent, the probability distribution of the difference $Z = X - Y$ is the convolution of $X$ and $-Y$, i.e.

$$ p(z) = \int_{-\infty}^\infty f(z + y) g(-y) dy, $$

where $h(y) = g(-y)$ is simply the PDF over $-Y$ with median $-b.$

Intuitively, we would expect the result to be symmetric about $a - b$ so let's try that.

$$ \begin{split} p(a - b - z) &= \int_{-\infty}^\infty f(a - b - z + y) g(-y) dy \\ &= \int_{-\infty}^\infty f(a + b + z - y) g(y - 2 b) dy \\ &= \int_{-\infty}^\infty f(a - b + z + v) g(-v) dv \\ &= p(a - b + z). \end{split} $$

In the second line I used both the symmetry of $f(x)$ about $a$ and of $g(-y)$ about $-b.$ In the third line, I used the substitution $v = 2 b - y$ in the integral. This proves that $p(z)$ is symmetric about $a - b$ if $f(x)$ is symmetric about $a$ and $g(y)$ is symmetric about $b.$

If $X$ and $Y$ were not independent, and $f$ and $g$ were simply marginal distributions, then we would need to know the joint distribution, $X,Y \sim h(x,y).$ Then, in the integral, we would have to replace $f(z + y) g(-y)$ with $h(z + y, -y).$ However, just because the marginal distributions are symmetric, that does not imply that the joint distribution is symmetric about each of its arguments. So you could not apply similar reasoning.

  • 1
    $\begingroup$ This example appears to prove that p(a - b - z) = p(z), but if p is symmetric around ( a - b), then I would have thought that you would need to prove that p(a - b - z) = p(a - b + z)? $\endgroup$
    – Obromios
    Apr 28, 2022 at 7:36
  • 1
    $\begingroup$ @Obromios Yes, you're right! I must have had a brain fart when first writing this, by thinking the condition for symmetry about $a$ was $f(a - x) = f(x)$, because I applied that to both $f$ and $g$ when doing the derivation, and, when doing this it just so happened by weird luck that this fake condition for symmetry held for $p$! But I just edited it to make the correction. It turns out when applying the real condition for symmetry to $f$ and $g$ you still get the condition for symmetry in $p$. Thanks for pointing that out! $\endgroup$ Apr 29, 2022 at 0:30

This is going to depend on the relationship between $x$ and $y$, here is a counter example where $x$ and $y$ are symmetric, but $x-y$ is not:

$$x=[-4, -2, 0, 2, 4]$$ $$y=[-1, -3, 0, 1, 3]$$ $$x-y = [-3, 1, 0, 1, 1]$$

So here the median of $x-y$ is not the same as the difference in the medians and $x-y$ is not symmetric.


This may be clearer in @whuber's notation:

Consider the discrete uniform distribution where $x$ and $y$ are related such that you can only select one of the following pairs:

$$(x,y)=(-4,-1); (-2,-3); (0,0); (2,1); (4,3)$$

If you insist on thinking in a full joint distribution then consider the case where $x$ can take on any of the values $(-4, -2, 0, 2, 4)$ and $y$ can take the values $(-3, -1, 0, 1, 3)$ and the combination can take on any of the 25 pairs. But the probability of the given pairs above is 16% each and all the other possible pairs have probability of 1% each. The marginal distribution of $x$ will be discrete uniform which each value having 20% probability and therefore symmetric about the median of 0, the same is true for $y$. Take a large sample from the joint distribution and look at just $x$ or just $y$ and you will see a uniform marginal distribution (symmetric), but take the difference $x-y$ and the result will not be symmetric.

  • 4
    $\begingroup$ I don't understand this example at all. If $X$ can be equal to 4 and $Y$ can be equal to e.g. 1, then $X-Y$ should be able to be 3, but you don't list this possibility. Maybe I misunderstand your example; what are these three vectors? $\endgroup$
    – amoeba
    Dec 15, 2017 at 19:33
  • 1
    $\begingroup$ $x$ and $y$ are not independent in his example. Think of $x$, $y$, and $x-y$ as being functions of some random variable $i$ which indexes into each vector. Then if $i=0$, $x=-4$, $y=-1$, and $x-y=-3$ $\endgroup$
    – Moormanly
    Dec 15, 2017 at 21:05
  • 5
    $\begingroup$ If you are considering $x$ and $y$ not to be independent, then you are really viewing $(x,y)$ as a bivariate random variable. As such what you demonstrate is that symmetric marginals do not imply the joint distribution is symmetric. That's a fine observation, but the notation in this answer is confusing. It might be clearer to describe the data in a bivariate notation as $(x,y)=(-4,-1),(-2,-3),(0,0),(2,1),(4,3)$. $\endgroup$
    – whuber
    Dec 15, 2017 at 21:20
  • 1
    $\begingroup$ @amoeba, It depends on the relationship between $X$ and $Y$, if they are independent or weakly dependent, then yes there could be a case like you say, but my example is strong dependence between the 2 variables. If X were height in inches and y were height in centimeters then $X=10$ is a possible value, and $Y=1$ is a possible value, but not at the same time for the same object. $\endgroup$
    – Greg Snow
    Dec 15, 2017 at 22:23
  • 1
    $\begingroup$ The comments and the edit have clarified what you meant. Thanks. $\endgroup$
    – amoeba
    Dec 16, 2017 at 0:04

You'll need to assume independence between X and Y for this to hold in general. The result follows directly since the distribution of $X-Y$ is a convolution of symmetric functions, which is also symmetric.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.