# If $X \sim f(x)$ is symmetric then the median of X is $a$

Let $$f(x)$$ be a pdf and let $$a$$ be a number such that, for all $$\epsilon>0$$, $$f(a+\epsilon=f(a-\epsilon)$$. Such a pdf is said to be symmetric about the point a. Show that If $$X \sim f(x)$$ is symmetric then the median of X is $$a$$.

The solutions show that:

$$\int_a^{\infty}f(x)dx = \int_0^{\infty}f(a+\epsilon)d\epsilon$$

by changing the variable with $$\epsilon = x-a$$. I do not understand why the $$a$$ disappears in the integral sign.

However I need to get

$$\int_{-\infty}^af(x)dx$$

I do not understand why the change of variable $$x = a-\epsilon$$ produces the integral sign.

• Are you familiar with $u$-substitution? Mar 18 at 22:42

$$a$$ disappears from the integral sign because of the change of variables that you performed. If $$\epsilon = x-a\ \ (d \epsilon = dx)$$, then, because of the equality $$f(a - \epsilon) = f(a + \epsilon)$$, we have:
$$\int_{x = a}^{x = \infty} f(x) dx =\\ \int_{\epsilon=0}^{\epsilon = \infty} f(a+\epsilon) d\epsilon =\\ \int_{\epsilon=0}^{\epsilon = \infty} f(a-\epsilon) d\epsilon =\\ - \int_{\epsilon=0}^{\epsilon = -\infty} f(a+\epsilon) d\epsilon =\\ \int_{\epsilon=-\infty}^{\epsilon = 0} f(a+\epsilon) d\epsilon =\\ \int_{x = -\infty}^{x = a} f(x) dx$$ where I also changed variables one more time in the third equality $$\epsilon \mapsto - \epsilon$$ (whence $$d\epsilon \mapsto - d \epsilon$$).