File: continuous_hypsecant.rst

package info (click to toggle)
python-scipy 0.18.1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 75,464 kB
  • ctags: 79,406
  • sloc: python: 143,495; cpp: 89,357; fortran: 81,650; ansic: 79,778; makefile: 364; sh: 265
file content (46 lines) | stat: -rw-r--r-- 1,776 bytes parent folder | download | duplicates (2)
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

.. _continuous-hypsecant:

Hyperbolic Secant Distribution
==============================

Related to the logistic distribution and used in lifetime analysis.
Standard form is (defined over all :math:`x` )

.. math::
   :nowrap:

    \begin{eqnarray*} f\left(x\right) & = & \frac{1}{\pi}\mathrm{sech}\left(x\right)\\ F\left(x\right) & = & \frac{2}{\pi}\arctan\left(e^{x}\right)\\ G\left(q\right) & = & \log\left(\tan\left(\frac{\pi}{2}q\right)\right)\end{eqnarray*}

.. math::

     M\left(t\right)=\sec\left(\frac{\pi}{2}t\right)

.. math::
   :nowrap:

    \begin{eqnarray*} \mu_{n}^{\prime} & = & \frac{1+\left(-1\right)^{n}}{2\pi2^{2n}}n!\left[\zeta\left(n+1,\frac{1}{4}\right)-\zeta\left(n+1,\frac{3}{4}\right)\right]\\  & = & \left\{ \begin{array}{cc} 0 & n\mathrm{ odd}\\ C_{n/2}\frac{\pi^{n}}{2^{n}} & n\mathrm{ even}\end{array}\right.\end{eqnarray*}

where :math:`C_{m}` is an integer given by

.. math::
   :nowrap:

    \begin{eqnarray*} C_{m} & = & \frac{\left(2m\right)!\left[\zeta\left(2m+1,\frac{1}{4}\right)-\zeta\left(2m+1,\frac{3}{4}\right)\right]}{\pi^{2m+1}2^{2m}}\\  & = & 4\left(-1\right)^{m-1}\frac{16^{m}}{2m+1}B_{2m+1}\left(\frac{1}{4}\right)\end{eqnarray*}

where :math:`B_{2m+1}\left(\frac{1}{4}\right)` is the Bernoulli polynomial of order :math:`2m+1` evaluated at :math:`1/4.` Thus

.. math::

     \mu_{n}^{\prime}=\left\{ \begin{array}{cc} 0 & n\mathrm{ odd}\\ 4\left(-1\right)^{n/2-1}\frac{\left(2\pi\right)^{n}}{n+1}B_{n+1}\left(\frac{1}{4}\right) & n\mathrm{ even}\end{array}\right.

.. math::
   :nowrap:

    \begin{eqnarray*} m_{d}=m_{n}=\mu & = & 0\\ \mu_{2} & = & \frac{\pi^{2}}{4}\\ \gamma_{1} & = & 0\\ \gamma_{2} & = & 2\end{eqnarray*}

.. math::

     h\left[X\right]=\log\left(2\pi\right).

Implementation: `scipy.stats.hypsecant`