# Question on the theorem of total probability

Theorem: If the events $$B_1,B_2,...,B_k$$ constitue a partition of the sample $$S$$ such that $$P(B_i) \neq 0$$ for $$i=1,2,...,k$$, then for any event $$\boldsymbol{R}$$ of $$\boldsymbol{S}$$ $$P(R)=\sum_{i=1}^{k} P(B_i) P(R|B_i).$$ I found an example

but I can not understand what is the sample space $$S$$ in this example and how can $$\boldsymbol{R}$$ belong to $$\boldsymbol{S}$$? Can you help me to explain in more details. Thanks a lot!

• There is no $R$ in your equation. Sep 1, 2021 at 12:18
• The $R$ in the linked image is the same as the $A$ in your post Sep 1, 2021 at 12:20
• @KaviRamaMurthy $R$ is in the image. If the sample space is the ways of choosing a bag and then the marble, then a subset of this is the event that the marble is red Sep 1, 2021 at 12:20
• Oh I am sorry. I have a typos mistake when typing R (instead of A). I have eddited. Sep 1, 2021 at 14:51
• It's much better to link to the original source than to take a screenshot. Sep 1, 2021 at 14:51

Make a double entry table to represent $$S$$, with three rows that have all the possible choices of bags ($$b_1,b_2,b_3$$) and two columns representing all the possible choices of marble color ($$B,R$$). Then write all possible pairs you get in the entries. For example the first raw will be $$(b_1,B),(b_1,R)$$ and so on. $$S$$ is simply all these pairs you get in the double entry table, and $$R$$ is composed by the entries on the second column.