Ticket #5095: hyper.cpp
File hyper.cpp, 458 bytes (added by , 12 years ago) |
---|
Line | |
---|---|
1 | #include <boost/math/distributions/hypergeometric.hpp> |
2 | #include <boost/math/policies/policy.hpp> |
3 | #include <iostream> |
4 | |
5 | using namespace std; |
6 | using namespace boost; |
7 | |
8 | int main() |
9 | { |
10 | unsigned N = 16086184; |
11 | unsigned n = 256004; |
12 | unsigned Q = 251138; |
13 | math::hypergeometric_distribution<double> hyper(n, Q, N); |
14 | cout << math::pdf<double>(hyper, 4000) << " " << math::pdf<double>(hyper, 4001) << " " << math::pdf<double>(hyper, 4002) << "\n"; |
15 | |
16 | return 0; |
17 | |
18 | } |