In class on 08/31/06 we talked about the Uniform[0,2] PDF and CDF. We had the PDF
`f_X(x) = 1/2`
for `x \in [0,2]` and 0 everywhere else.
To get the CDF `F_X(x)`, we can integrate:
`F_X(x) = \int_-\infty^x f_X(z) dz.`
(Using `z` as the dummy variable of integration.)
So, for `x < 0`, we have `f_X(x) = 0`, so the integral is 0:
`F_X(x) = 0` for `x <0`.
For `x \in [0,2]`, we can calculate:
`F_X(x) = \int_-\infty^x f_X(z)dz = \int_-\infty^0 f_X(z) dz + \int_0^x f_X(z) dz ` `= 0 + \int_0^x 1/2 dz = 0 + 1/2 [x-0] ` `= x/2.`
(See the IntegralFormulas.)
For `x>2`, we have
`F_X(x) = \int_\infty^x f_X(z)dz = \int_-\infty^0 f_X(z)dz + \int_0^2 f_X(z) dz + \int_2^x f_X(z) dz` `= 0 + 1 + \int_2^x 0 dz = 0 + 1 + 0 = 1.`