Q:

boost student_t distribution

I have the following code:
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/numeric/interval.hpp>
#include <boost/math/distributions/students_t.hpp>

using namespace boost::numeric;
using namespace interval_lib;

unsigned int len=10;
 unsigned int v = len - 1;
  double sqrtlen = sqrt(double(len));
  students_t dist(v);
    double stdev = 0.2;
    double mean = 3;
    double t_stat = mean * sqrtlen / stdev;
    double q = cdf(complement(dist, std::fabs(t_stat)));

however, when I compile, I get the following error:
Tests.cpp:39:3: error: ‘students_t’ was not declared in this scope
Tests.cpp:39:14: error: expected ‘;’ before ‘dist’
Tests.cpp:45:31: error: ‘dist’ was not declared in this scope
Tests.cpp:45:54: error: ‘complement’ was not declared in this scope
Tests.cpp:45:55: error: ‘cdf’ was not declared in this scope

I don't understand why it is complaining when I have included the appropriate headers. Can anyone please tell me how to fix it. thanks!

A:

Because you didn't include the good namespace. From the doc:

So, for example, the Students-t distribution template in namespace
  boost::math is

Link here

