On the Goodness-of-Fit Tests for Some Continuous Time Processes

# On the Goodness-of-Fit Tests for Some Continuous Time Processes

Sergueï Dachian and Yury A. Kutoyants
Laboratoire de Mathématiques, Université Blaise Pascal
Laboratoire de Statistique et Processus, Université du Maine
###### Abstract

We present a review of several results concerning the construction of the Cramér-von Mises and Kolmogorov-Smirnov type goodness-of-fit tests for continuous time processes. As the models we take a stochastic differential equation with small noise, ergodic diffusion process, Poisson process and self-exciting point processes. For every model we propose the tests which provide the asymptotic size and discuss the behaviour of the power function under local alternatives. The results of numerical simulations of the tests are presented.

Keywords: Hypotheses testing, diffusion process, Poisson process, self-exciting process, goodness-of-fit tests

## 1 Introduction

The goodness-of-fit tests play an important role in the classical mathematical statistics. Particularly, the tests of Cramér-von Mises, Kolmogorov-Smirnov and Chi-Squared are well studied and allow to verify the correspondence of the mathematical models to the observed data (see, for example, Durbin (1973) or Greenwood and Nikulin (1996)). The similar problem, of course, exists for the continuous time stochastic processes. The diffusion and Poisson processes are widely used as mathematical models of many evolution processes in Biology, Medicine, Physics, Financial Mathematics and in many others fields. For example, some theory can propose a diffusion process

 dXt=S∗(Xt)dt+σdWt,X0,0≤t≤T

as an appropriate model for description of the real data and we can try to construct an algorithm to verify if this model corresponds well to these data. The model here is totally defined by the trend coefficient , which is supposed (if the theory is true) to be known. We do not discuss here the problem of verification if the process is Wiener. This problem is much more complicated and we suppose that the noise is white Gaussian. Therefore we have a basic hypothesis defined by the trend coefficient and we have to test this hypothesis against any other alternative. Any other means that the observations come from stochastic differential equation

 dXt=S(Xt)dt+σdWt,X0,0≤t≤T,

where . We propose some tests which are in some sense similar to the Cramér-von Mises and Kolmogorov-Smirnov tests. The advantage of classical tests is that they are distribution-free, i.e., the distribution of the underlying statistics do not depend on the basic model and this property allows to choose the universal thresholds, which can be used for all models.

For example, if we observe independent identically distributed random variables with distribution function and the basic hypothesis is simple : , then the Cramér-von Mises and Kolmogorov-Smirnov statistics are

