cf_Exponential: Characteristic function of a linear combination of...

View source: R/cf_Exponential.R

cf_ExponentialR Documentation

Characteristic function of a linear combination of independent EXPONENTIAL random variables

Description

cf_Exponential(t, lambda) evaluates characteristic function of a linear combination (resp. convolution) of independent EXPONENTIAL random variables.

That is, cf_Exponential evaluates the characteristic function cf(t) of Y = sum_{i=1}^N coef_i * X_i, where X_i ~ EXP(\lambda_i) are inedependent RVs, with the rate parameters \lambda_i > 0, for i = 1,...,N.

The characteristic function of Y is defined by

cf(t) = Prod( \lambda_i / (\lambda_i - 1i*t) ).

Usage

cf_Exponential(t, lambda, coef, niid)

Arguments

t

vector or array of real values, where the CF is evaluated.

lambda

vector of the 'rate' parameters lambda > 0. If empty, default value is lambda = 1.

coef

vector of the coefficients of the linear combination of the GAMMA random variables. If coef is scalar, it is assumed that all coefficients are equal. If empty, default value is coef = 1.

niid

scalar convolution coeficient niid, such that Z = Y +...+ Y is sum of niid iid random variables Y, where each Y = sum_{i=1}^N coef(i) * log(X_i) is independently and identically distributed random variable. If empty, default value is niid = 1.

Value

Characteristic function cf(t) of a linear combination of independent EXPONENTIAL random variables.

Note

Ver.: 16-Sep-2018 18:16:12 (consistent with Matlab CharFunTool v1.3.0, 10-May-2017 18:11:50).

See Also

For more details see WIKIPEDIA: https://en.wikipedia.org/wiki/Exponential_distribution.

Other Continuous Probability Distribution: cfS_Arcsine(), cfS_Beta(), cfS_Gaussian(), cfS_Laplace(), cfS_Rectangular(), cfS_Student(), cfS_TSP(), cfS_Trapezoidal(), cfS_Triangular(), cfS_Wigner(), cfX_ChiSquare(), cfX_Exponential(), cfX_FisherSnedecor(), cfX_Gamma(), cfX_InverseGamma(), cfX_LogNormal(), cf_ArcsineSymmetric(), cf_BetaNC(), cf_BetaSymmetric(), cf_Beta(), cf_ChiSquare(), cf_FisherSnedecorNC(), cf_FisherSnedecor(), cf_Gamma(), cf_InverseGamma(), cf_Laplace(), cf_LogRV_BetaNC(), cf_LogRV_Beta(), cf_LogRV_ChiSquareNC(), cf_LogRV_ChiSquare(), cf_LogRV_FisherSnedecorNC(), cf_LogRV_FisherSnedecor(), cf_LogRV_MeansRatioW(), cf_LogRV_MeansRatio(), cf_LogRV_WilksLambdaNC(), cf_LogRV_WilksLambda(), cf_Normal(), cf_RectangularSymmetric(), cf_Student(), cf_TSPSymmetric(), cf_TrapezoidalSymmetric(), cf_TriangularSymmetric(), cf_vonMises()

Examples

## EXAMPLE 1
# CF of the Exponential distribution with lambda = 5
lambda <- 5
t <- seq(from = -50,
         to = 50,
         length.out = 501)
plotReIm(
        function(t)
                cfX_Exponential(t, lambda),
        t,
        title = expression('CF of the Exponential distribution with' ~ lambda ~ '= 5')
)

## EXAMPLE 2
# CF of a linear combination of independent Exponential RVs
coef <- 1 / (((1:50) - 0.5) * pi) ^ 2
lambda <- 5
t <- seq(from = -100,
         to = 100,
         length.out = 201)
plotReIm(function(t)
        cfX_Exponential(t, lambda, coef),
        t,
        title = "CF of a linear combination of EXPONENTIAL RVs")

## EXAMPLE 3
# PDF/CDF of the compound Binomial-Exponential distribution
n <- 25
p <- 0.3
coef <- 1 / (((1:50) - 0.5) * pi) ^ 2
lambda <- 5
cfX <- function(t)
        cf_Exponential(t, lambda, coef)
cf <- function(t)
        cfN_Binomial(t, n, p, cfX)
x <- seq(from = 0,
         to = 5,
         length.out = 101)
prob <- c(0.9, 0.95, 0.99)
options <- list()
options$isCompound <- TRUE
options$N <- 2 ^ 12
options$SixSigmaRule <- 15
result <- cf2DistGP(cf, x, prob, options)

gajdosandrej/CharFunToolR documentation built on June 3, 2024, 7:46 p.m.