Find CDF of a uniform distribution between 2 values

282 Views Asked by At

So, I've been struggling on a problem that goes like this: X is a random variable with this probability density function:

f(x) = c(2x-(x^2)) if 0 < x < 2
       0           otherwise

I solved and found that the value of c must be (3/4), and that the CDF if x< 0 is 0, and the cdf for x>2 is 1. How do I find the cdf of x, if x is between 0 and 2? This problem has stumped me.

2

There are 2 best solutions below

0
On

Presumably you found something like $$\int_0^2 c(2x-x^2)\,dx= \left.c\left(x^2-\frac{x^3}{3}\right)\right|_0^2 =c\frac{4}{3}-0$$ and setting this equal to $1$ gives $c=\frac34$

In effect you already have done all the hard work to find the cumulative distribution function when $0 \le x \le 2$. It is simply the integral from $0$ to $x$, i.e. $$\frac34\left(x^2-\frac{x^3}{3}\right)$$

0
On

The CDF of $f(x)$ is simply the probability that $f(x)$ is less than or equal to a given value of $x.$ Expressed more formally, this is

$g(x) =\displaystyle\int_{-\infty}^x f(x)dx.$ But $g(x)=0$ when $x\le0$ and $g(x)=1$ when $x\ge2,$ so this is the same as $\displaystyle\int_0^x f(x)dx$ when $0<x<2.$

Since $c=3/4,$ we have $g(x) = \begin{cases}0&x\le0\\ \dfrac{3}{4}(x^2-\dfrac{x^3}{3})&0<x<2\\ 1&x\ge 2\end{cases}$