0

I have found some information about mean and standard deviation of circular statistics. Namely, Wikipedia

However I am not clear how I can code this in Java.

For circular mean I have tried something like:

for double radian : radians then
    cos += Math.cos(radian)
    sin += Math.sin(radian)
next

atan2 = Math.atan2(cos, sin)

if atan2 < 0 then
    atan2 += 2 * PI
end if

mean = Math.toDegrees(atan2) % 360

This seems to give me a neat result, but for the standard deviation I am very unclear.

Any help would be appreciated.

Matt

4

1 に答える 1

0

まず第一に: Jeffrey の言うとおりです。atan2 を取得する前に、cos と sin を値の数で割る必要があります。

また、標準偏差については、次の論文 (CircStat: A MATLAB Toolbox for Circular Statistics、Journal of Statistical Software 2009) で循環統計 (科学研究用) の matlab ツールボックスについて説明しています。あなたがmatlabを知らなくても、論文は円形標準偏差を含む基礎となる方程式の多くを提供します。

http://kyb.mpg.de/fileadmin/user_upload/files/publications/attachments/J-Stat-Softw-2009-Berens_6037%5b0%5d.pdf

乾杯、

コーネリアス

于 2012-09-06T06:46:31.547 に答える