cf_WignerSemicircle: Characteristic function of a linear combination (resp....

View source: R/cf_WignerSemicircle.R

cf_WignerSemicircleR Documentation

Characteristic function of a linear combination (resp. convolution) of independent WIGNER SEMICIRCLE random variables defined on the interval (mu-R,mu+R).

Description

That is, cf_WignerSemicircle(t,mu,R,coef,niid) evaluates the characteristic function cf(t) of Y = sum_{i=1}^N coef_i * X_i, where X_i ~ WignerSemicircle are independent RVs defined on (mu_i-R_i,mu_i+R_i), for all i = 1,...,N.

The characteristic function of X ~ WignerSemicircle(mu,R) is defined by cf(t) = 2*exp(1i*t*mu).*besselj(1,R*t)/(R*t);

@family Continuous Probability Distribution

@seealso For more details see WIKIPEDIA: https://en.wikipedia.org/wiki/Wigner_semicircle_distribution.

Usage

cf_WignerSemicircle(t, mu, R, coef, niid)

Arguments

t

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

mu

vector of the 'location' parameters mu in R. If empty, default value is mu = 0.

R

vector of the 'radius' prameters R > 0. If empty, default value is R =1.

coef

vector of the coefficients of the linear combination of the Beta distributed 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) * 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 (res. convolution) of independent WIGNER SEMICIRCLE random variables.

Note

Ver.: 10-Aug-2021 17:44:17 (consistent with Matlab CharFunTool v1.5.1, 18-Sep-2018 00:32:58).

Examples

## EXAMPLE 1
# CF of the symmetric Wigner Semicircle distribution on (-1,1)
t <- seq(from = -30,
         to = 30,
         length.out =501)
plotReIm(function(t)
        cf_WignerSemicircle(t),
        t,
        title = "CF of the Wigner Semicircle distribution on (-1,1)")



##EXAMPLE2
# PDF/CDF of Wigner Semicircle  RVs
cf <- function(t)
        cf_WignerSemicircle(t)
x <- seq(-1,1,length.out = 201)
prob <- c(0.9, 0.95, 0.99)
options <- list()
options$xMin <- -1
options$xMax <- 1
result <- cf2DistGP(cf, x, prob, options)

##EXAMPLE3
# CF of a linear combination of independent Wigner Semicircle RVs
t <- seq(-1,1, length.out=  501)
mu <- c(0, 1, 2, 1, 0)
R <- c(1, 1, 2, 2, 3)
coef <- c(1, 2, 3, 4, 5 )
plotReIm(function(t)
        cf_WignerSemicircle(t, mu, R, coef),
        t,
        title = "CF of a linear combination of independent Wigner Semicircle RVs")

## EXAMPLE 4
# PDF/CDF of a linear combination of independent Wigner Semicircle RVs
mu <- c(0, 1, 2, 1, 0)
R <- c(1, 1, 2, 2, 3)
coef <- c(1, 2, 3, 4, 5)
cf <- function(t)
        cf_WignerSemicircle(t, mu, R, coef)
x <- seq(-20, 40, length.out = 201)
prob <- c(0.9, 0.95, 0.99)
options <- list()
options$N = 2^12
result <- cf2DistGP(cf, x, prob, options)

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