/// <summary>
/// 확률 분포 계산을 위한 누적분포함수
/// </summary>
/// <param name="x">The location at which to compute the cumulative distribution function.</param>
/// <returns>the cumulative distribution at location <paramref name="x"/>.</returns>
public double CumulativeDistribution(double x)
{
// TODO JVG we can probably do a better job for Cauchy special case
if (Double.IsPositiveInfinity(_dof))
{
return(Normal.CumulativeDistribution(_location, _scale, x));
}
var k = (x - _location) / _scale;
var h = _dof / (_dof + (k * k));
var ib = 0.5 * SpecialFunctions.BetaRegularized(_dof / 2.0, 0.5, h);
return(x <= _location ? ib : 1.0 - ib);
}