-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
MAINT: cauchy moments are undefined #4809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I'm not sure what this comment is about: |
I'm not sure I understand the reasoning in the Wikipedia article linked in #2055 (comment). Using the principal value for the mean looks sensible, and using anything but Cauchy principal value looks strange (to me, FWIW). Anyway, I do not think it's worth worrying about too much, so I'm merging this as is. Thanks Alex and sorry this PR received no attention for this long. |
MAINT: cauchy moments are undefined
Just to make sure I understand, you are suggesting that for any symmetric distribution using the point of symmetry for the mean looks sensible and anything else looks strange? |
It might be sensible, but that's the median and not the mean (expected value). IIRC I have seen also "centrality parameter" for estimates of the center of location for heavy tailed distribution estimation, which is more vague and can be estimated by truncating the sample by ignoring or clipping large absolute values. |
Essentially, yes. |
Here's an imperfect analogy with the definition of prime numbers. It could be possible to redo definitions and theorems in number theory so that 1 is a prime number, but it would require adding nitpicky caveats to the existing theorems like 'every positive integer has unique prime factorization'. Similarly I think that definitions and theorems in probability theory could be redone so that the mean is the principal value mean, but this would requiring adding nitpicky caveats to theorems like the laws of large numbers. I'm not sure if this is correct, but if it is then it could be a better reason than rigor for the sake of rigor. |
It's not math or engineering, it's statistics and probability theory Wikipedia mentions that the law of large numbers doesn't hold in this case
use case:
|
And as practical consequence The unit tests exclude some checks, or excluded them, when a moment is inf or nan. |
See #2055 (comment).
This PR could weaken some tests by not failing moment calculations that mistakenly return
nan
.