How to calculate probabilities using Bayesian theorem
32 views (last 30 days)
Show older comments
Ricardo Duarte on 4 Feb 2022
Commented: Ricardo Duarte on 5 Feb 2022
I would like to calculate the probability of A, given B (p(a|b)) which can be done through the Bayesian theorem: p(a|b)=(p(b|a)/p(b))*p(a).
Im considering that: p(a)=normpdf(A) and p(b)=normpdf(B)
However, I'm not sure how to calculate p(b|a).
Can anoyone give me a hand on this?
Thank you in advance.
Find more on Get Started with Statistics and Machine Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!