Learn R Programming

PearsonDS (version 1.3.1)

PearsonII: The Pearson Type II (aka Symmetric Beta) Distribution

Description

Density, distribution function, quantile function and random generation for the Pearson type II (aka symmetric Beta) distribution.

Usage

dpearsonII(x, a, location, scale, params, log = FALSE)

ppearsonII(q, a, location, scale, params, lower.tail = TRUE, log.p = FALSE)

qpearsonII(p, a, location, scale, params, lower.tail = TRUE, log.p = FALSE)

rpearsonII(n, a, location, scale, params)

Value

dpearsonII gives the density, ppearsonII gives the distribution function, qpearsonII gives the quantile function, and rpearsonII generates random deviates.

Arguments

x, q

vector of quantiles.

p

vector of probabilities.

n

number of observations.

a

shape parameter of Pearson type II distribution.

location

location parameter of Pearson type II distribution.

scale

scale parameter of Pearson type II distribution.

params

vector/list of length 3 containing parameters a, location, scale for Pearson type II distribution (in this order!).

log, log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE, probabilities are \(P[X\le x]\), otherwise, \(P[X>x]\).

Details

Essentially, Pearson type II distributions are (location-scale transformations of) symmetric Beta distributions, the above functions are thus simple wrappers for dbeta, pbeta, qbeta and rbeta contained in package stats. The probability density function with parameters a, scale\(=s\) and location\(=\lambda\) is given by $$f(x)=\frac{1}{|s|}\frac{\Gamma(2a)}{\Gamma(a)^2}\left(\frac{x-\lambda}{s}\cdot \left(1-\frac{x-\lambda}{s}\right)\right)^{a-1}$$ for \(a>0\), \(s\ne 0\), \(0<\frac{x-\lambda}{s}<1\).

References

See the references in Beta.

See Also

Beta, PearsonDS-package, Pearson

Examples

Run this code
## define Pearson type II parameter set with a=2, location=1, scale=2
pIIpars <- list(a=2, location=1, scale=2)
## calculate probability density function
dpearsonII(seq(1,3,by=0.5),params=pIIpars)
## calculate cumulative distribution function
ppearsonII(seq(1,3,by=0.5),params=pIIpars)
## calculate quantile function
qpearsonII(seq(0.1,0.9,by=0.2),params=pIIpars)
## generate random numbers
rpearsonII(5,params=pIIpars)

Run the code above in your browser using DataLab