-
Notifications
You must be signed in to change notification settings - Fork 242
Closed
Description
It appears to us that boost::math::non_central_t
is using the formula for (not-excess/Pearson) kurtosis as the implementation for kurtosis_excess
, leading to an extra +3 for both kurtosis
and kurtosis_excess
. Here is a simple program demonstrating that using reference values from wolfram alpha ExcessKurtosis[NoncentralStudentTDistribution[10, 3]] and Kurtosis[NoncentralStudentTDistribution[10, 3]]:
#include <iostream>
#include "boost/math/distributions/non_central_t.hpp"
int main() {
constexpr double v = 10;
constexpr double delta = 3;
boost::math::non_central_t_distribution<double> nct(v, delta);
std::cout << " kurtosis is " << boost::math::kurtosis(nct) << " (expected 5.44)" << std::endl;
std::cout << "excess kurtosis is " << boost::math::kurtosis_excess(nct) << " (expected 2.44)" << std::endl;
return 0;
}
Output is:
kurtosis is 8.44235 (expected 5.44)
excess kurtosis is 5.44235 (expected 2.44)
Simply subtracting 3 appears to resolve the issue. xref scipy/scipy#16591
Metadata
Metadata
Assignees
Labels
No labels