File: continuous_t.rst

package info (click to toggle)
scipy 1.17.0-1exp2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 235,340 kB
  • sloc: cpp: 506,914; python: 357,038; ansic: 215,028; javascript: 89,566; fortran: 19,308; cs: 3,081; f90: 1,150; sh: 860; makefile: 519; pascal: 284; lisp: 134; xml: 56; perl: 51
file content (50 lines) | stat: -rw-r--r-- 1,882 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

.. _continuous-t:

Student t Distribution
======================

There is one shape parameter :math:`\nu>0` and the support is :math:`x\in\mathbb{R}`.

.. math::
   :nowrap:

    \begin{eqnarray*} f\left(x;\nu\right) & = & \frac{\Gamma\left(\frac{\nu+1}{2}\right)}{\sqrt{\pi\nu}\Gamma\left(\frac{\nu}{2}\right)\left[1+\frac{x^{2}}{\nu}\right]^{\frac{\nu+1}{2}}}\\
    F\left(x;\nu\right) & = &
      \left\{
        \begin{array}{ccc}
          \frac{1}{2}I\left(\frac{\nu}{\nu+x^{2}}; \frac{\nu}{2},\frac{1}{2}\right) &  & x\leq0\\
          1-\frac{1}{2}I\left(\frac{\nu}{\nu+x^{2}}; \frac{\nu}{2},\frac{1}{2}\right) &  & x\geq0
        \end{array}
      \right.\\
    G\left(q;\nu\right) & = & \left\{
      \begin{array}{ccc}
        -\sqrt{\frac{\nu}{I^{-1}\left(2q; \frac{\nu}{2},\frac{1}{2}\right)}-\nu} &  & q\leq\frac{1}{2}\\
        \sqrt{\frac{\nu}{I^{-1}\left(2-2q; \frac{\nu}{2},\frac{1}{2}\right)}-\nu} &  & q\geq\frac{1}{2}
      \end{array}
      \right. \end{eqnarray*}

.. math::
   :nowrap:

    \begin{eqnarray*} m_{n}=m_{d}=\mu & = & 0\\
    \mu_{2} & = & \frac{\nu}{\nu-2}\quad\nu>2\\
    \gamma_{1} & = & 0\quad\nu>3\\
    \gamma_{2} & = & \frac{6}{\nu-4}\quad\nu>4\end{eqnarray*}

where :math:`I\left(x; a,b\right)` is the incomplete beta integral and :math:`I^{-1}\left(I\left(x; a,b\right); a,b\right)=x`.
As :math:`\nu\rightarrow\infty,` this distribution approaches the standard normal distribution.

.. math::

     h\left[X\right]=\frac{\nu+1}{2} \left[\psi \left(\frac{1+\nu}{2} \right) -\psi \left(\frac{\nu}{2} \right) \right] + \ln \left[ \sqrt{\nu} B \left( \frac{\nu}{2}, \frac{1}{2} \right) \right]

where :math:`\psi(x)` is the digamma function and :math:`B(x, y)` is the
beta function.

References
----------

- "Student's t-distribution", Wikipedia, https://en.wikipedia.org/wiki/Student%27s_t-distribution

Implementation: `scipy.stats.t`