Open staplejw opened 6 years ago
Done in-lining. Test now fails like this:
### Failure in: 6:RoundTrip:0:2:t_cauchy_to_students_t:1
haskell/Tests/TestTools.hs:130
expected:
U <~ normal(+0/1, 1/1)
X <~ normal(+0/1, 1/1)
return U * prob2real(1/ abs(X))
but got:
p5 <~ normal(+0/1, 1/1)
p3 <~ normal(+0/1, 1/1)
return p5 / p3
Cases: 164 Tried: 89 Errors: 0 Failures: 5
Cases: 164 Tried: 90 Errors: 0 Failures: 5
Hmmm, why does your expected have an 'abs' but the result doesn't? That is very puzzling.
I've looked at the question you ask (i.e. what the test is) -- it is your 'expected' which is wrong. What you 'got' is correct.
Ok fixed
Failure in: 6:RoundTrip:7:0:t_cauchy_to_students_t:0
haskell/Tests/TestTools.hs:130 expected: chiSqiid = fn n nat: fn mean real: fn stdev prob: q <~ plate of n: normal(mean, stdev) return summate i from 0 to size(q): ((q[i] - mean) * prob2real(1/ stdev)) ^ 2 standardChiSq = fn n nat: chiSq_iid(n, nat2real(0), nat2prob(1)) standardChi = fn n nat: q <~ standardChiSq(n) return sqrt(real2prob(q)) nonCentralT = fn n nat: fn delta prob: U <~ normal(nat2real(0), nat2prob(1)) X <~ standardChi(n) return (U + prob2real(delta))
Failure in: 6:RoundTrip:7:0:t_cauchy_to_students_t:1
haskell/Tests/TestTools.hs:130 expected: chiSqiid = fn n nat: fn mean real: fn stdev prob: q <~ plate of n: normal(mean, stdev) return summate i from 0 to size(q): ((q[i] - mean) * prob2real(1/ stdev)) ^ 2 standardChiSq = fn n nat: chiSq_iid(n, nat2real(0), nat2prob(1)) standardChi = fn n nat: q <~ standardChiSq(n) return sqrt(real2prob(q)) nonCentralT = fn n nat: fn delta prob: U <~ normal(nat2real(0), nat2prob(1)) X <~ standardChi(n) return (U + prob2real(delta))