Expected values

Share:

Description

First and second order moments, variance and expected value of the reciprocal for the type 1 discrete Weibull distribution

Usage

1
2
3
4
Edweibull(q, beta, eps = 1e-04, nmax = 1000, zero = FALSE)
E2dweibull(q, beta, eps = 1e-04, nmax = 1000, zero = FALSE)
Vdweibull(q, beta, eps = 1e-04, nmax = 1000, zero = FALSE)
ERdweibull(q, beta, eps = 1e-04, nmax = 1000)

Arguments

q

first parameter

beta

second parameter

eps

error threshold for the numerical computation of the expected value

nmax

maximum value considered for the numerical approximate computation of the expected value;

zero

TRUE, if the support contains 0; FALSE otherwise

Details

The expected value is numerically computed considering a truncated support: integer values smaller than or equal to 2F^{-1}(1-eps;q,β) are considered, where F^{-1} is the inverse of the cumulative distribution function (implemented by the function qdweibull). However, if such value is greater than nmax, the expected value is computed recalling the formula of the expected value of the corresponding continuous Weibull distribution (see the reference), adding 0.5. Similar arguments apply to the other moments.

Value

the (approximate) expected values of the discrete Weibull distribution: Edweibull gives the first order moment, E2dweibull the second order moment, Vdweibull the variance, ERdweibull the expected value of the reciprocal (only if zero is FALSE)

Author(s)

Alessandro Barbiero

References

M. S. A. Khan, A. Khalique, and A. M. Abouammoh (1989) On estimating parameters in a discrete Weibull distribution, IEEE Transactions on Reliability, 38(3), pp. 348-350

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
q <- 0.75
beta <- 1.25
Edweibull(q, beta)
E2dweibull(q, beta)
Vdweibull(q, beta)
ERdweibull(q, beta)
# if beta=0.75...
beta <- 0.75
Edweibull(q, beta)
Edweibull(q, beta, nmax=100)
# here above, the approximation through the continuous model intervenes
# if beta=1...
beta <- 1
Edweibull(q, beta)
# which equals...
1/(1-q)