Estimate marginal and conditional probabilities using Bayes theorem.
Usage
pA(pAgivenB, pB, pAgivenNotB)
pB(pBgivenA, pA, pBgivenNotA)
pAgivenB(pBgivenA, pA, pB = NULL, pBgivenNotA = NULL)
pBgivenA(pAgivenB, pB, pA = NULL, pAgivenNotB = NULL)
pAgivenNotB(pAgivenB, pA, pB)
pBgivenNotA(pBgivenA, pA, pB)
Value
The requested marginal or conditional probability. One of:
the marginal probability of
A
the marginal probability of
B
the conditional probability of
A
givenB
the conditional probability of
B
givenA
the conditional probability of
A
given NOTB
the conditional probability of
B
given NOTA
See also
Other bayesian:
deriv_d_negBinom()
Examples
pA(pAgivenB = .95, pB = .285, pAgivenNotB = .007171515)
#> [1] 0.2758776
pB(pBgivenA = .95, pA = .285, pBgivenNotA = .007171515)
#> [1] 0.2758776
pAgivenB(pBgivenA = .95, pA = .285, pB = .2758776)
#> [1] 0.9814135
pAgivenB(pBgivenA = .95, pA = .285, pBgivenNotA = .007171515)
#> [1] 0.9814134
pAgivenB(pBgivenA = .95, pA = .003, pBgivenNotA = .007171515)
#> [1] 0.285
pBgivenA(pAgivenB = .95, pB = .285, pA = .2758776)
#> [1] 0.9814135
pBgivenA(pAgivenB = .95, pB = .285, pAgivenNotB = .007171515)
#> [1] 0.9814134
pBgivenA(pAgivenB = .95, pB = .003, pAgivenNotB = .007171515)
#> [1] 0.285
pAgivenNotB(pAgivenB = .95, pB = .003, pA = .01)
#> [1] 0.007171515
pBgivenNotA(pBgivenA = .95, pA = .003, pB = .01)
#> [1] 0.007171515