Statistics/Chi-squared distribution: Difference between revisions

m
→‎{{header|Raku}}: fixed 2nd table
m (→‎{{header|Raku}}: insignificant changes)
m (→‎{{header|Raku}}: fixed 2nd table)
Line 457:
 
say "\nχ² 𝒙 cdf for χ² P value (df=3)\n", '-' x 36;
for 2 «**« 0…5^6 -> \p {
my $cdf = cdf_χ2(p, 3).fmt: '%-.10f';
say p.fmt('%2d'), " $cdf ", (1-$cdf).fmt: '%-.10f'
Line 500:
1 0.1987480431 0.8012519569
2 0.4275932955 0.5724067045
3 0.6083748237 0.3916251763
4 0.7385358701 0.2614641299
58 0.82820285579539882943 0.17179714430460117057
16 0.9988660157 0.0011339843
32 0.9999994767 0.0000005233
 
For the airport data, diff total is 4.512821, χ² is 0.08875392598443506, p value 0.7888504263193072</pre>
2,392

edits