# Thread: Density, CDF, quartiles, median

1. ## Density, CDF, quartiles, median

Let
f(x) = (1 + cx)/2 for x between -1 and 1 and f(x)=0 otherwise, where c is between -1 and 1. Show that f is a density and find the corresponding cdf. Find the quartiles and the median of the distribution in terms c.

So to show that f is a density, I just integrated f(x) with respect to x between -1 and 1, to show it integrates to 1.

Then for the CDF I got, F(x) = [x + (cx^2)/2]/2 for x between -1 and 1, and F(x)=0 otherwise.

For the quartiles and median I inverted the CDF to get the inverse of F(x) which I found to be y/(1 - cy/2). So then the median would be 1/(2 - c/2).

The first quartile would be 1/(4 - c/32).

The third quartile would be 3/(4 - 3c/32).

Is this right?

2. Originally Posted by BrownianMan
Let
f(x) = (1 + cx)/2 for x between -1 and 1 and f(x)=0 otherwise, where c is between -1 and 1. Show that f is a density and find the corresponding cdf. Find the quartiles and the median of the distribution in terms c.

So to show that f is a density, I just integrated f(x) with respect to x between -1 and 1, to show it integrates to 1.

Then for the CDF I got, F(x) = [x + (cx^2)/2]/2 for x between -1 and 1, and F(x)=0 otherwise.

For the quartiles and median I inverted the CDF to get the inverse of F(x) which I found to be y/(1 - cy/2). So then the median would be 1/(2 - c/2).

The first quartile would be 1/(4 - c/32).

The third quartile would be 3/(4 - 3c/32).

Is this right?

Let Q1 = a. Then F(a) = 0.25.

Let median = m. Then F(m) = 0.5.

Let Q3 = b. Then F(b) = 0.75.

In each case, solve for a, m and b.