# Calculate probabilities based on given uniform distribution and PDF

I need help this problem:

Suppose the reaction temperature X (in °C) in a certain chemical process has a uniform distribution with A = −8 and B = 8.

(a) Compute P(X < 0).

(b) Compute P(−4 < X < 4).

(c) Compute P(−5 ≤ X ≤ 7).

Now I know that a random variable Xis said to have a uniform distribution on the interval [A, B] if the probability density function is:

f(x; A, B) = 1/(B-A), A <= x <= B


But for those problems above, where do I plug in the variable X since no function is given?

Thanks

X doesn't need to go anywhere. If the distribution is uniform with width B - A = L then P(X is in an interval of width h) = h/L.

The answers to (a), (b) and (c) are 1/2, 1/2 and 3/4 respectively.

The uniform distribution on $[-8,8]$ has cumulative distribution function, $F$ given by

$$F(x)=\frac{x-(-8)}{8-(-8)}=\frac{x+8}{16}$$

for all $x\in[-8,8]$.

To calculate the probabilities, use $P(X\leq x)=F(x)$.

While the answers above are all correct. You can also derive the cumulative distribution function in general with

$$F_X (x) = P(X < x) = \int_{\infty}^{x} f_X(z) dz,$$ where $f_X(z)$ is your pdf.