P(B)=P(BA 1)+P(BA2)+...+P(BAn)=P(B|A 1)P(A 1) + P(B|A2)P(A2) + ... + P(B|An)P(An).
This formula is the full probability formula.
An example given by others:
A village and three thieves and thieves are mutually exclusive, and the probability of the village being stolen is sought.
Explanation: Suppose the serial numbers of these three thieves are A 1,A2,A3;
The incident of stealing is marked as B, otherwise it is marked as B.
Then the probability of being stolen is: either A 1, A2 or A3.
If it is A 1, what is the probability? First, A 1, then the village was stolen, that is, both events were satisfied, so it was P(A 1B).
In the same way, we can get p (a2b) and p (a3b).
Because these three thieves are mutually exclusive, it means that they will not steal at the same time. So the probability of being stolen is:
P(B)=P(A 1B)+P(A2B)+P(A3B)
Of course, according to the conditional probability or multiplication formula:
P(B)=P(A 1)P(B|A 1)+P(A2)P(B|A2)+P(A3)P(B|A3) (*)
PS: P(Ai),P(B|Ai) is known.
Q: Do you want to expand it into:
P (b) = P (b) P (a1| b)+P (b) P (a1| b)+P (b) P (a1| b) Impulse?
Of course, this formula is correct, but it does not reflect the solution to this problem: phased.
Formula (*) shows that the problem is divided into two stages:
1) candidate selection, segmentation problem
2) calculating the conditional probability of the segmented subproblem
The corresponding here is:
1) Pick a thief, who will steal it?
2) If the thief is selected as a condition, what is the conditional probability that he will steal?
Therefore, the problem of disassembling the problem into stages is the problem that the total probability formula aims at.