cfN_PolyaEggenberger: Characteristic function of Polya-Eggenberger

Description Usage Arguments Value See Also Examples

Description

cfN_PolyaEggenberger(t, a, b, m) evaluates the characteristic function cf(t) of the Polya-Eggenberger distribution with the parameters a (a real), b (b real), and m (m integer), i.e. cfN_PolyaEggenberger(t, a, b, m) = 2F1(-m,a,a+b,1-e^(1i*t)) where 2F1 denotes the Gauss hypergeometric function.

cfN_PolyaEggenberger(t, a, b, m) evaluates the compound characteristic function cf(t) = cfN_PolyaEggenberge(-1i*log(cfX(t)), a, b, m), where cfX is function handle of the characteristic function cfX(t) of a continuous distribution and/or random variable X.

Note that such CF is characteristic function of the compound distribution, i.e. distribution of the random variable Y = X_1 + ... + X_N, where X_i ~ F_X are i.i.d. random variables with common CF cfX(t), and N ~ F_N is independent RV with its CF given by cfN(t).

Usage

1
cfN_PolyaEggenberger(t, a, b, m, cfX)

Arguments

t

numerical values (number, vector...)

a

real number

b

real number

m

integer

cfX

function

Value

characteristic function cf(t) of the Polya-Eggenberger distribution

See Also

Other Discrete Probability Distribution: cfN_Binomial, cfN_Delaporte, cfN_GeneralizedPoisson, cfN_Geometric, cfN_Logarithmic, cfN_NegativeBinomial, cfN_Poisson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
## EXAMPLE1 (CF of the Polya-Eggenberger distribution with a = 2.2, b = 3.3, m = 4)
a <- 2.2
b <- 3.3
m <- 4
t <- seq(-15, 15, length.out = 1001)
plotGraf(function(t)
  cfN_PolyaEggenberger(t, a, b, m), t,
  title = "CF of the Polya-Eggenberger distribution with a = 2.2, b = 3.3, m = 4")

#' ## EXAMPLE2 (CF of the compound Polya-Eggenberger-Exponential distribution)
a <- 2.2
b <- 3.3
m <- 4
lambda <- 5
cfX <- function(t)
  cfX_Exponential(t, lambda)
t <- seq(-50, 50, length.out = 501)
plotGraf(function(t)
  cfN_PolyaEggenberger(t, a, b, m, cfX), t,
  title = "CF of the compound Polya-Eggenberger-Exponential distribution")

## EXAMPLE3 (PDF/CDF of the compound Polya-Eggenberger-Exponential distribution)
a <- 2.2
b <- 3.3
m <- 4
lambda <- 5
cfX <- function(t)
  cfX_Exponential(t, lambda)
cf <- function(t)
  cfN_PolyaEggenberger(t, a, b, m, cfX)
x <- seq(0, 2.5, length.out = 101)
prob <- c(0.9, 0.95, 0.99)
result <- cf2DistGP(cf, x, prob, isCompound = TRUE)

Simkova/CharFun documentation built on May 9, 2019, 1:30 p.m.