# Thread:

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:

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

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

$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.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 3, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9394546151161194, "perplexity_flag": "middle"}