Fix normal distribution from 90CI (stdev was double what it should be)

This commit is contained in:
Sebastian Kosch 2020-06-02 15:24:09 -07:00
parent f3f1861ba6
commit 68efbf0396

View File

@ -100,7 +100,7 @@ module Normal = {
let from90PercentCI = (low, high) => { let from90PercentCI = (low, high) => {
let mean = E.A.Floats.mean([|low, high|]); let mean = E.A.Floats.mean([|low, high|]);
let stdev = (high -. low) /. 1.645; let stdev = (high -. low) /. (2. *. 1.644854);
`Normal({mean, stdev}); `Normal({mean, stdev});
}; };
let inv = (p, t: t) => Jstat.normal##inv(p, t.mean, t.stdev); let inv = (p, t: t) => Jstat.normal##inv(p, t.mean, t.stdev);