Moments of the Davies distribution

Share:

Description

Moments of order statistics of random variables drawn from a Davies distribution

Usage

1
2
3
4
5
6
7
8
davies.moment(n=1 , i=1 , order=1 , params)
M(order,params)
mu(params)
expected.value(n,i,params)
expected.value.approx(n,i,params)
variance(params)
skewness(params)
kurtosis(params)

Arguments

params

A three-member vector holding C, lambda1 and lambda2

n

The number of observations

i

Return information about the i-th order statistic (ie i=1 means the smallest, i=n means the biggest)

order

The order (eg order=2 gives the square)

Details

Function davies.moment(n,i,order=r) gives the r-th moment of the i-th order statistic of n observations. The following aliases are just newbie wrappers with n=i=1 (ie moments of one observation from a Davies distribution):

  • M() gives the r-th moment for n=i=1

  • mu() gives the first moment of a Davies distribution (ie the mean)

  • variance() gives the second central moment of a Davies distribution

  • skewness() gives the normalized skewness of a Davies distribution

  • kurtosis() gives the normalized kurtosis of a Davies distribution

Author(s)

Robin K. S. Hankin

See Also

expected.value, expected.gld

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
params <- c(10,0.1,0.1)
davies.moment(n=100,i=99,2,params) # ie the second moment of the 99th smallest
                            # observation of 100 drawn from a Davies
                            # distribution with parameters p


mean(rdavies(1e6,params))-mu(params)

#now reproduce the S-K graph:

f <- function(x,y){c(skewness(c(1,x,y)),kurtosis(c(1,x,y)))}
g <- function(j,vector,pp,qq=1){points(t(sapply(vector,f,y=j)),type="l",col="black",lty=qq)}

vector <- c((0:300)/100 , (0:300)/10000 , seq(from=3,to=10,len=100))
vector <- sort(unique(vector))

plot(t(sapply((0:10)/10,f,y=0)),
       xlim=c(-3,3),ylim=c(0,10),
       type="n",xlab="skewness",ylab="kurtosis")
g(0.001,vector,"red",qq=1)
g(0.01,vector,"yellow",qq=2)
g(0.02,vector,"green",qq=3)
g(0.05,vector,"blue",qq=4)
g(0.1 ,vector,"purple",qq=5)
g(0.14,vector,"black",qq=6)

x <- seq(from=-3,to=3,len=30)
points(x,x^2+1,type="l",lwd=2)

leg.txt <- expression(lambda[2]==0.001,
        lambda[2]==0.01,lambda[2]==0.02,lambda[2]==0.05,
        lambda[2]==0.1,lambda[2]==0.14)
legend(-1.1,10,leg.txt,col="black",lty=1:6)