File: continuous_logistic.rst

package info (click to toggle)
scipy 1.16.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 236,092 kB
  • sloc: cpp: 503,720; python: 345,302; ansic: 195,677; javascript: 89,566; fortran: 56,210; cs: 3,081; f90: 1,150; sh: 857; makefile: 792; pascal: 284; csh: 135; lisp: 134; xml: 56; perl: 51
file content (38 lines) | stat: -rw-r--r-- 1,375 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

.. _continuous-logistic:

Logistic (Sech-squared) Distribution
====================================

A special case of the Generalized Logistic distribution with :math:`c=1`.
The support is :math:`x \in \mathbb{R}`.

This distribution function has a direct connection with the Fermi-Dirac
distribution via its survival function. I.e. ``scipy.stats.logistic.sf`` is
equivalent to the Fermi-Dirac distribution.

.. math::
   :nowrap:

    \begin{eqnarray*} f\left(x\right) & = & \frac{\exp\left(-x\right)}{\left(1+\exp\left(-x\right)\right)^{2}}\\
    F\left(x\right) & = & \frac{1}{1+\exp\left(-x\right)}\\
    G\left(q\right) & = & -\log\left(1/q-1\right)\\
    S\left(x\right) & = & n_F(x)=\frac{1}{1+\exp\left(x\right)}\end{eqnarray*}

.. math::
   :nowrap:

    \begin{eqnarray*} \mu & = & \gamma+\psi_{0}\left(1\right)=0\\
    \mu_{2} & = & \frac{\pi^{2}}{6}+\psi_{1}\left(1\right)=\frac{\pi^{2}}{3}\\
    \gamma_{1} & = & \frac{\psi_{2}\left(1\right)+2\zeta\left(3\right)}{\mu_{2}^{3/2}}=0\\
    \gamma_{2} & = & \frac{\left(\frac{\pi^{4}}{15}+\psi_{3}\left(1\right)\right)}{\mu_{2}^{2}}=\frac{6}{5}\\
    m_{d} & = & \log1=0\\
    m_{n} & = & -\log\left(2-1\right)=0\end{eqnarray*}

where :math:`\psi_m` is the polygamma function :math:`\psi_m(z) = \frac{d^{m+1}}{dz^{m+1}} \log(\Gamma(z))`.

.. math::

     h\left[X\right]=1.

Implementation: `scipy.stats.logistic`