cfX_ChiSquared: Characteristic function of Noncentral Chi-Squared...

Description Usage Arguments Value See Also Examples

Description

cfX_ChiSquared(t, df, ncp = 0) evaluates the characteristic function cf(t) of the Chi-Squared distribution with the parameter df (degrees of freedom, df > 0) and npc (non-centrality, npc ≥ 0), i.e.

cfX_ChiSquared(t, df, npc) = exp((i*npc*t)/(1 - 2it)) / (1 - 2it)^(df/2)

Usage

1
cfX_ChiSquared(t, df, npc = 0)

Arguments

t

numerical values (number, vector...)

df

degrees of freedom

npc

non-centrality parameter, default value = 0

Value

characteristic function cf(t) of the CHI-SUQARED distribution

See Also

For more details see WIKIPEDIA: https://en.wikipedia.org/wiki/Noncentral_chi-squared_distribution

Other Continuous Probability distribution: cfS_Arcsine, cfS_Beta, cfS_Gaussian, cfS_Rectangular, cfS_StudentT, cfS_Trapezoidal, cfS_Triangular, cfX_Beta, cfX_Exponential, cfX_Gamma, cfX_InverseGamma, cfX_LogNormal, cfX_Normal, cfX_PearsonV, cfX_Rectangular, cfX_Triangular

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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
## EXAMPLE1 (CF of the ChiSquared distribution with df = 1)
df <- 1
t <- seq(-50, 50, length.out = 501)
plotGraf(function(t)
  cfX_ChiSquared(t, df), t, title = "CF of the Chi-squared distribution with df = 1")

## EXAMPLE2 (PDF/CDF of the ChiSquared distribution with df = 3)
df <- 3
prob <- c(0.9, 0.95, 0.99)
cf <- function(t)
  cfX_ChiSquared(t, df)
x <- seq(-0, 15, length.out = 101)
result <- cf2DistGP(cf,
                    x,
                    prob,
                    xMin = 0,
                    xMax = 22,
                    N = 2 ^ 14)

## EXAMPLE3 (PDF/CDF of the compound Binomial-ChiSquared distribution)
n <- 25
p <- 0.3
df <- 3
prob <- c(0.9, 0.95, 0.99)
cfX <- function(t)
  cfX_ChiSquared(t, df)
cf <- function(t)
  cfN_Binomial(t, n, p, cfX)
x <- seq(-0, 80, length.out = 501)
result <- cf2DistGP(cf, x, prob, isCompound = TRUE)

## EXAMPLE4 (CF of the ChiSquared distribution with df = 1, npc = 2)
df <- 1
npc <- 2
t <- seq(-50, 50, length.out = 501)
plotGraf(function(t)
  cfX_ChiSquared(t, df, npc), t, title = "CF of the Chi-squared distribution with df = 1, npc = 2")

## EXAMPLE5 (PDF/CDF of the ChiSquared distribution with df = 3, npc = 2)
df <- 3
npc <- 2
prob <- c(0.9, 0.95, 0.99)
cf <- function(t)
  cfX_ChiSquared(t, df, npc)
x <- seq(-0, 15, length.out = 101)
result <- cf2DistGP(cf, x, prob, N = 2 ^ 14)

## EXAMPLE6 (PDF/CDF of the compound Binomial-ChiSquared distribution)
n <- 25
p <- 0.3
df <- 3
npc <- 2
prob <- c(0.9, 0.95, 0.99)
cfX <- function(t)
  cfX_ChiSquared(t, df, npc)
cf <- function(t)
  cfN_Binomial(t, n, p, cfX)
x <- seq(-0, 80, length.out = 501)
result <- cf2DistGP(cf, x, prob, isCompound = TRUE)

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