SOLUTION: f(x)= x when 0 < x <= 1 2-x when 1 < x <=2 find out CDF of it

Algebra ->  Volume -> SOLUTION: f(x)= x when 0 < x <= 1 2-x when 1 < x <=2 find out CDF of it      Log On


   



Question 1082961:
f(x)= x when 0 < x <= 1
2-x when 1 < x <=2
find out CDF of it

Answer by jim_thompson5910(35256) About Me  (Show Source):
You can put this solution on YOUR website!
Given piecewise function

--------------------------------------------------------------------------------------
To find the CDF function F(x), we integrate each piece of the piecewise function f(x).
For the first piece:



where 0 < k <= 1
So the first piece of F(x) is %28x%5E2%29%2F2 where 0 < x <= 1.
--------------
Repeat for the other piece



where 1 < m <= 2
Since the area is cumulative, we need to include the green shaded triangle (shown below) that has area 1*1/2 = 1/2

This green triangle area is represented by F(x) when x = 1.
It comes from the first part of the piecewise function F(x)
Add this on to the integral result to get

making the second piece of F(x) to be %28-x%5E2%29%2F2+%2B+2x+-+1 when 1 < x <= 2.
--------------------------------------------------------------------------------------
So overall, the CDF function is

which is the final answer
--------------------------------------------------------------------------------------
Extra Information:
Graph of the piecwise function f(x) in red, and the piecewise CDF function F(x) in blue

Image generated by GeoGebra (free graphing software).

As you can see, f(x) forms triangle. The base is 2 and the height is 1. The area under all of f(x) is therefore
A = base*height/2
A = 2*1/2
A = 2/2
A = 1
Since the area under the function curve f(x) is 1, this confirms that f(x) is indeed a Probability Distribution Function (PDF).