Bayes' theorem states the following:
P(A|B)=(P(B|A) * P(A))/P(B)
Here, P(A|B) is the conditional probability of A being true given that B is true. It is used to update the value of the probability that A is true given the new observations about other probabilistic events. This theorem can be extended to a statement with multiple random variables:
P(A|B1,...,Bn)=[P(B1|A) * ... * P(Bn|A) * P(A)] / [P(B1|A) * ... * P(Bn|A) * P(A) + P(B1|~A) * ... * P(Bn|~A) * P(~A)]
The random variables B1,...,Bn have to be independent conditionally given A. The random variables can be discrete or continuous and follow some probability distribution, for example, normal (Gaussian) distribution.
For the case of a discrete random variable, it would be best to ensure you have a data item for each value of a discrete random variable given any of the conditions (value of A) by collecting enough...