Skip to contents

P(Z) = sum_i P(Z | Ai) P(Ai) over a complete, mutually exclusive set.

Usage

Ptotal(priors, likelihoods)

Arguments

priors

prior probabilities, summing to 1.

likelihoods

P(Z | Ai), same length as priors.

Value

list(p_total, p_event, p_z, p_b); the last three are aliases of p_total kept for the eq (2.29)/(2.55)/(2.86) callers.

References

Morin, D. J. (2016). Probability: For the Enthusiastic Beginner. Createspace. Eqs. (2.29), (2.55), (2.86).

Examples

Ptotal(c(0.02, 0.98), c(0.95, 0.10))$p_total
#> [1] 0.117