USArmy-Corps-of-Engineers-RMC / Numerics

Numerics is a free and open-source library for .NET developed by USACE-RMC, providing a comprehensive set of methods and algorithms for numerical computations and statistical analysis.
Other
21 stars 2 forks source link

ChiSquared-Median right equation? #99

Closed tikigonzo closed 2 months ago

tikigonzo commented 3 months ago

When testing the median for ChiSquared and when I looked on the wiki for the formulas I didn't find anything about the median always being equal to ICDF(0.5). Is this the right equation?

k(1-(2/9k))^3 where k is the degrees of freedom

HadenSmith commented 2 months ago

Yes, the median is the 50-th percentile of the distribution. Sometimes it has a nice, closed-form expression. Otherwise, you can always get it from the InverseCDF at 0.5.