A continuous random variable X has a triangular distribution, which means that it has a probability density function of the form
f(x)=⎩⎨⎧g(x)h(x)0for a<x⩽cfor c⩽x<botherwise, where g(x) is an increasing linear function with g(a)=0, h(x) is a decreasing linear function with h(b)=0, and g(c)=h(c).
Show that g(x)=(b−a)(c−a)2(x−a) and find a similar expression for h(x).
- Show that the mean of the distribution is 31(a+b+c).
- Find the median of the distribution in the different cases that arise.