# 条件概率

## 条件概率的定义 The Definition of Conditional Probability

Definition Conditional Probability: Sippose that we learn that an event B has occurred and that we wish to compute the probability of another event A taking into account that probability of the event A given that the event B has occurred and is denoted $Pr(A|B)$ . If $Pr(B)>0$ ,we compute this probability as:
$$Pr(A|B)=\frac{Pr(A\cap B)}{Pr(B)}$$
ps:The conditional probability $Pr(A|B)$ is not defined if $Pr(B)=0$

1. 举个例子：
条件描述：扔两个六面体骰子，每个面出现概率相等，两个骰子互不影响。
事件的概率：那么当我们知道其结果的和是奇数的条件下，其和小于8的事件T的概率是多少？
分析：首先我们通过条件知道这两个骰子出现每个数字概率相等为 $\frac{1}{6}$ 那么就可以分析出所有结果了：
event Probability
2 $\frac{1}{36}$
3 $\frac{2}{36}$
4 $\frac{3}{36}$
5 $\frac{4}{36}$
6 $\frac{5}{36}$
7 $\frac{6}{36}$
8 $\frac{5}{36}$
9 $\frac{4}{36}$
10 $\frac{3}{36}$
11 $\frac{2}{36}$
12 $\frac{1}{36}$

$$Pr(A\cap B)=\frac{2}{36}+\frac{4}{36}+\frac{6}{36}=\frac{12}{36}=\frac{1}{3}\\ Pr(B)=\frac{2}{36}+\frac{4}{36}+\frac{6}{36}+\frac{4}{36}+\frac{2}{36}=\frac{1}{2}$$
Hence:
$$Pr(A|B)=\frac{Pr(A\cap B)}{Pr(B)}=\frac{2}{3}$$
2. 再举个例子，两个箱子，装着不同的螺丝，箱子A装着长螺丝7个和短螺丝3个，B装长螺丝6个短螺丝4个，这两个箱子被随机分给我们，如果我们有 $\frac{1}{3}$ 的概率被分到箱子A，$\frac{2}{3}$ 的概率被分到箱子B，那么当我们已知被分到A箱子的时候，我们拿出一个长螺丝的概率是多少？

## 乘法原则 The Multiplication Rule

Definition Multiplication Rule for Conditional Probability:
$$if \quad Pr(B)>0:\quad Pr(A\cap B)=Pr(B)Pr(A|B)\\ if \quad Pr(A)>0:\quad Pr(A\cap B)=Pr(A)Pr(B|A)$$

Definition Multiplication Rule for Conditional Probability:Suppose that $A_1,A_2,A_3\dots A_n$ are events such that $Pr(A_1\cap A_2\cap A_3\dots \cap A_{n-1})>0$ then
$$Pr(A_1\cap A_2\cap A_3\dots \cap A_n)=\\ Pr(A_1)Pr(A_2|A_1)Pr(A_3|A_1\cap A_2)\dots Pr(A_n|A_1\cap A_2 \cap A_3 \cap \dots \cap A_{n-1})$$

$$Pr(R_1\cap B_2\cap R_3\cap B_4)=Pr(R_1)Pr(B_2|R_1)Pr(R_3|R_1\cap B_2)Pr(B_4|R_1\cap B_2\cap R_3)\\ =\frac{r}{r+b}\frac{b}{r+b-1}\frac{r-1}{r+b-2}\frac{b-1}{r+b-3}$$

Suppose that $A_1,A_2,A_3\dots A_n,B$ are events such that $Pr(B)>0$ and $Pr(A_1\cap A_2\cap A_3 \dots A_{n-1}|B)>0$ then:
$$Pr(A_1\cap A_2\cap \dots A_n|B)=\\ Pr(A_1|B)Pr(A_2|A_1\cap B)Pr(A_3|A_2\cap A_1\cap B)\dots Pr(A_n|A_{n-1} \cap \dots \cap A_2\cap A_1\cap B)$$

## 条件概率与分割，全概率公式 Conditional Probability and Partition – Law of total Probability

1-1的T3中，我们介绍了当一个样本空间被划分成两部分的时候，概率的计算方法，那么如果我们把切分继续下去，也就是一个样本空间我们把它切成k块不相交的子空间时，那么响应的计算会有什么变换呢？

Definition partition Let S denote the sample space of some experiment,and consider k events $B_1 \dots B_k$ in S such that $B_1 \dots B_k$ are disjoint and $\bigcup^k_{i=1}B_i=S$ It is said that these events from a partition of S

Theorem Law of total probability:Suppose that the events $B_1 \dots B_k$ from a partition of the space S and $Pr(B_j)>0$ for $j=1,\dots ,k$ Then ,for every event A in S:
$$Pr(A)=\sum^k_{j=1}Pr(B_j)Pr(A|B_j)$$

①画图：

②集合论：
$$A=(B_1\cap A)\cup(B_1\cap A)\cup\dots \cup(B_k\cap A)$$

$$Pr(A)=\sum^k_{j=1}Pr(B_j\cap A)\\ if \quad Pr(B_j)>0 (j=1\dots k)\quad then \quad Pr(B_j\cap A)=Pr(B_j)Pr(A|B_j)$$

$$Pr(A|C)=\sum^k_{j=1}Pr(B_j|C)Pr(A|B_j\cap C)$$

$$A\cap C=(B_1\cap A \cap C)\cup(B_1\cap A \cap C)\cup\dots \cup(B_k\cap A \cap C)$$

$$Pr(A| C)=\sum^k_{j=1}Pr(B_j\cap A | C)=\sum^k_{j=1}\frac{Pr(B_j\cap A \cap C)}{Pr(C)}\\ if \quad Pr(B_j)>0 (j=1\dots k)\quad then \quad Pr(B_j\cap A|C)=Pr(B_j)Pr(A|B_j\cap C)$$

## 扩展试验 Augmented Experiment

Definition Augmented Experiment: If desired,any experiment can be augmented to include the potential or hypothetical observation of as much additional information as we would find useful to help us calculate any probabilities that we desire

Subscribe