File: continuous_halfcauchy.rst

package info (click to toggle)
scipy 1.16.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 236,088 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: 771; pascal: 284; csh: 135; lisp: 134; xml: 56; perl: 51
file content (40 lines) | stat: -rw-r--r-- 1,246 bytes parent folder | download | duplicates (6)
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

.. _continuous-halfcauchy:

HalfCauchy Distribution
=======================

If :math:`Z` is Hyperbolic Secant distributed then :math:`e^{Z}` is
Half-Cauchy distributed. Also, if :math:`W` is (standard) Cauchy
distributed, then :math:`\left|W\right|` is Half-Cauchy distributed.
Special case of the Folded Cauchy distribution with :math:`c=0.`
The support is :math:`x\geq0`. The standard form is

.. math::
   :nowrap:

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

.. math::

     M\left(t\right)=\cos t+\frac{2}{\pi}\left[\mathrm{Si}\left(t\right)\cos t-\mathrm{Ci}\left(\mathrm{-}t\right)\sin t\right]

where :math:`\mathrm{Si}(t)=\int_0^t \frac{\sin x}{x} dx`, :math:`\mathrm{Ci}(t)=-\int_t^\infty \frac{\cos x}{x} dx`.

.. math::
   :nowrap:

    \begin{eqnarray*} m_{d} & = & 0\\
    m_{n} & = & \tan\left(\frac{\pi}{4}\right)\end{eqnarray*}

No moments, as the integrals diverge.


.. math::
   :nowrap:

    \begin{eqnarray*} h\left[X\right] & = & \log\left(2\pi\right)\\  & \approx & 1.8378770664093454836.\end{eqnarray*}

Implementation: `scipy.stats.halfcauchy`