Easy to understand Bayes formula

To understand Bayes formula , First, we need to know the conditional probability formula , The concept of total probability formula , Because the Bayes formula is derived from both of them .

One , Conditional probability formula
P(B|A)= P(AB)/(P(A)
meaning : condition B Lower generation A The probability of A and B The joint probability divided by B The probability of .
Total probability formula , Bayes formula is derived from it .

P(AB)
It's an event A happen , And events B Probability of occurrence , Event scope or entire sample space ;A,B There is no order , Among them AB mean AB The part where two spaces intersect , This part can also be regarded as in the B In space ,A And there it is , In fact, this formula P(AB) So Ω Of the sample space , however P(A|B) So B Of the sample space ,
P(B | A) It's an event A First ,B Probability of occurrence , in other words P(B | A) Greater than or equal to P(AB). Be aware that it's an event A First , Because of events A The sample space is narrowed by the occurrence of .
P(AB):

P(B | A):

Two , Multiplication theorem
P(AB) = P( B | A)P(A), P(AB) = P( A | B)P(B)
It's easy to understand with the above pictures , event A And events B The probability of simultaneous occurrence is equal to the event B In the event A The probability of occurrence times the event in the sample space A The probability of occurrence in the entire sample space .
therefore , The rudiment of Bayes formula
From the above two formulas :P(B|A)= (P(A|B)P(B))/(P(A))

Three , Total probability formula
set up E For the experiment A Sample space of ,B1,B2…Bn by A A set of events for , Namely B The series of events is divided up A And each B No overlap ( Incompatible ), Then the total probability formula can be deduced as :
When B1+B2+B3=A Time :
P(A)
= P(AA)
=P[A(B1+B2+B3)]
=P(AB1+AB2+AB3)
=P(AB1)+P(AB2)+P(AB3),( because P(AB)=P(A|B)P(B))
=P(A|B1)P(B1)+ P(A|B2)P(B2) + P(A|B3)P(B3)
Namely :P(A) = P(B1) P(A|B1) + P(B2)P(A|B2) + …

Four , Bayes formula :
It can be obtained from the formula of conditional probability and total probability :

Technology
©2020 ioDraw All rights reserved
Self made whole person computer program PHP call shell command python Simple record of network programming layui.table Examples of dynamically getting header and list data Big data environment --- data warehouse (hive+mysql+hadoop) The construction of What are the types of variables ?MYSQL database DML Common commands 《 From machine learning to deep learning 》 note (2) Unsupervised learning log4j Method of printing exception stack information Android Development — Display food information according to customer budget