# Thread: basic question on distribution equations

1. ## basic question on distribution equations

if i have a exponential distribution equation for example, and i want to know the probability of a certain region between x1 and x2, would all i have to do is get the cdf equation, then plugin lambda, then subtract this equation with a x2 value, with the same equation with a x1 value, to get the probability between x1 and x2?

so

and of course i set lamdba.
cdf(x2) - cdf(x1) = probability between x1 and x2?

Does this work with any distribution equation weather discrete or continuous?

2. You need to be careful with your definition of "between x1 and x2" for the discrete case. The following is true for any discrete or continuous distribution:

$\displaystyle P(a < X \leq b) = cdf(b) - cdf(a)$

for most* continuous variables, its true that
$\displaystyle P(a < X) = P (a \leq X)$ and so you can say

$\displaystyle P(a \leq X \leq b) = cdf(b) - cdf(a)$ for those cases

*some continuous variables are on a mixed distribution has a probability mass at a fixed point, so the last part may not work for those.