Talk:Verify distribution uniformity/Chi-squared test: Difference between revisions

Content added Content deleted
No edit summary
Line 40: Line 40:


:--[[User:Rdm|Rdm]] 22:28, 7 May 2011 (UTC)
:--[[User:Rdm|Rdm]] 22:28, 7 May 2011 (UTC)

== possible error ===

In the Ruby version of gammaInc_Q, near the end there is a few lines
(n-1).step(0, -1) do |j|
t = h * j
sum += f0[t] + hh * df0[t]
end
The last iteration produces a value of j of 0, which means t is zero but df0[t] is not a number
as it requires the calculation of 0**a2. I just changed the iterator to (n-1).step(1, -1) do |j|
and it seems to give the correct result.