[#absl-beta_distribution]
= xref:absl.adoc[absl]::beta&lowbar;distribution
:relfileprefix: ../
:mrdocs:

Generates a floating&hyphen;point variate conforming to a Beta distribution&colon; pdf(x) propto x&circ;(alpha&hyphen;1) &ast; (1&hyphen;x)&circ;(beta&hyphen;1), where the params alpha and beta are both strictly positive real values&period;

== Synopsis

Declared in `&lt;absl&sol;random&sol;beta&lowbar;distribution&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename RealType = double&gt;
class beta&lowbar;distribution;
----

== Description

The support is the open interval (0, 1), but the return value might be equal to 0 or 1, due to numerical errors when alpha and beta are very different&period;

Usage note&colon; One usage is that alpha and beta are counts of number of successes and failures&period; When the total number of trials are large, consider approximating a beta distribution with a Gaussian distribution with the same mean and variance&period; One could use the skewness, which depends only on the smaller of alpha and beta when the number of trials are sufficiently large, to quantify how far a beta distribution is from the normal distribution&period;

== Types

[cols="1,4"]
|===
| Name| Description
| xref:absl/beta_distribution/param_type.adoc[`param&lowbar;type`] 
| The parameter set of the distribution&period;
|===


== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:absl/beta_distribution/result_type.adoc[`result&lowbar;type`] 
| The type of the values produced by the distribution&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:absl/beta_distribution/2constructor-0a.adoc[`beta&lowbar;distribution`]         [.small]#[constructor]#
| Constructors
| xref:absl/beta_distribution/alpha.adoc[`alpha`] 
| Returns the first shape parameter&period;
| xref:absl/beta_distribution/beta.adoc[`beta`] 
| Returns the second shape parameter&period;
| xref:absl/beta_distribution/max.adoc[`max`] 
| Returns the largest value the distribution can produce&period;
| xref:absl/beta_distribution/min.adoc[`min`] 
| Returns the smallest value the distribution can produce&period;
| xref:absl/beta_distribution/operator_call-0a.adoc[`operator()`] 
| Function call operators
| xref:absl/beta_distribution/param-04.adoc[`param`] 
| `param` overloads
| xref:absl/beta_distribution/reset.adoc[`reset`] 
| Resets the internal state of the distribution&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:absl/operator_not_eq-0b8.adoc[absl::operator!&equals;]`
| Compares two distributions for inequality&period;
| `xref:absl/operator_eq-0af.adoc[absl::operator&equals;&equals;]`
| Compares two distributions for equality&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
