TheAlgorithms/C++ 1.0.0
All the algorithms implemented in C++
|
#include <iostream>
Go to the source code of this file.
Functions | |
double | bayes_AgivenB (double BgivenA, double A, double B) |
double | bayes_BgivenA (double AgivenB, double A, double B) |
int | main () |
Bayes' theorem allows one to find \(P(A|B)\) given \(P(B|A)\) or \(P(B|A)\) given \(P(A|B)\) and \(P(A)\) and \(P(B)\).
Note that \(P(A|B)\) is read 'The probability of A given that the event B has occured'.
Definition in file bayes_theorem.cpp.
double bayes_AgivenB | ( | double | BgivenA, |
double | A, | ||
double | B ) |
returns P(A|B)
Definition at line 14 of file bayes_theorem.cpp.
double bayes_BgivenA | ( | double | AgivenB, |
double | A, | ||
double | B ) |
returns P(B|A)
Definition at line 20 of file bayes_theorem.cpp.
int main | ( | void | ) |
Main function
Definition at line 26 of file bayes_theorem.cpp.