# Compound Probability

This chapter discusses further concepts that lie at the core of probability theory.

### Set Theory

A set, broadly defined, is a collection of objects. In the context of probability theory, we use set notation to specify compound events. For example, we can represent the event "roll an even number" by the set {2, 4, 6}. For this reason it is important to be familiar with the algebra of sets.

Use the set constructor below to build a set, then press "Submit" to see your set visualized in the Venn diagram. You can also move and resize the circles by dragging and dropping.

You may wish to use the visualization to verify some of the following set identities.

### Counting

It can be surprisingly difficult to count the number of sequences or sets satisfying certain conditions. For example, consider a bag of marbles in which each marble is a different color. If we draw marbles one at a time from the bag without replacement, how many different ordered sequences (permutations) of the marbles are possible? How many different unordered sets (combinations)?

Choose how many marbles the bag should contain. Click on the table below to visualize all possible permutations or combinations of the marbles.

 $$\displaystyle{n}$$ 0 1 2 3 4 $$\displaystyle{P_{n,r}}$$ $$\displaystyle{C_{n,r}}$$ 1

### Conditional Probability

Conditional probabilities allow us to account for information we have about our system of interest. For example, we might expect the probability that it will rain tomorrow (in general) to be smaller than the probability it will rain tomorrow given that it is cloudy today. This latter probability is a conditional probability, since it accounts for relevant information that we possess.

Mathematically, computing a conditional probability amounts to shrinking our sample space to a particular event. So in our rain example, instead of looking at how often it rains on any day in general, we "pretend" that our sample space consists of only those days for which the previous day was cloudy. We then determine how many of those days were rainy.

Click on the tabs below to visualize the shrinking of the sample space.

This visualization was adapted from Victor Powell's fantastic visualization of conditional probability.
{"ft_lang_label":"__label__en","ft_lang_prob":0.9140714,"math_prob":0.9666421,"size":2161,"snap":"2020-10-2020-16","text_gpt3_token_len":441,"char_repetition_ratio":0.119146965,"word_repetition_ratio":0.0,"special_character_ratio":0.2031467,"punctuation_ratio":0.09367089,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9907423,"pos_list":[0,1,2,3,4,5,6,7,8],"im_url_duplicate_count":[null,5,null,5,null,5,null,5,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-02-27T02:24:46Z\",\"WARC-Record-ID\":\"<urn:uuid:142ffb31-d472-40de-9803-6e74488a888d>\",\"Content-Length\":\"20727\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d6ec0613-c417-4348-8dfd-c3931f83a750>\",\"WARC-Concurrent-To\":\"<urn:uuid:5e4df09f-2598-49cc-a7fd-879b15d0a52a>\",\"WARC-IP-Address\":\"128.148.254.62\",\"WARC-Target-URI\":\"https://seeing-theory.brown.edu/compound-probability/index.html\",\"WARC-Payload-Digest\":\"sha1:56FCPNP5SPQKP5U4YXWLNPHEJ2F24KFG\",\"WARC-Block-Digest\":\"sha1:R7BPBB4H5QOUISN3FQVKJSIQZJH3HAOK\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-10/CC-MAIN-2020-10_segments_1581875146643.49_warc_CC-MAIN-20200227002351-20200227032351-00391.warc.gz\"}"}