Median of a symmetric distribution

iocal

Junior Member
Joined
Jun 30, 2013
Messages
68
Median of a distribution(Not necessarily symmetric)

Hi all, new day new question.

Consider the following exercise. Let X be a random variable of the continuous type that has pdf f(x). If m is the unique median of the distribution of X and be is a real constant, show that:

E(|X-b|) = E(|X-m|) + \(\displaystyle 2\int_m^b (b-x) f(x) dx\)

This what I have done so far and that is not much:

\(\displaystyle \displaystyle \mathrm E(|X-b|)= \int_{-\infty}^0 (b-X)\ f(x)\ dx +\int_0^{\infty} (X-b) f(x) dx\)

\(\displaystyle \displaystyle = 2\int_0^{\infty} (X-b)\ f(x)\ dx\)

\(\displaystyle \displaystyle = 2\int_{-\infty}^0 (b-X)\ f(x)\ dx\)

I know that the median is defined as \(\displaystyle \displaystyle \int_{-\infty}^m f(x)\ dx = \int_m^{\infty} f(x)\ dx = 1/2\) but other than that I find myself at a loss.
I don't need the solution, I merely need a starting point.
Thank you.
 
Last edited:
You title this "symmetric distribution" but don't specify that the distribution is symmetric in the body. Is it?

Also you appear to be assuming that the distribution is symmetric about x= 0. Is that given? If the distribution is symmetric, then "mean" and "median" are the same and the distribution is symmetric about the median.
 
You title this "symmetric distribution" but don't specify that the distribution is symmetric in the body. Is it?

Also you appear to be assuming that the distribution is symmetric about x= 0. Is that given? If the distribution is symmetric, then "mean" and "median" are the same and the distribution is symmetric about the median.

You are right, I corrected it. The exercise does not specify anything else. I merely split the integral into two parts then, you can do that since this is an absolute value problem, right?
 
Last edited:
Hi all, new day new question.

Consider the following exercise. Let X be a random variable of the continuous type that has pdf f(x). If m is the unique median of the distribution of X and be is a real constant, show that:

E(|X-b|) = E(|X-m|) + \(\displaystyle 2\int_m^b (b-x) f(x) dx\)

This what I have done so far and that is not much:

\(\displaystyle \displaystyle \mathrm E(|X-b|)= \int_{-\infty}^0 (b-X)\ f(x)\ dx +\int_0^{\infty} (X-b) f(x) dx\)
[omitted next two lines - not correct.]

I know that the median is defined as \(\displaystyle \displaystyle \int_{-\infty}^m f(x)\ dx = \int_m^{\infty} f(x)\ dx = 1/2\) but other than that I find myself at a loss.
I don't need the solution, I merely need a starting point.
Thank you.
You must split the integral where the absolute value is 0, namely at x=b. Also, what is the difference between X and x? At least in the integrands, the variable has to be x.

\(\displaystyle \displaystyle \mathrm E(|X-b|)= \int_{-\infty}^b (b-x)\ f(x)\ dx +\int_b^{\infty} (x-b) f(x) dx\)

You will have to treat separately the cases b>m and b<m, because one or the other of your two integrals has to be further split at m. If b<m, then

\(\displaystyle \displaystyle \mathrm E(|X-b|)= \int_{-\infty}^b (b-x)\ f(x)\ dx +\int_b^m (x-b) f(x) dx+\int_m^{\infty} (x-b) f(x) dx\)

I don't know if it is better to work with E[|X-b|] or E[|X-m|]. Probably need both eventually. Perhaps both integrals shwould be split at m, regardless of b < or > m:

\(\displaystyle \displaystyle \mathrm E(|X-b|)= \int_{-\infty}^m (b-x)\ f(x)\ dx +\int_m^b (b-x)\ f(x)\ dx +\int_b^m (x-b) f(x) dx+\int_m^{\infty} (x-b) f(x) dx\)
 
Last edited:
You must split the integral where the absolute value is 0, namely at x=b. Also, what is the difference between X and x? At least in the integrands, the variable has to be x.

\(\displaystyle \displaystyle \mathrm E(|X-b|)= \int_{-\infty}^b (b-x)\ f(x)\ dx +\int_b^{\infty} (x-b) f(x) dx\)

You will have to treat separately the cases b>m and b<m, because one or the other of your two integrals has to be further split at m. If b<m, then

\(\displaystyle \displaystyle \mathrm E(|X-b|)= \int_{-\infty}^b (b-x)\ f(x)\ dx +\int_b^m (x-b) f(x) dx+\int_m^{\infty} (x-b) f(x) dx\)

I don't know if it is better to work with E[|X-b|] or E[|X-m|]. Probably need both eventually. Perhaps both integrals shwould be split at m, regardless of b < or > m:

\(\displaystyle \displaystyle \mathrm E(|X-b|)= \int_-{\infty}^m (b-x)\ f(x)\ dx +\int_m^b (b-x)\ f(x)\ dx +\int_b^m (x-b) f(x) dx+\int_m^{\infty} (x-b) f(x) dx\)


Okay, thanks.
We have \(\displaystyle \displaystyle \mathrm E(|X-m|)=m \int_{-\infty}^m f(x)\ dx -\int_{-\infty}^m x\ f(x)\ dx +\int_m^{\infty} x\ f(x)\ dx -m\int_m^{\infty} f(x)\ dx\)

\(\displaystyle \displaystyle = -\int_{-\infty}^m x\ f(x)\ dx + \int_m^{\infty} x\ f(x) \ dx = 2\int_m^{\infty} x\ f(x)\ dx\ because \int_{-\infty}^m f(x)\ dx = \int_m^{\infty} f(x)\ dx = 1/2\)


Then simplifying the expression for E(|X-b|) similarly we arrive at the equality. Did I get it right?
 
Last edited:
Okay, thanks.
We have \(\displaystyle \displaystyle \mathrm E(|X-m|)=m \int_{-\infty}^m f(x)\ dx -\int_{-\infty}^m x\ f(x)\ dx +\int_m^{\infty} x\ f(x)\ dx -m\int_m^{\infty} f(x)\ dx\)

\(\displaystyle \displaystyle = -\int_{-\infty}^m x\ f(x)\ dx + \int_m^{\infty} x\ f(x) \ dx = 2\int_m^{\infty} x\ f(x)\ dx\ \) because \(\displaystyle \int_{-\infty}^m f(x)\ dx = \int_m^{\infty} f(x)\ dx = 1/2\)


Then simplifying the expression for E(|X-b|) similarly we arrive at the equality. Did I get it right?
One more relevant step - you have to recognize (or prove) that

\(\displaystyle \displaystyle \int_b^\infty dx - \int_m^\infty dx = \int_b^m dx\)
 
One more relevant step - you have to recognize (or prove) that

\(\displaystyle \displaystyle \int_b^\infty dx - \int_m^\infty dx = \int_b^m dx\)

Thank you, I believe you can do that with the CDF.

\(\displaystyle \displaystyle \int_b^{\infty} dx -\int_m^\infty dx = 1-F(b)-(1-F(m)= F(m)-F(b) = \int_b^m dx\)

Again, thanks a lot man.
 
Top