# Continuous uniform distribution example - is this correct?

Suppose the random variable X represents the angle of a slice of pie. The angle X has a uniform distribution on the interval [0,90] What's the probability that a slice of pie will have an angle between 30 and 40degrees?

Since this is a uniform distribution, f(x) is 0 everywhere except $30<x<40$, where $f(x) = 1/(40-30) = 1/10$

I feel like I'm missing something as the size of the interval [0,90] doesn't seem to have any effect on the probability.

Since angle $X$ has a uniform distribution on the interval $[0,90]$, the pdf is
$$f(x)=\left\{\begin{matrix} 0 & x<0\\ \frac{1}{90}& 0\le x \le 90\\ 0& x>90 \end{matrix}\right.$$
Then, you calculate the probability between $(30,40)$ by integration.
$$P(30<X<40)=\int_{30}^{40}\frac{1}{90}dx=\frac{1}{9}$$