File: continuous_vonmises.rst

package info (click to toggle)
scipy 1.16.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • 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 (35 lines) | stat: -rw-r--r-- 1,323 bytes parent folder | download | duplicates (5)
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

.. _continuous-vonmises:

Von Mises Distribution
======================

There is one shape parameter :math:`\kappa>0`, with support :math:`x\in\left[-\pi,\pi\right]`.
For values of :math:`\kappa<100` the PDF and CDF formulas below are used. Otherwise, a normal
approximation with variance :math:`1/\kappa` is used.
[Note that the PDF and CDF functions below are periodic with period :math:`2\pi`.
If an input outside :math:`x\in\left[-\pi,\pi\right]` is given, it is converted
to the equivalent angle in this range.]


.. math::
   :nowrap:

    \begin{eqnarray*} f\left(x;\kappa\right) & = & \frac{e^{\kappa\cos x}}{2\pi I_{0}\left(\kappa\right)}\\
    F\left(x;\kappa\right) & = & \frac{1}{2} + \frac{x}{2\pi} + \sum_{k=1}^{\infty}\frac{I_{k}\left(\kappa\right)\sin\left(kx\right)}{I_{0}\left(\kappa\right)\pi k}\\
    G\left(q; \kappa\right) & = & F^{-1}\left(x;\kappa\right)\end{eqnarray*}


where  :math:`I_{k}(\kappa)` is a modified Bessel function of the first kind.

.. math::
   :nowrap:

    \begin{eqnarray*} \mu & = & 0\\
    \mu_{2} & = & \int_{-\pi}^{\pi}x^{2}f\left(x;\kappa\right)dx\\
    \gamma_{1} & = & 0\\
    \gamma_{2} & = & \frac{\int_{-\pi}^{\pi}x^{4}f\left(x;\kappa\right)dx}{\mu_{2}^{2}}-3\end{eqnarray*}

This can be used for defining circular variance.

Implementation: `scipy.stats.vonmises`