# Show that, for $a<x<b$, the cumulative distribution function of $X$ is $F(x)=\frac{x-a}{b-a}$

We are given $f(x)=\frac{1}{b-a}$ for $a<x<b$, and $0$ otherwise. My solution was to integrate $f(x)$ such that: $\frac{1}{b-a}\int_{a}^bdx=\frac{1}{b-a}[x]_{a}^b=\frac{1}{b-a}[b-a]$. I think I'm missing something. Any help would be appreciated, thanks

• Why have you integrated over the whole domain? – soakley Oct 17 '16 at 21:05
• you calculated F(b) – oW_ Oct 17 '16 at 21:06
• So I integrate from $a$ to $x$? Can you give me some insight – Lanous Oct 17 '16 at 21:08
• Yes, although I'd change your notation slightly (inside the integral - see the proposed answer) to avoid ambiguity. Recall the definition of the CDF. You want to be able to evaluate it at any point in the domain. – soakley Oct 17 '16 at 21:11

## 1 Answer

You should integrate over $[a, x]$, not $[a, b]$:

$$F(x)=\int_{a}^{x}f(t)dt=\int_a^x\frac{1}{b-a}dt=\frac{1}{b-a}\int_a^xdt=\left[\frac{t}{b-a}\right]_a^x=\frac{x-a}{b-a}$$