php8.5
Home/ Manual/ stats / functions/ stats_rand_gen_beta

stats_rand_gen_beta

PHP function Edit on GitHub ✎

(PECL stats >= 1.0.0)

Generates a random deviate from the beta distribution

Description

stats_rand_gen_beta(float $a, float $b): float

Returns a random deviate from the beta distribution with parameters A and B. The density of the beta is x^(a-1) * (1-x)^(b-1) / B(a,b) for 0 < x <. Method R. C. H. Cheng.

Parameters

a

The shape parameter of the beta distribution

b

The shape parameter of the beta distribution

Return Values

A random deviate

Source: reference/stats/functions/stats-rand-gen-beta.xml · from the official PHP manual (php/doc-en)