For a continous uniform RV $$\text{PDF} = \frac{1}{b-a} \text{ for } x\in[a,b)$$

(sorry cant figure out how to add whitespace)

and $$\text{CDF} = \int_{-\infty}^x \text{PDF} \, dx$$ so for $x>0$ I believe CDF of uniform RV should be $$\int_0^x \text{PDF} \, dx = \int_0^x \frac{1}{b-a} \, dx = \frac{x}{b-a}, \text{ from } x=x \text{ to } x=0$$ which equals just $$\frac{x}{b-a} \text{??}$$ But wikipedia says it should equal $$\frac{x-a}{b-a}$$ So where did I mess up with the integration?

  • 1
    $\begingroup$ you can use \mbox{} to get regular text back in the middle of an equation. $\endgroup$ – Tony S.F. Apr 10 '16 at 1:23
  • $\begingroup$ thanks, couldn't figure out how to google that $\endgroup$ – Austin Apr 10 '16 at 1:25

You should be integrating over the support of the PDF. The support is the set of all numbers such that the PDF is not zero. Therefore, your integral should be $\displaystyle\int_a^x \frac{1}{b-a} \, dx$. This will give CDF$=\dfrac{x}{b-a}-\dfrac{a}{b-a}=\dfrac{x-a}{b-a}$ just like wikipedia has.

The reason we integrate over the support is simple. We'd really like to integrate from $-\infty$ to $\infty$ but if the pdf is zero for all values outside of $[a,b]$ like in the case of the uniform distribution, we can reduce $\int_{-\infty}^\infty$ to just $\int_a^b$.

  • $\begingroup$ Ahh, figured it would be a simple mistake that I was mentally blocking on. Thank you! $\endgroup$ – Austin Apr 10 '16 at 1:27
  • $\begingroup$ Easily fixed, no problem. $\endgroup$ – Tony S.F. Apr 10 '16 at 1:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.