Ticket #5095: hyper.cpp

File hyper.cpp, 458 bytes (added by David Koes <dkoes@…>, 12 years ago)

example

Line 
1#include <boost/math/distributions/hypergeometric.hpp>
2#include <boost/math/policies/policy.hpp>
3#include <iostream>
4
5using namespace std;
6using namespace boost;
7
8int 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}