


The t-distribution
============================

The :index:`t-distribution` arises in statistics. If :math:`Y_1` has a normal
distribution and :math:`Y_2` has a chi-squared distribution with :math:`\nu`
degrees of freedom then the ratio,

.. math::
  X = { Y_1 \over \sqrt{Y_2 / \nu} }

has a t-distribution :math:`t(x;\nu)` with :math:`\nu` degrees of freedom.

.. function:: gsl_ran_tdist(nu)

 This function returns a random variate from the t-distribution.
 The distribution function is,

 .. math::
   p(x) dx = {\Gamma((\nu + 1)/2) \over \sqrt{\pi \nu} \Gamma(\nu/2)}
        (1 + x^2/\nu)^{-(\nu + 1)/2} dx

 for :math:`-\infty < x < +\infty`.

.. function:: gsl_ran_tdist_pdf(x, nu)

 This function computes the probability density :math:`p(x)` at :math:`x` for a
 t-distribution with ``nu`` degrees of freedom, using the formula
 given above.

.. function:: gsl_cdf_tdist_P(x, nu)

.. function:: gsl_cdf_tdist_Q(x, nu)

.. function:: gsl_cdf_tdist_Pinv(P, nu)

.. function:: gsl_cdf_tdist_Qinv(Q, nu)

 These functions compute the cumulative distribution functions
 :math:`P(x), Q(x)` and their inverses for the t-distribution with ``nu``
 degrees of freedom.
