Talk:Statistics/Chi-squared distribution: Difference between revisions

m
No edit summary
 
(One intermediate revision by the same user not shown)
Line 4:
According to Wikipedia, for the case k = 2, this formula reduces to F(x; 2) = 1 - exp(-x/2). But for values of x from 0 to 10, the only way I can get this simple formula to agree with the one in the task description is if I halve 'x' first before applying the latter. Here's the Wren code I have so far in case I'm missing something or have done something silly:
 
<syntaxhighlight lang="ecmascriptwren">import "./math" for Math
import "./fmt" for Fmt
 
Line 117:
 
:: I did find that the two formulas I had to calculate the last summation used 2 different meanings for x which had things overly complicated and incorrect. Fixed. --[[User:Wherrera|Wherrera]] ([[User talk:Wherrera|talk]]) 01:22, 3 October 2022 (UTC)
 
Thanks for correcting the cumulative pdf formula. I'm pleased we didn't have to resort to the ''mpfr_gamma_inc'' function as it's not one I've wrapped in Wren-GMP. --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 09:48, 3 October 2022 (UTC)
9,492

edits