added comment for more direct wikipedia citation
This commit is contained in:
parent
14189fd848
commit
54cd636524
|
@ -133,6 +133,7 @@ module Beta = {
|
||||||
}
|
}
|
||||||
|
|
||||||
let fromMeanAndStdev = (mean, stdev) => {
|
let fromMeanAndStdev = (mean, stdev) => {
|
||||||
|
// https://en.wikipedia.org/wiki/Beta_distribution#Mean_and_variance
|
||||||
let var = stdev *. stdev
|
let var = stdev *. stdev
|
||||||
let sampleSize = mean *. (1.0 -. mean) /. var
|
let sampleSize = mean *. (1.0 -. mean) /. var
|
||||||
mean->fromMeanAndSampleSize(sampleSize)
|
mean->fromMeanAndSampleSize(sampleSize)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user