Message Boards Message Boards

0
|
11055 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Improving precision of VonMisesDistribution CDF?

Posted 2 years ago

In comparing the computation of vonmisesDistribution CDF using

N[CDF[VonMisesDistribution[0, 1], -0.78539816339744828], 17]

0.25614866519978797

I can integrate the PDF using

NIntegrate[ PDF[VonMisesDistribution[0,1],x], {x,-\Pi, Divide[-\Pi,4]}]

and by asking for more digits get a value 0.25615930008908783
that agrees with my calculation in C++ using a Boost tanhsinh integration, and with values computed by R and Python with machine precision (17 decimal digits).

I suspect that the integration is terminated after about 6 decimal digit precision rather than my expectation that it will use machine precision of 17 decimal digits.

I have experimented with trying to set $Tolerance, and $MaxExtraPrecision and $MaxPrecision but without success. Can anyone please confirm this diagnosis and perhaps tell me how to force computation of machine precision 17 decimal digits.

POSTED BY: Paul Bristow
2 Replies

On Mathematica 13.2.0,I try:

   $MaxExtraPrecision = 1000; N[CDF[VonMisesDistribution[0, 1], 
    Rationalize[-0.78539816339744828, 0]], 100]

   (*0.2561593000890879239407202876346412947984606597806103767750650819525095042102102174133395496879698984*)
POSTED BY: Mariusz Iwaniuk
Posted 1 year ago

Not an answer but there is nothing in the documentation of CDF about modifying the default precision (WorkingPrecision, etc.).

Using NProbability is an alternative to explicitly integrating the pdf (but under-the-hood it might be identical to using NIntegrate):

NProbability[x < -\[Pi]/4, x \[Distributed] VonMisesDistribution[0, 1], WorkingPrecision -> 30]
(* 0.256159300089087906357472644085 *)
POSTED BY: Jim Baldwin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract