You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add computeWithYates and computeWithWilliams to ChiSquareTest
Add two new continuity-correction overloads for the chi-square
goodness-of-fit test:
- ChiSquareTest.computeWithYates: applies Yates's continuity correction
(|O - E| - 0.5) before squaring each term; recommended for df=1.
- ChiSquareTest.computeWithWilliams: divides the raw chi-square by
Williams's q = 1 + (k^2-1)/(6nk), which provides a better
approximation for small samples across any number of categories.
Both methods include XML-doc with references. Four new tests cover
each correction variant.
Part of #87.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
// if expected |> Seq.exists (fun x -> abs x < 5.) then printfn "Warning: A value less than 5 is present in expected values. Results may not be correct!"
45
-
// let sumEx = Seq.sum expected
46
-
// let sumOb = Seq.sum observed
47
-
// if Math.Round(sumEx,1) <> Math.Round(sumOb,1) then printfn "Warning: The sum of observed values does not match the sum of expected values. SumEx: %.3f SumOb: %.3f" sumEx sumOb
0 commit comments