class MoreMath::TDistribution

def probability(x)

t-value +x+.
Returns the cumulative probability (p-value) of the TDistribution for the
def probability(x)
  if x == 0
    0.5
  else
    t = beta_regularized(@df / (@df + x ** 2.0), 0.5 * @df, 0.5)
    if x < 0.0
      0.5 * t
    else
      1 - 0.5 * t
    end
  end
end