# Glossary

## Dependent random variables

Two random variables are called "dependent" if the probability of events associated with one variable influence the distribution of probabilities of the other variable, and vice-versa. The word "influence" is somewhat misleading, as causation is not a necessary component of dependence.

For example, consider drawing two balls from a hat containing three red balls and two blue balls. If $X$ is the random variable associated with the color of the first ball, and $Y$ is the color of the second ball, then clearly the value of $X$ and $Y$ will influence each other: if we draw a red ball first, then the probabilities for $Y$ are different than what they would be if we draw a blue ball first. Below is the probability tree diagram for the two drawings. There are two ways of stating dependence mathematically. First, we might say that $X$ and $Y$ are dependent if they are not independent. In other words, there exist events $A$ and $B$ containing outcomes of $X$ and $Y$, respectively, such that $\mathrm{Pr}(A \textrm{ and } B)$ is not equal to $\mathrm{Pr}(A) \times \mathrm{Pr}(B)$. In the case of drawing balls, let $A$ be the outcome of the first ball drawn being blue, and $B$ be the outcome of the second ball drawn being blue. Then $\mathrm{Pr}(A \textrm{ and } B)$ is 1/10, although $\mathrm{Pr}(A)$ is 2/5 and $\mathrm{Pr}(B)$ is 2/5.

An equivalent way of saying that $X$ and $Y$ are dependent is if there are events $A$ and $B$ containing respective outcomes corresponding to $X$ and $Y$ such that the conditional probability $\mathrm{Pr}(A \mid B)$ is not equal to $\mathrm{Pr}(A)$. Using the same events for our example variables $X$ and $Y$ above, we can see that while $\mathrm{Pr}(A \mid B)$ is 2/5, $\mathrm{Pr}(A \mid B)$ is $\mathrm{Pr}(A \textrm{ and } B)/\mathrm{Pr}(B)$, or 1/4. This calculation makes sense, since if we know that the second ball drawn is blue, odds are much better that the first ball was red than blue.
{"ft_lang_label":"__label__en","ft_lang_prob":0.89413834,"math_prob":0.99989426,"size":1944,"snap":"2019-51-2020-05","text_gpt3_token_len":526,"char_repetition_ratio":0.15824743,"word_repetition_ratio":0.043343652,"special_character_ratio":0.2649177,"punctuation_ratio":0.082474224,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9999869,"pos_list":[0,1,2],"im_url_duplicate_count":[null,2,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-29T18:11:01Z\",\"WARC-Record-ID\":\"<urn:uuid:3fc8032c-6747-48f0-8e1f-0dea1b8753ec>\",\"Content-Length\":\"14081\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:dd2c3fc9-cafe-4410-a862-b325b8638d5a>\",\"WARC-Concurrent-To\":\"<urn:uuid:b8ad5b47-a431-44ed-a4cf-3015455f75ac>\",\"WARC-IP-Address\":\"13.94.194.131\",\"WARC-Target-URI\":\"http://rosalind.info/glossary/dependent-random-variables/\",\"WARC-Payload-Digest\":\"sha1:NQGPXOKFHIMKP7DNZQHWFDRL7TRG7JWQ\",\"WARC-Block-Digest\":\"sha1:4KFJHIMUWLKAZJIO4OZLAZ34Y4RV6PFN\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579251801423.98_warc_CC-MAIN-20200129164403-20200129193403-00357.warc.gz\"}"}