From e0289ed23fea20006e5b89f8914f7a2a97efdc58 Mon Sep 17 00:00:00 2001 From: Quinn Dougherty Date: Thu, 30 Jun 2022 12:29:09 -0400 Subject: [PATCH] documented addition to `beta` api --- packages/website/docs/Api/DistGeneric.mdx | 2 ++ packages/website/docs/Guides/DistributionCreation.mdx | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/packages/website/docs/Api/DistGeneric.mdx b/packages/website/docs/Api/DistGeneric.mdx index e49eec1c..42f464df 100644 --- a/packages/website/docs/Api/DistGeneric.mdx +++ b/packages/website/docs/Api/DistGeneric.mdx @@ -70,12 +70,14 @@ uniform(10, 12); ``` beta: (distribution|number, distribution|number) => distribution +beta: (dict<{mean: distribution|number, stdev: distribution|number}>) => distribution ``` **Examples** ```javascript beta(20, 25); +beta({ mean: 0.39, stdev: 0.1 }); ``` ### cauchy diff --git a/packages/website/docs/Guides/DistributionCreation.mdx b/packages/website/docs/Guides/DistributionCreation.mdx index 5e84b47f..1ad69960 100644 --- a/packages/website/docs/Guides/DistributionCreation.mdx +++ b/packages/website/docs/Guides/DistributionCreation.mdx @@ -259,6 +259,7 @@ with values at 1 and 2. Therefore, this is the same as `mixture(pointMass(1),poi ## Beta `beta(alpha:number, beta:number)` +`beta({mean: number, stdev: number})` Creates a [beta distribution](https://en.wikipedia.org/wiki/Beta_distribution) with the given `alpha` and `beta` values. For a good summary of the beta distribution, see [this explanation](https://stats.stackexchange.com/a/47782) on Stack Overflow. @@ -278,6 +279,12 @@ Creates a [beta distribution](https://en.wikipedia.org/wiki/Beta_distribution) w + + + ### Arguments