how can I find a cummulative distribution function from a piecewise uniform density function?
Asked
Active
Viewed 61 times
1 Answers
0
Let the pdf be $P(x)= \left\{ \begin{array}{lr} a_1 & : l_1\leq x < l_2,\\ a_2 & : l_2\leq x < l_3,\\ {}\,\vdots\\ a_n & : l_{n}\leq x < l_{n+1},\\ \end{array} \right. $
such that $\sum_{i=1}^n a_i(l_{i+1}-l_i)=1$
Then the cdf will be:
$$F(x)=a_{n(x)}(x-l_{n(x)})+\sum_{i=1}^{n(x)-1} a_i(l_{i+1}-l_i),$$
where $\displaystyle n(x)=\max_{i,x>l_i}\ i$.