1. ## Cumulative distribution function

This is my first post on MHF, hello everyone.
I need to determine continuous random variable distribution function $f(x)$ based on its cumulative distribution function $
F(x) = \left\{\begin{array}{cc}0&x<0 \\sin(x)&0\leq x \leq \frac{\pi}{2}\\1&x>\frac{\pi}{2}\end{array}\right.
$

Having $F'(x)=f(x)$ (fundamental theorem of calculus) I would say that distribution function should look like this:

$
f(x) = \left\{\begin{array}{cc}cos(x)&0\leq x \leq \frac{\pi}{2}\\0&else\end{array}\right.
$

Is this correct, and is this formula sufficient?

2. Yes that's right. It's also sufficient, although you might make it clearer that your function is 0 everywhere other than the interval 0 to pi/2.

3. Originally Posted by losm1
$else$
Are you a fluent programmer haha...