Skip to contents

Mean deviation about the mean, \(E|Z - \mu|\), or about the median.

Usage

bd_mean_deviation(a, b, c, k, about = c("mean", "median"), rel.tol = 1e-10)

Arguments

a

Shape parameter (beta generator).

b

Shape parameter governing the tail.

c

Shape parameter (baseline).

k

Scale parameter (baseline).

about

`"mean"` (default) or `"median"`.

rel.tol

Passed to [stats::integrate()].

Value

A single number, or `NA` when \(b \le 1\).

Details

\(E|Z - \mu| = 2\mu F(\mu) - 2 M_1(\mu)\) and \(E|Z - M| = \mu - 2 M_1(M)\), with \(M\) the median.

Examples

bd_mean_deviation(a = 1.5, b = 3, c = 2, k = 1)
#> [1] 1.256399
bd_mean_deviation(a = 1.5, b = 3, c = 2, k = 1, about = "median")
#> [1] 1.138017