[SciPy-User] special: the missing documentation

josef.pktd@gmai... josef.pktd@gmai...
Sat Nov 3 13:04:20 CDT 2012


I_{|n|} in  http://en.wikipedia.org/wiki/Von_Mises_distribution#Moments


>>> special.ivp(0, kappa, n=0)
11.301921952136331
>>> special.i0(kappa)
11.301921952136331

>>> special.ivp(0, kappa, n=1)
9.7594651537044488
>>> special.i1(kappa)
9.7594651537044488
>>> special.ivp(1, kappa, n=0)
9.7594651537044488

induction fails
>>> special.ivp(2, kappa, n=0)
6.4221893752841046
>>> special.ivp(1, kappa, n=1)
8.8620556637102172
>>> special.ivp(0, kappa, n=2)
8.8620556637102172


>>> xx = np.random.vonmises(mu, kappa, size=10000)
>>> circ_moment(xx, p=2, cent=False)
((-0.57140066760819208-0.012030738424083472j), 0.57152730609317026,
-3.1205409436169562)
>>> special.ivp(2, kappa, n=0) / special.i0(kappa) * np.exp(2 * 1j*mu)
(-0.56823869448772457+6.9589169835606258e-17j)


Josef
proof by example works without understanding


More information about the SciPy-User mailing list