Continuous random variables

This is purely for revision purposes, i have a test tomorrow.

We will have a question asking how to mathmatically show a probability density function of a simple distribution. I can do integration, but i really dont understand how to convert a diagram into an integral of mulitple parts.

We will have a question asking how to mathmatically show a probability density function of a simple distribution. I can do integration, but i really dont understand how to convert a diagram into an integral of mulitple parts.

I know it has to do with the straight line equation (f (x) = a + bx )
But im just stumped on how it is figured out..

Any help appreciated!

In each case you're expected to know how to get the equation of a line when you know two points on the line. I'll do the first:

The equation of the line going from (0, 0) to (2, 1/2) can be found by calculating the gradient and using one of the known points. m = (1/2)/2 = 1/4. Therefore y = x/4 + c. Substitute (0, 0) => c = 0. So the equation is y = x/4.

The equation of the line going from (2, 1/2) to (4, 0) can be found by calculating the gradient and using one of the known points. m = -(1/2)/2 = -1/4. Therefore y = -x/4 + c. Substitute (4, 0) => c = 1. So the equation is math]y = -\frac{x}{4} + 1[/tex].