respectively. Here

 ^Fn(x)=1nn∑j=11{Xj

is the empirical distribution function. Let us denote by a Brownian bridge, i.e., a continuous Gaussian process with

 EW0(s)=0,EW0(s)W0(t)=t∧s−st.

Then the limit behaviour of these statistics can be described with the help of this process as follows

 W2n⟹∫10W0(s)2ds,√nDn⟹sup0≤s≤1|W0(s)|.

Hence the corresponding Cramér-von Mises and Kolmogorov-Smirnov tests

 ψn(Xn)=1{W2n>cα},ϕn(Xn)=1{√nDn>dα}

with constants defined by the equations

are of asymptotic size . It is easy to see that these tests are distribution-free (the limit distributions do not depend of the function ) and are consistent against any fixed alternative (see, for example, Durbin (1973)).

It is interesting to study these tests for nondegenerate set of alternatives, i.e., for alternatives with limit power function less than 1. It can be realized on the close nonparametric alternatives of the special form making this problem asymptotically equivalent to the signal in Gaussian noise problem. Let us put

where the function describes the alternatives. We suppose that

 ∫10h(s)ds=0,∫10h(s)2ds<∞.

Then we have the following convergence (under fixed alternative, given by the function ):

 W2n⟹∫10[∫s0h(v)dv+W0(s)]2ds, √nDn⟹sup0≤s≤1∣∣∣∫s0h(v)dv+W0(s)∣∣∣

We see that this problem is asymptotically equivalent to the following signal in Gaussian noise problem:

 dYs=h∗(s)ds+dW0(s),0≤s≤1. (1)

Indeed, if we use the statistics

 W2=∫10Y2sds,D=sup0≤s≤1|Ys|

then under hypothesis and alternative the distributions of these statistics coincide with the limit distributions of and under hypothesis and alternative respectively.

Our goal is to see how such kind of tests can be constructed in the case of continuous time models of observation and particularly in the cases of some diffusion and point processes. We consider the diffusion processes with small noise, ergodic diffusion processes and Poisson process with Poisson and self-exciting alternatives. For the first two classes we just show how Cramér-von Mises and Kolmogorov-Smirnov - type tests can be realized using some known results and for the last models we discuss this problem in detail.

## 2 Diffusion process with small noise

Suppose that the observed process is the solution of the stochastic differential equation

 dXt=S(Xt)dt+εdWt,X0=x0,0≤t≤T, (2)

where is a Wiener process (see, for example, Liptser and Shiryayev (2001)). We assume that the function is two times continuously differentiable with bounded derivatives. These are not the minimal conditions for the results presented below, but this assumption simplifies the exposition. We are interested in the statistical inference for this model in the asymptotics of small noise : . The statistical estimation theory (parametric and nonparametric) was developed in Kutoyants (1994).

Recall that the stochastic process converges uniformly in to the deterministic function , which is a solution of the ordinary differential equation

 dxtdt=S(xt),x0,0≤t≤T. (3)

Suppose that the function for and consider the following problem of hypotheses testing

 H1:S(x)≠S∗(x),x0≤x≤x∗T

where we denoted by the solution of the equation (3) under hypothesis :

 x∗t=x0+∫t0S∗(x∗v)dv,0≤t≤T.

Hence, we have a simple hypothesis against the composite alternative.

The Cramér-von Mises and Kolmogorov-Smirnov type statistics for this model of observations can be

 W2ε =⎡⎣∫T0dtS∗(x∗t)2⎤⎦−2∫T0⎛⎝Xt−x∗tεS∗(x∗t)2⎞⎠2dt, Dε =⎡⎣∫T0dtS∗(x∗t)2⎤⎦−1/2sup0≤t≤T∣∣ ∣∣Xt−x∗tS∗(x∗t)∣∣ ∣∣.

It can be shown that these two statistics converge (as ) to the following functionals

 W2ε⟹∫10W(s)2ds,ε−1Dε⟹sup0≤s≤1|W(s)|,

where is a Wiener process (see Kutoyants 1994). Hence the corresponding tests

 ψε(Xε)=1{W2ε>cα},ϕε(Xε)=1{ε−1Dε>dα}

with the constants defined by the equations

 P{∫10W(s)2ds>cα}=α,P{sup0≤s≤1|W(s)|>dα}=α (4)

are of asymptotic size . Note that the choice of the thresholds and does not depend on the hypothesis (distribution-free). This situation is quite close to the classical case mentioned above.

It is easy to see that if , then and , . Hence these tests are consistent against any fixed alternative. It is possible to study the power function of this test for local (contiguous) alternatives of the following form

 dXt=S∗(Xt)dt+εh(Xt)S∗(Xt)dt+εdWt,0≤t≤T.

We describe the alternatives with the help of the (unknown) function . The case corresponds to the hypothesis . One special class of such nonparametric alternatives for this model was studied in Iacus and Kutoyants (2001).

Let us introduce the composite (nonparametric) alternative

 H1:h(⋅)∈Hρ,

where

 Hρ={h(⋅):∫xTx0h(x)2μ(dx)≥ρ}.

To choose alternative we have to precise the “natural for this problem” distance described by the measure and the rate of . We show that the choice

 μ(dx)=dxS∗(x)3

provides for the test statistic the following limit

 W2ε⟶∫10[∫s0h∗(v)dv+W(s)]2ds,

where we denoted

 h∗(s)=u1/2Th(x∗uTs),uT=∫T0dsS∗(x∗s)2

We see that this problem is asymptotically equivalent to the signal in white Gaussian noise problem:

 dYs=h∗(s)ds+dW(s),0≤s≤1, (5)

with the Wiener process . It is easy to see that even for fixed without further restrictions on the smoothness of the function the uniformly good testing is impossible. For example, if we put

then for the power function of the test we have

 infh(⋅)∈Hρβ(ψε,h)≤β(ψε,hn)⟶α.

The details can be found in Kutoyants (2006). The construction of the uniformly consistent tests requires a different approach (see Ingster and Suslina (2003)).

Note as well that if the diffusion process is

 dXt=S(Xt)dt+εσ(Xt)dWt,X0=x0,0≤t≤T,

then we can put

 W2ε=⎡⎣∫T0(σ(x∗t)S∗(x∗t))2dt⎤⎦−2∫T0⎛⎝Xt−x∗tεS∗(x∗t)2⎞⎠2dt

and have the same results as above (see Kutoyants (2006)).

## 3 Ergodic diffusion processes

Suppose that the observed process is one dimensional diffusion process

 dXt=S(Xt)dt+dWt,X0,0≤t≤T, (6)

where the trend coefficient satisfies the conditions of the existence and uniqueness of the solution of this equation and this solution has ergodic properties, i.e., there exists an invariant probability distribution , and for any integrable w.r.t. this distribution function the law of large numbers holds

 1T∫T0g(Xt)dt⟶∫∞−∞g(x)dFS(x).

These conditions can be found, for example, in Kutoyants (2004).

Recall that the invariant density function is defined by the equality

where is the normalising constant.

We consider two types of tests. The first one is a direct analogue of the classical Cramér-von Mises and Kolmogorov-Smirnov tests based on empirical distribution and density functions and the second follows the considered above (small noise) construction of tests.

The invariant distribution function and this density function can be estimated by the empirical distribution function and by the local time type estimator defined by the equalities

 ^FT(x)=1T∫T01{Xt

respectively. Note that both of them are unbiased:

 ES^FT(x)=FS(x),ES^fT(x)=fS(x),

 ηT(x) =−2√T∫T0FS(Xt∧x)−FS(Xt)FS(x)fS(Xt)dWt+o(1), ζT(x)

and are asymptotically normal (as )

 ηT(x)=√T(^FT(x)−FS(x)) ⟹N(0,dF(S,x)2), ζT(x)=√T(^fT(x)−fS(x)) ⟹N(0,df(S,x)2).

Let us fix a simple (basic) hypothesis

 H0:S(x)≡S∗(x).

Then to test this hypothesis we can use these estimators for construction of the Cramér-von Mises and Kolmogorov-Smirnov type test statistics

 W2T =T∫∞−∞[^FT(x)−FS∗(x)]2dFS∗(x), DT =supx∣∣^FT(x)−FS∗(x)∣∣

and

 V2T =T∫∞−∞[^fT(x)−fS∗(x)]2dFS∗(x), dT =supx∣∣^fT(x)−fS∗(x)∣∣

respectively. Unfortunately, all these statistics are not distribution-free even asymptotically and the choice of the corresponding thresholds for the tests is much more complicated. Indeed, it was shown that the random functions and converge in the space (of continuous functions decreasing to zero at infinity) to the zero mean Gaussian processes and respectively with the covariance functions (we omit the index of functions and below)

 RF(x,y) =ES∗[η(x)η(y)] =4ES∗([F(ξ∧x)−F(ξ)F(x)][F(ξ∧y)−F(ξ)F(y)]f(ξ)2) Rf(x,y) =ES∗[ζ(x)ζ(y)] =4f(x)f(y)ES∗([1{ξ>x}−F(ξ)][1{ξ>y}−F(ξ)]f(ξ)2).

Here is a random variable with the distribution function . Of course,

 dF(S,x)2=ES[η(x)2],df(S,x)2=ES[ζ(x)2].

Using this weak convergence it is shown that these statistics converge in distribution (under hypothesis) to the following limits (as )

 V2T⟹∫∞−∞ζ(x)2dFS∗(x),T1/2dT⟹supx|ζ(x)|.

The conditions and the proofs of all these properties can be found in Kutoyants (2004), where essentially different statistical problems were studied, but the calculus are quite close to what we need here.

Note that the Kolmogorov-Smirnov test for ergodic diffusion was studied in Fournie (1992) (see as well Fournie and Kutoyants (1993) for further details), and the weak convergence of the process was obtained in Negri (1998).

The Cramér-von Mises and Kolmogorov-Smirnov type tests based on these statistics are

 ΨT(XT) =1{W2T>Cα},ΦT(XT)=1{T1/2DT>Dα}, ψT(XT) =1{V2T>cα},ϕT(XT)=1{T1/2dT>dα}

with appropriate constants.

The contiguous alternatives can be introduced by the following way

 S(x)=S∗(x)+h(x)√T.

Then we obtain for the Cramér-von Mises statistics the limits (see, Kutoyants (2004))

 V2T⟹∫∞−∞[2fS∗(x)ES∗∫xξh(s)ds+ζ(x)]2dFS∗(x).

Note that the transformation simplifies the writing, because the diffusion process satisfies the differential equation

 dYt=fS∗(Xt)[2S∗(Xt)dt+dWt],Y0=FS∗(X0)

with reflecting bounds in 0 and 1 and (under hypothesis) has uniform on invariant distribution. Therefore,

 W2T⟹∫10V(s)2ds,T1/2DT⟹sup0≤s≤1|V(s)|,

but the covariance structure of the Gaussian process can be quite complicated.

To obtain asymptotically distribution-free Cramér-von Mises type test we can use another statistic, which is similar to that of the preceding section. Let us introduce

 ~W2T=1T2∫T0[Xt−X0−∫t0S∗(Xv)dv]2dt.

Then we have immediately (under hypothesis)

 ~W2T=1T2∫T0W2tdt=∫10W(s)2ds,

where we put and . Under alternative we have

 ~W2T =1T2∫T0[Wt+1√T∫t0h(Xv)dv]2dt =1T∫T0[Wt√T+tT1t∫t0h(Xv)dv]2dt.

The stochastic process is ergodic, hence

 1t∫t0h(Xv)dv⟶ES∗h(ξ)=∫∞−∞h(x)fS∗(x)dx≡ρh

as . It can be shown (see section 2.3 in Kutoyants (2004), where we have the similar calculus in another problem) that

 ~W2T⟹∫10[ρhs+W(s)]2ds.

Therefore the power function of the test converges to the function

 βψ(ρh)=P(∫10[ρhs+W(s)]2ds>cα).

Using standard calculus we can show that for the corresponding Kolmogorov-Smirnov type test the limit will be

 βϕ(ρh)=P(sup0≤s≤1|ρhs+W(s)|>cα).

These two limit power functions are the same as in the next section devoted to self-exciting alternatives of the Poisson process. We calculate these functions with the help of simulations in Section 5 below.

Note that if the diffusion process is

 dXt=S(Xt)dt+σ(Xt)dWt,X0,0≤t≤T,

but the functions and are such that the process is ergodic then we introduce the statistics

Here is random variable with the invariant density function

 fS∗(x)=1G(S∗)σ(x)2exp{2∫x0S∗(y)σ(y)2dy}.

This statistic under hypothesis is equal to

 ^W2T =1T2ES∗[σ(ξ)2]∫T0[∫t0σ(Xv)dWv]2dt =1TES∗[σ(ξ)2]∫T0[1√T∫t0σ(Xv)dWv]2dt.

The stochastic integral by the central limit theorem is asymptotically normal

 ηt=1√tES∗[σ(ξ)2]∫t0σ(Xv)dWv⟹N(0,1)

and moreover it can be shown that the vector of such integrals converges in distribution to the Wiener process

 (ηs1T,…,ηskT)⟹(W(s1),…,W(sk))

for any finite collection of . Therefore, under mild regularity conditions it can be proved that

 ^W2T⟹∫10W(s)2ds.

The power function has the same limit,

 βψ(ρh)=P(∫10[ρhs+W(s)]2ds>cα).

but with

 ρh=ES∗h(ξ)√ES∗[σ(ξ)2].

The similar consideration can be done for the Kolmogorov-Smirnov type test too.

We see that both tests can not distinguish the alternatives with such that . Note that for ergodic processes usually we have and with corresponding random variables , but this does not imply .

## 4 Poisson and self-exciting processes

Poisson process is one of the simplest point processes and before taking any other model it is useful first of all to check the hypothesis the observed sequence of events, say, corresponds to a Poisson process. It is natural in many problems to suppose that this Poisson process is periodic of known period. For example, many daily events, signal transmission in optical communication, season variations etc. Another model of point processes as well frequently used is self-exciting stationary point process introduced in Hawkes (1972). As any stationary process it can as well describe the periodic changes due to the particular form of its spectral density.

Recall that for the Poisson process of intensity function we have ( is the counting process)

 P{Xt−Xs=k}=(k!)−1(Λ(t)−Λ(s))kexp{Λ(s)−Λ(t)},

where we suppose that and put

 Λ(t)=∫t0S(v)dv.

The self-exciting process admits the representation

 Xt=∫t0S(s,X)ds+πt,

where is local martingale and the intensity function

 S(t,X)=S+∫t0g(t−s)dXs=S+∑ti

It is supposed that

 ρ=∫∞0g(t)dt<1.

Under this condition the self-exciting process is a stationary point process with the rate

 μ=S1−ρ

and the spectral density

 f(λ)=μ2π|1−G(λ)|2,G(λ)=∫∞0eiλtg(t)dt

(see Hawkes (1972) or Daley and Vere-Jones (2003) for details).

We consider two problems: Poisson against another Poisson and Poisson against a close self-exciting point process. The first one is to test the simple (basic) hypothesis

 H0:S(t)≡S∗(t),t≥0

where is known periodic function of period , against the composite alternative

 H1:S(t)≠S∗(t),t≥0,

but is always -periodic.

Let us denote , , suppose that and put

 ^Λn(t)=1nn∑j=1Xj(t).

The corresponding goodness-of-fit tests of Cramér-von Mises and Kolmogorov-Smirnov type can be based on the statistics

 Dn=Λ∗(τ)−1/2sup0≤t≤τ∣∣^Λn(t)−Λ∗(t)∣∣.

It can be shown that

 W2n⟹∫10W(s)2ds,√nDn⟹sup0≤s≤1|W(s)|

where is a Wiener process (see Kutoyants (1998)). Hence these statistics are asymptotically distribution-free and the tests

 ψn(XT)=1{W2n>cα},ϕn(XT)=1{√nDn>dα}

with the constants taken from the equations (4), are of asymptotic size .

Let us describe the close contiguous alternatives which reduce asymptotically this problem to signal in white Gaussian noise model (5). We put

 Λ(t)=Λ∗(t)+1√nΛ∗(τ)∫t0h(u(v))dΛ∗(v),u(v)=Λ∗(v)Λ∗(τ).

Here is an arbitrary function defining the alternative. Then if satisfies this equality we have the convergence

 W2n⟹∫10[∫s0h(v)dv+W(s)]2ds.

This convergence describes the power function of the Cramér-von Mises type test under these alternatives.

The second problem is to test the hypothesis

 H0:S(t)=S∗,t≥0

against nonparametric close (contiguous) alternative

 H1:S(t)=S∗+1√T∫t0h(t−s)dXt,t≥0,

We consider the alternatives with the functions having compact support and bounded.

We have and for some fixed we can construct the same statistics

 W2n=nS∗τ2∫τ0[^Λn(t)−S∗t]2dt,Dn=(S∗τ)−1/2sup0≤t≤τ∣∣^Λn(t)−S∗t∣∣.

Of course, they have the same limits under hypothesis

 W2n⟹∫10W(s)2ds,√nDn⟹sup0≤s≤1|W(s)|.

To describe their behaviour under any fixed alternative we have to find the limit distribution of the vector

 wn=(wn(t1),…,wn(tk)),wn(tl)=1√S∗τnn∑j=1[Xj(tl)−S∗tl],

where . We know that this vector under hypothesis is asymptotically normal

 L0{wn}⟹N(0,R)

with covariance matrix

 R=(Rlm)k×k,Rlm=τ−1min(tl,tm).

Moreover, it was shown in Dachian and Kutoyants (2006) that for such alternatives the likelihood ratio is locally asymptotically normal, i.e., the likelihood ratio admits the representation

 Zn(h)=exp{Δn(h,Xn)−12I(h)+rn(h,Xn)}

where

 Δn(h,Xn)=1S∗√τn∫τn0∫t−0h(t−s)dXs[dXt−S∗dt], I(h)=∫∞0h(t)2dt+S∗(∫∞0h(t)dt)2

and

 Δn(h,Xn)⟹N(0,I(h)),rn(h,Xn)→0. (7)

To use the Third Le Cam’s Lemma we describe the limit behaviour of the vector . For the covariance of this vector we have

Further, let us denote and , then we can write

 Q0l=E0[Δn(h,Xn)wn(tl)] =1nS3/2∗τE0(n∑j=1∫τjτ(j−1)H(t)dπtn∑i=1∫τ(i−1)+tlτ(i−1)dπt) =1nτ√S∗n∑j=1∫τ(j−1)+tlτ(j−1)E0H(t)dt=tlτ√S∗∫∞0h(t)dt(1+o(1)),

because

 E0H(t)=S∗∫t−0h(t−s)ds=S∗∫∞0h(s)ds

for the large values of (such that covers the support of ).

Therefore, if we denote

 ¯h=∫∞0h(s)ds

then

 Q0l=Ql0=tlτ√S∗¯h.

The proof of the Theorem 1 in Dachian and Kutoyants (2006) can be applied to the linear combination of and and this yields the asymptotic normality

 L0(Δn(h,Xn),wn)⟹N(0,Q).

Hence by the Third Lemma of Le Cam we obtain the asymptotic normality of the vector

 Lh(wn)⟹L(W(s1)+s1√S∗¯h,…,W(sk)+sk√S∗¯h),

where we put . This weak convergence together with the estimates like

 Eh|wn(t1)−wn(t2)|2≤C|t1−t2|

provides the convergence (under alternative)

 W2n⟹∫10[√S∗