Trying to learn Bayes' theorem with a website

pineapplewithmouse

Junior Member
Joined
Jun 22, 2021
Messages
63
And I couldn't understand the solution that the website said.
I understood everything, except one thing:
The solution stated that P(B)=P(A)*P(B∣A)+P(A doesn't happen)*P(B∣A doesn't happen).
Someone can explain me this?
 
And I couldn't understand the solution that the website said.
I understood everything, except one thing:
The solution stated that P(B)=P(A)*P(B∣A)+P(A doesn't happen)*P(B∣A doesn't happen).
Someone can explain me this?
Law of Total Probability:
Pr(B)=Pr(BA)+Pr(BA)(1)\tag{1}\Pr(B) = \Pr(B \cap A) + \Pr(B \cap A')
By Bayes' Theorem:
Pr(BA)=Pr(BA)Pr(A)(2)\tag{2}\Pr(B \cap A)=\Pr(B|A)\Pr(A)
Similarly,

Pr(BA)=Pr(BA)Pr(A)(3)\tag{3}\Pr(B \cap A')=\Pr(B|A')\Pr(A')
Substitute (2) and (3) into (1):
Pr(B)=Pr(BA)Pr(A)+Pr(BA)Pr(A)\Pr(B) =\Pr(B|A)\Pr(A) + \Pr(B|A')\Pr(A')
 
Top