# Fix domain of von Mises distribution (Distributions.jl) to -π ~ + π

**URL:** <https://discourse.julialang.org/t/fix-domain-of-von-mises-distribution-distributions-jl-to/33613>\
**Category:** General Usage\
**Tags:** question\
**Created:** [January 21, 2020, 9:52am UTC](https://discourse.julialang.org/t/fix-domain-of-von-mises-distribution-distributions-jl-to/33613 "2020-01-21T09:52:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SSU](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ssu/32/11306_2.png) [@SSU](https://discourse.julialang.org/u/SSU)\
**Post date:** [January 21, 2020, 9:52am UTC](https://discourse.julialang.org/t/fix-domain-of-von-mises-distribution-distributions-jl-to/33613/1 "2020-01-21T09:52:49Z")

</div>

I am analyzing circular mixture time series data which the domain is \pm \pi.  
I am planning to use von Mises distribution in `HMMBase.jl` ( or `Turing.jl`) to estimate the parameters(e.g. \mu, \kappa) of my data.

In `Distributions.jl`, probability density function(PDF) is fixed to \pm \pi but cumulative density function(CDF) is not.  
It seems to be shifted depending on \mu.

 ![VM(1, 1)_pdf_cdf](https://global.discourse-cdn.com/julialang/original/3X/3/c/3c982d69b29e2b6d9f78aa64657cc1fd3f1e0b17.png)

**I want to fix the domain of PDF and CDF to \pm \pi whatever the parameter \mu \ ( -\pi \leq \mu \leq \pi) is.**  
I think I have to implement new bounded von Mises distribution referencing [`Distributions.jl/vonmises.jl`](https://github.com/JuliaStats/Distributions.jl/blob/master/src/univariate/continuous/vonmises.jl).  
In `vonmises.jl` above, CDF is implemented by integration method shown in wikipedia([von Mises distribution](https://en.wikipedia.org/wiki/Von_Mises_distribution)).

I can’t figure out how to achieve my purpose…  
Any help would be greatly appreciated.  
Thank you advance!!
