Function cmb_random_triangular
Defined in File cmb_random.h
Function Documentation
-
double cmb_random_triangular(double min, double mode, double max)
Triangular distribution on the interval
[min, max]with peak atmode, wheremin < mode < max.The probability density function is zero at
minandmax, and reaches a maximum of2 / (max - min)atmode. The mean is(min + mode + max) / 3.Used as an empirical “I don’t know much about the shape of this thing” distribution. Also consider the PERT distributions
cmb_random_PERT()andcmb_random_PERT_mod()or the scaled beta distributioncmb_random_beta()for this purpose.See also https://en.wikipedia.org/wiki/Triangular_distribution