# Prove the median of a symmetric distribution is the point of symmetry.

I'm trying to prove that if $$f(a+\epsilon) = f(a-\epsilon)$$, i.e. $$f(x)$$ is symmetric about $$a$$, then $$a$$ is the median of a continuous random variable with pdf $$f(x)$$. Using the fact that $$a$$ being the median means that $$\int_{-\infty}^a f(x)dx = \int_{a}^{\infty}f(x)dx = 1/2$$ I thought I could do something like

$$1 = \int_{-\infty}^{\infty}f(x)dx = \int_{-\infty}^a f(x)dx + \int_{a}^{\infty}f(x)dx,$$

but couldn't see why I could claim that the two integrals had to then be equal/ both then must be $$1/2$$.

I saw a similar version of what I'm trying to prove with $$a=0$$ here, but couldn't figure out how to apply a transform to my integrals so that it worked out the same way. I tried using $$x=a-y$$, but still just couldn't get the negative signs to work out correctly.

You start by knowing that $$\int_{-\infty}^{a} f(x) \,dx + \int_{a}^{\infty} f(x) \,dx =1$$ where $$a$$ is the point of symmetry. Then use substitution $$y=x-a$$ and you will get

$$\int_{-\infty}^{0} f(a+y) \,dy + \int_{0}^{\infty} f(a+y) \,dy =1$$

Now another substitution only for the first integral $$y=-z$$

$$\int_{-\infty}^{0} f(a+y) \,dy = \int_{\infty}^{0}- f(a-z) \,dz = \int_{0}^{\infty} f(a-z) \,dz = \int_{0}^{\infty} f(a+z) \,dz$$

So you can rewrite the equation using the first integral as above

$$\int_{0}^{\infty} f(a+y) \,dy + \int_{0}^{\infty} f(a+y) \,dy =1$$

$$2*\int_{0}^{\infty} f(a+y) \,dy =1$$

$$\int_{0}^{\infty} f(a+y) \,dy =1/2$$

Now undo the substitution

$$\int_{a}^{\infty} f(x) \,dx =1/2$$

and rewrite the equation

$$\int_{-\infty}^{a} f(x) \,dx + 1/2 =1$$

$$\int_{-\infty}^{a} f(x) \,dx = 1/2$$

that means that the two integrals are equal and both must be 1/2

$$\int_{-\infty}^{a} f(x) \,dx = \int_{a}^{\infty} f(x) \,dx = 1/2$$