Trying to learn Bayes' theorem with a website

pineapplewithmouse

Junior Member
Joined
Jun 22, 2021
Messages
52
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:
[math]\tag{1}\Pr(B) = \Pr(B \cap A) + \Pr(B \cap A')[/math]
By Bayes' Theorem:
[math]\tag{2}\Pr(B \cap A)=\Pr(B|A)\Pr(A)[/math]
Similarly,

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