Statistics/Chi-squared distribution: Difference between revisions
Content added Content deleted
m (→{{header|Python}}: cdf function) |
m (change table) |
||
Line 130: | Line 130: | ||
end |
end |
||
⚫ | |||
⚫ | |||
for p in [1, 2, 4, 8, 16, 32] |
for p in [1, 2, 4, 8, 16, 32] |
||
cdf = round(cdf_χ2(p, 3), digits=10) |
|||
println(lpad(p, 2), " ", cdf, " ", round(1.0 - cdf, digits=10)) |
|||
end |
end |
||
Line 174: | Line 174: | ||
10 0.00085003666 0.00336897349 0.00850036660 0.01684486749 0.02833455534 |
10 0.00085003666 0.00336897349 0.00850036660 0.01684486749 0.02833455534 |
||
χ2 x P value (df=3) |
χ2 x cdf for χ2 P value (df=3) |
||
---------------------- |
------------------------------------ |
||
1 0. |
1 0.1987480431 0.8012519569 |
||
2 0. |
2 0.4275932955 0.5724067045 |
||
4 0. |
4 0.7385358701 0.2614641299 |
||
8 0. |
8 0.9539882943 0.0460117057 |
||
16 0. |
16 0.9988660157 0.0011339843 |
||
32 5. |
32 0.9999994767 5.233e-7 |
||
For the airport data, diff total is 4.512820512820512, χ2 is 0.08875392598443503, p value 0.7888504263193064 |
For the airport data, diff total is 4.512820512820512, χ2 is 0.08875392598443503, p value 0.7888504263193064 |