# Tree diagram

Constructing probability tree diagram is one of the ways that helps us solve probability problems. Generally, it is used mostly for dependent events, but we can also use it for independent ones. Tree diagrams are useful for organizing and visualizing all possible events and their outcomes, since seeing a graph representation of our problem often helps us see it more clearly.

#### How to construct a tree diagram

Lets say we have $11$ marbles in a bag, $4$ green and $7$ blue. We need to calculate the probability of :

1. picking two green marbles
2. picking a green marble in our second draw
3. picking at least one blue

The tree diagram for this problem would look like this: But lets start from the beginning. The point on the far left represents the bag with $11$ marbles. Branches represent possible outcomes. In this case, for the first draw we’ll have two possibilities:

1. We picked green marble – possibility of that happening is $\frac{4}{11}$
2. We picked blue marble – possibility of that event is $\frac{7}{11}$

We draw first two branches from the starting point, each one representing one event. Next to them, we write the possibility of said event. After the first draw, we inevitably have $10$ marbles left in the bag. It doesn’t matter what we picked in the first draw, in the second one we can still pick green or blue marble.

If we picked green in the first draw (first branch), for the second draw we have $3$ greens left. The probability of picking green marble is now $\frac{3}{10}$. However, blue marbles were left intact. The probability of picking a blue marble is $\frac{7}{10}$.

If we picked blue in the first draw (second branch), for the second draw we have $6$ blue ones left. The probability of picking blue marble is now $\frac{6}{10}$. However, green marbles were left intact. The probability of picking a green marble is $\frac{4}{10}$.

The graphic representation of what we just wrote would be: As a result, we have $4$ outcomes:

1. Green, green
2. Green, blue
3. Blue, green
4. Blue, blue

To calculate the probability of each outcome, we multiply the probabilities along the branches.

The probability of picking green marble in the first and in the second draw is equal to $$\displaystyle{\frac{4}{11} \cdot \frac{3}{10} = \frac{6}{55}}$$

The probability of picking green first and then blue is $$\frac{4}{11} \cdot \frac{7}{10} = \frac{14}{55}.$$

Likewise, the two remaining probabilities are $\displaystyle{\frac{14}{55}}$ and $\displaystyle{\frac{21}{55}}$.

Tree diagram with all events and their probabilities looks like this: However, we have one more condition we need to be careful about. Probability of all events combined has to be equal to $1$. Lets check.

$$\displaystyle{\frac{6}{55}+\frac{14}{55}+\frac{14}{55}+\frac{21}{55}=\frac{55}{55}=1}$$

Indeed, the probabilities we’ve calculated add up.

Finally, we can calculate the probabilities from the beginning of this example. Let’s put $G$ for green and $B$ for blue marble.

1. Probability of picking two green marbles

As seen before, we simply multiply along the branches that lead from bag to first green marble, and from first green marble to second green one.$$P(G,G)=\displaystyle{\frac{6}{55}}$$

2. Probability of picking a green marble in our second draw

On the other hand, there are two outcomes where the second marble can be green. Either $(G,G)$ or $(B,G)$. We can easily conclude their probabilities from the tree diagram $$P(G,G)=\displaystyle{\frac{6}{55}}$$ $$P(B,G)=\displaystyle{\frac{14}{55}}$$

We want $(G,G)$ or  $(B,G)$ to happen, because they both give us the wanted outcome. The notation can be

$P($second marble is green$)=P(G,G)$ or $P(B,G)$

Since $(G,G)$ or $(B,G)$ are disjoint events,

$P((G,G)$ or $(B,G))=P((G,G) \cup (B,G))= P((G,G))+P((B,G))$

Finally,

$P($second marble is green$)=\displaystyle{P(G,G)+P(B,G)=\frac{6}{55}+\frac{14}{55}=\frac{4}{11}}$

3. Probability of picking at least one blue marble

There are many ways to calculate this, but the easiest one is using a complement. The complement of an event $\{$we picked at least one blue marble$\}$ would be $\{$we didn’t pick a single blue marble$\}$.

The only event where we didn’t pick a single blue marble is $P((G,G))$ and we know it’s probability.
Consequently,

$\{$we didn’t pick a single blue marble$\}=1-P((G,G))=\displaystyle{1-\frac{6}{55}=\frac{49}{55}}$

#### Example

If it snows on a given day, the probability that it snows the next day is $\frac{1}{3}$. If it doesn’t, the probability that it snows the next day is $\frac{1}{6}$. The probability it will snow tomorrow is $\frac{2}{5}$. What is the probability that it will snow the day after tomorrow?

To illustrate all the possible outcomes, we’ll use tree diagram.
First of all, we need to determine what happens tomorrow. The probability it will snow tomorrow is $\frac{2}{5}$, so the probability that it won’t snow tomorrow is $\frac{3}{5}$. Consequently, our starting point will be today, and first two events will be about tomorrow. If it snows on a given day, the probability it will snow the next day is $\frac{1}{3}$.  Alternatively, the probability it won’t snow the next day is $\frac{2}{3}$. Furthermore, if it doesn’t snow on a given day, the probability it will snow the next day is $\frac{1}{6}$. Consequently, the probability it won’t snow the next day is $\frac{5}{6}$. When we put all the events and their probabilities in the tree diagram, we get: All we need to do is calculate the probability that it will snow the day after tomorrow.

$P($snow on the day after tomorrow$)=P($snow, snow$)$ or $P($no snow, snow$)$.

To calculate the probability of these two events we simply multiply along the branches.

$P($snow, snow$)= \displaystyle{\frac{2}{15}}$, $P($no snow, snow$)=\displaystyle{\frac{1}{10}}$

Similarly as before, ‘or’ means $+$ since these are disjoint events. To get the probability of snow on the day after tomorrow, we add up probabilities of the events above.

Therefore,

$P($snow on the day after tomorrow$)= \displaystyle{\frac{2}{15} +\frac{1}{10}=\frac{7}{30}}$
{"ft_lang_label":"__label__en","ft_lang_prob":0.88946486,"math_prob":0.9997327,"size":6035,"snap":"2021-43-2021-49","text_gpt3_token_len":1586,"char_repetition_ratio":0.17957221,"word_repetition_ratio":0.12311015,"special_character_ratio":0.28947803,"punctuation_ratio":0.11584875,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99998,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12],"im_url_duplicate_count":[null,7,null,3,null,7,null,3,null,3,null,3,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-11-27T05:31:20Z\",\"WARC-Record-ID\":\"<urn:uuid:e5bc3cfa-92bb-4bd2-8b26-991343e6e10f>\",\"Content-Length\":\"119105\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:9f2e4fdc-372d-494f-a87f-9ce6aeee0c7a>\",\"WARC-Concurrent-To\":\"<urn:uuid:35b7ab48-ef76-4566-8828-e76be6b0f8f4>\",\"WARC-IP-Address\":\"194.1.147.70\",\"WARC-Target-URI\":\"https://www.mathemania.com/lesson/tree-diagram/\",\"WARC-Payload-Digest\":\"sha1:6FZAYK7YQ5FTB6PW3V66IK5R7KJJS3AS\",\"WARC-Block-Digest\":\"sha1:O3KXWLIECGNQHRURDUKR6EAZPGKHBGOZ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-49/CC-MAIN-2021-49_segments_1637964358118.13_warc_CC-MAIN-20211127043716-20211127073716-00052.warc.gz\"}"}