rBetaMS {betafunctions}R Documentation

Random Draw from the Beta Probability Density Distribution With Specific Mean and Variance.

Description

Draws random samples of observations from the Standard Beta probability density distribution with defined mean and variance.

Usage

rBetaMS(n, mean, variance = NULL, sd = NULL, l = 0, u = 1)

Arguments

n

Number of observations to be drawn from under the Standard Beta Probability Density Distribution.

mean

The mean of the target Standard Beta probability density distribution.

variance

The variance of the target Standard Beta probability density distribution.

sd

The standard deviation of the target Standard probability density distribution.

l

The lower-bound location parameter. Default set to 0 (the standard Beta distribution).

u

The upper-bound location parameter. Default set to 1 (the standard Beta distribution).

Value

A vector of length n, each value representing a random draw from the Standard Beta probability density distribution with defined mean and variance.

Examples

# To draw a random sample of 100 values from a Standard Beta distribution
# with a mean of 0.6 and variance = 0.04:
rBetaMS(n = 100, mean = 0.6, variance = 0.04)

# To draw a random sample of 100 values from a Four-Parameter Beta
# 0 and an upper-bound of 100:
rBetaMS(n = 100, mean = 60, variance = 400, l = 0, u = 100)

[Package betafunctions version 1.9.0 Index]