*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?