beta_dist: Construct a beta distribution object.

View source: R/beta_dist.R

beta_distR Documentation

Construct a beta distribution object.

Description

Creates an S3 object representing a beta distribution with shape parameters shape1 and shape2. The PDF on (0, 1) is

f(x) = \frac{x^{a-1}(1-x)^{b-1}}{B(a,b)}

where a = shape1, b = shape2, and B(a,b) is the beta function.

Usage

beta_dist(shape1, shape2)

Arguments

shape1

First shape parameter, must be a positive scalar.

shape2

Second shape parameter, must be a positive scalar.

Value

A beta_dist object with classes c("beta_dist", "univariate_dist", "continuous_dist", "dist").

Examples

x <- beta_dist(shape1 = 2, shape2 = 5)
mean(x)
vcov(x)
format(x)

algebraic.dist documentation built on Feb. 27, 2026, 5:06 p.m.