From 54cd6365241e63671189a70c5cdbe8cb40e1bb77 Mon Sep 17 00:00:00 2001 From: Quinn Dougherty Date: Mon, 27 Jun 2022 14:37:12 -0400 Subject: [PATCH] added comment for more direct wikipedia citation --- .../src/rescript/Distributions/SymbolicDist/SymbolicDist.res | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res b/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res index 762e5fd5..61470d08 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res +++ b/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res @@ -133,6 +133,7 @@ module Beta = { } let fromMeanAndStdev = (mean, stdev) => { + // https://en.wikipedia.org/wiki/Beta_distribution#Mean_and_variance let var = stdev *. stdev let sampleSize = mean *. (1.0 -. mean) /. var mean->fromMeanAndSampleSize(sampleSize)