Binned goodness-of-fit tests based on the empirical characteristic function

Binned goodness-of-fit tests based on the empirical characteristic function

ARTICLE IN PRESS Statistics & Probability Letters 69 (2004) 305–314 Binned goodness-of-fit tests based on the empirical characteristic function S. Me...

220KB Sizes 1 Downloads 39 Views

ARTICLE IN PRESS

Statistics & Probability Letters 69 (2004) 305–314

Binned goodness-of-fit tests based on the empirical characteristic function S. Meintanisa, N.G. Ushakovb,* a b

Department of Economics, National and Kapodistrian University of Athens, 8 Pesmazoglou Street, 105 59 Athens, Greece Department of Mathematical Sciences, Norwegian University of Science and Technology, N-7491 Trondheim, Norway Received 6 March 2004; received in revised form 4 April 2004 Available online 6 July 2004

Abstract Goodness-of-fit tests based on the empirical characteristic function are studied when data are given in prebinned form. Conditions are obtained under which the limiting distribution of a binned test statistic coincides with that of the corresponding ordinary test statistic. Using a simulation experiment, we demonstrate that binned tests do not essentially lose in power compared with ordinary tests, while at the same time are computationally less demanding. r 2004 Elsevier B.V. All rights reserved. Keywords: Binning; Empirical characteristic function; Goodness-of-fit tests; Test for normality

1. Introduction Binning (prebinning the data on an equally spaced mesh) is a recently developed technique for reduction of computational expenses in some statistical problems, mainly in non-parametric density estimation, and in kernel estimation in particular; see Silverman (1982), Scott (1985), H.ardle and Scott (1992), Fan and Marron (1994), Wand (1994), Hall and Wand (1996), Minnotte . (2000). Binned statistical procedures are also appropriate in the common (1998), and Holmstrom situation when the data are available only in a discretised form. Let X1 ; y; Xn be independent copies on a random variable X : Suppose that some characteristic (a parameter or a function) of the distribution of X is estimated. The idea of binning consists in replacing the original observations X1 ; y; Xn by the prebinned data: each observed data value Xj is distributed (with some weights, possibly negative) among grid points gk ¼ kd; k ¼ 0; *Corresponding author. E-mail address: [email protected] (N.G. Ushakov). 0167-7152/$ - see front matter r 2004 Elsevier B.V. All rights reserved. doi:10.1016/j.spl.2004.06.024

ARTICLE IN PRESS S. Meintanis, N.G. Ushakov / Statistics & Probability Letters 69 (2004) 305–314

306

71; 72; y; d > 0 on an equally spaced mesh. The ordinary estimator is then replaced by a binned estimator which usually has the same form as the ordinary one but is based on the binned data. It turns out that the resulting (binned) estimator often does not lose much in accuracy to the original one, while it allows for saving computational expenses. The same idea of prebinning the data can be applied to other statistical problems where either direct operation with the original sample leads to high computational expenses or when data are available only in a discretized form. In particular, this includes non-parametric hypotheses testing when for calculation of a test statistic, one needs to compute a certain function for each individual data point. Such an example is a test statistic which is based on the empirical characteristic function. In this work, we study goodness-of-fit tests based on the empirical characteristic function when prebinned data are used. We study the limiting null distribution of some binned test statistics and, using a simulation experiment, demonstrate that tests based on the binned empirical characteristic function do not essentially lose in power compared with tests based on the ordinary empirical characteristic function.

2. The binned empirical characteristic function Let X1 ; y; Xn be a random sample (independent and identically distributed random variables) from a distribution function F ðxÞ: Denote the characteristic function (cf) of Xj and empirical characteristic function (ecf) of the sample by f ðtÞ and fn ðtÞ; respectively, Z N n 1X f ðtÞ ¼ eitx dFðxÞ; fn ðtÞ ¼ eitXj : n j¼1 N Given a bin width d > 0 and bin origin x0 AR; the binned empirical characteristic function (becf) is defined as 1X Nk eiðx0 þkdÞt ; f*n ðt; dÞ ¼ n kAZ where Nk ; k ¼ 0; 71; y;—the grid counts—are defined as in case of binned kernel estimators (see for example Hall and Wand, 1996, for details). In the simplest case n X Nk ¼ Ifx0 þkdd=2oXj px0 þkdþd=2g ; j¼1

where IA is the indicator function of an event A: This binning rule is called simple binning. So, simple binning consists in replacing each data point of the original sample by the nearest grid point of the grid x0 þ kd; k ¼ 0; 71; 72; y: In this work, we consider only simple binning. In addition, for the sake of clarity, we assume below without loss of generality that x0 ¼ 0: Thus, in what follows the becf is written as

f*n ðt; dÞ ¼

X kAZ

ikdt

e

! n 1X Ifkdd=2oXj pkdþd=2g : n j¼1

ARTICLE IN PRESS S. Meintanis, N.G. Ushakov / Statistics & Probability Letters 69 (2004) 305–314

307

Lemma 1. For all real t djtj jf*n ðt; dÞ  fn ðtÞjp : 2 Proof. Denote by Kj the number Xj =d  12 if the latter is an integer and the number ½Xj =d  12 þ 1 otherwise (here ½ denotes the integer part of a number). Then, X* j ¼ Kj d is the nearest to Xj grid point. It is easy to see that the becf is represented in the form n X * * dÞ ¼ 1 eitXj : fðt; n j¼1 Therefore, since jXj  X* j jpd=2; and using the well-known inequality jeix  eiy jpjx  yj; we obtain n 1X djtj * jeitXj  eitXj jpjXj  X* j j jtjp : jfn ðtÞ  f*n ðt; dÞjp n j¼1 2

&

3. Test statistics and their limit distributions Let X1 ; y; Xn be a random sample from a location-scale family with parameters a and b and characteristic function cðt; a; bÞ: Suppose that a# and b# are some consistent estimators of the parameters a and b: Put Yj ¼

Xj  a# b#

P and consider the ecf of the normalized data: cn ðtÞ ¼ n1 nj¼1 eitYj : The most frequently used goodness-of-fit test statistics based on the ecf, admit the representation Z N jcn ðtÞ  cðt; 0; 1Þj2 wðtÞ dt; ð1Þ Tn ¼ n N

where wðtÞ is a weight function (see Epps and Pulley, 1983; Baringhaus and Henze, 1988; Baringhaus et al., 1988; Henze, 1990; Gurtler . and Henze, 2000; Meintanis, 2004). Sometimes, statistics of the form pffiffiffi ð2Þ Dn ¼ n sup jcn ðtÞ  cðt; 0; 1Þj; jtjpt

+ 1986). Our first goal is to study how . o, where t is a constant, are also used (see for example Csorg binning affects the limiting distributions of test statistics (1) and (2). Specifically, we find conditions under which the limiting null distributions of Dn and Tn coincide with those of their binned counterparts.

ARTICLE IN PRESS S. Meintanis, N.G. Ushakov / Statistics & Probability Letters 69 (2004) 305–314

308

Let Ddn and Tnd be binned versions of statistics (1) and (2), i.e. statistics which result from Dn and * n ðt; dÞ: Thus, Tn when the ecf cn ðtÞ is replaced by the becf c Z N Tnd ¼ n jc* n ðt; dÞ  cðt; 0; 1Þj2 wðtÞ dt N

and Ddn ¼

pffiffiffi * n ðt; dÞ  cðt; 0; 1Þj: n sup jc jtjpt

We prove now that if ! 1 d ¼ o pffiffiffi ; n-N; n

ð3Þ

then, the limiting null distributions of test statistics Ddn and Tnd coincide with those of the statistics Dn and Tn (for the latter, provided that the weight function has a finite second moment). Consider first Dn and Ddn : We have * n ðt; dÞ  c ðtÞj2 þ jc ðtÞ  cðt; 0; 1Þj2 jc* n ðt; dÞ  cðt; 0; 1Þj2 ¼ jc n n * þ ðcn ðt; dÞ  c ðtÞÞðc ðtÞ  cðt; 0; 1ÞÞ n

n

* n ðt; dÞ  c ðtÞÞðc ðtÞ  cðt; 0; 1ÞÞ þ ðc n n

ð4Þ

and therefore       sup jc* n ðt; dÞ  cðt; 0; 1Þj2  sup jcn ðtÞ  cðt; 0; 1Þj2   jtjpt jtjpt * n ðt; dÞ  c ðtÞj2 þ 2 sup jc * n ðt; dÞ  c ðtÞj sup jc ðtÞ  cðt; 0; 1Þj p sup jc n n n jtjpt

jtjpt

or * n ðt; dÞ  c ðtÞj2 þ 2 jðDdn Þ2  ðDn Þ2 jpn sup jc n jtjpt

jtjpt

pffiffiffi * n ðt; dÞ  c ðtÞj Dn : n sup jc n jtjpt

Using Lemma 1, we finally obtain pffiffiffi t2 jðDdn Þ2  ðDn Þ2 jp d2 n þ td nDn : 4

ð5Þ

If (3) is satisfied, then the first summand in the right-hand side of this inequality converges to 0 as n-N; and the second summand converges in probability to 0 under the null. Hence, under the null hypothesis, P

ðDdn Þ2  ðDn Þ2 ! 0;

n-N:

This implies that if the limiting distribution of Dn exists, then the limiting distribution of Ddn also exists and these two distributions coincide.

ARTICLE IN PRESS S. Meintanis, N.G. Ushakov / Statistics & Probability Letters 69 (2004) 305–314

309

Consider now the statistics Tn and Tnd : Assume that the weight function wðtÞ is a non-negative integrable function with a finite second moment: Z N t2 wðtÞ ¼ boN: N

Using (4) again, we obtain Tnd ¼ Tn þ Wn þ Un þ U% n ;

ð6Þ

where Tn is defined by (1), and Z N * n ðt; dÞ  c ðtÞj2 wðtÞ dt; Wn ¼ n jc n N

Un ¼ n

Z

N N

ðc* n ðt; dÞ  cn ðtÞÞðcn ðtÞ  cðt; 0; 1ÞÞwðtÞ dt:

For Wn ; we have due to Lemma 1 Z N d2 d2 n 2 t wðtÞ dt ¼ b: jWn jp n 4 4 N

ð7Þ

Also, using Lemma 1 and the Schwarz inequality, we obtain Z N * n ðt; dÞ  c ðtÞjwðtÞ dt jUn jp n jcn ðtÞ  cðt; 0; 1Þj jc n N Z N nd p jc ðtÞ  cðt; 0; 1Þj jtj wðtÞ dt 2 N n pffiffiffi Z N

1=2 Z N

1=2 pffiffiffi b pffiffiffiffiffiffi nd 2 2 p Tn jcn ðtÞ  cðt; 0; 1Þj wðtÞ dt t wðtÞ dt ¼d n 2 2 N N

ð8Þ

and pffiffiffi jU% n jpd n

pffiffiffi b pffiffiffiffiffiffi Tn : 2

ð9Þ

From (6)–(9), we obtain pffiffiffipffiffiffipffiffiffiffiffiffi b jTnd  Tn jpd2 n þ d n b Tn : 4 P

This implies that if (3) is satisfied, then Tnd  Tn ! 0; n-N; and therefore the limiting null distribution of Tnd coincides with that of Tn (provided that the latter exists). When the null distribution is normal, Cauchy or Laplace, some results concerning the limiting . distribution of Tn and Dn can be found in Baringhaus and Henze (1988), Henze (1990), Gurtler and Henze (2000), and Meintanis (2004); see also Ushakov (1999).

ARTICLE IN PRESS S. Meintanis, N.G. Ushakov / Statistics & Probability Letters 69 (2004) 305–314

310

4. Consistency and asymptotic power of tests Now we show that under the condition ! 1 d ¼ O pffiffiffi ; n-N; n

ð10Þ

consistency of a test based on the statistic Tn or Dn implies consistency of the corresponding binned test. Consider first the statistics Tn and Tnd : Suppose that for some fixed alternative, the test based on Tn is consistent, i.e. under this alternative, P

Tn ! N;

ð11Þ

n-N:

From (6)–(9), we have pffiffiffipffiffiffipffiffiffiffiffiffi d2 nb  d n b Tn 4 pffiffiffiffiffiffi pffiffiffiffiffiffi pffiffiffipffiffiffi 2 b ¼ Tn ð Tn  d n bÞ  d n ; 4 pffiffiffiffiffiffi P pffiffiffipffiffiffi where Tn ! N; n-N due to (11), and d n b and d2 nb=4 are bounded due to condition (10) (we assume that this condition is satisfied). Thus, Tnd X Tn  jWn j  2jUn jXTn 

P

Tnd ! N;

n-N;

i.e. the test which is based on Tnd is also consistent (for the considered alternative). Consider now statistics Dn and Ddn : Suppose that for a certain alternative, P

Dn ! N;

ð12Þ

n-N:

From inequality (5), we obtain pffiffiffi t 2 d2 n : ðDdn Þ2 XDn ðDn  td nÞ  4 The right-hand side of this inequality converges in probability to N because of (10) and (12). Therefore, P

Ddn ! N;

n-N:

Of course, everywhere in this section, convergence in probability may be replaced by almost sure convergence (as well as by many other types of convergence). In concluding this section we make some general remarks concerning the asymptotic power of the tests under consideration. In Section 3, we showed that the statistics Tn and Tnd have a common limit null distribution. This means that the critical regions of the Tn  and Tnd tests, corresponding to the same significance level a; coincide. Let ca be the quantile of order 1  a of the limit null distribution of Tn and Tnd : Then, lim PðTn Xca jH0 Þ ¼ lim PðTnd Xca jH0 Þ ¼ a:

n-N

n-N

ARTICLE IN PRESS S. Meintanis, N.G. Ushakov / Statistics & Probability Letters 69 (2004) 305–314

311

Let us fix an arbitrary significance level a and consider an arbitrary non-degenerate alternative FAH1 : Denote the power of the Tn  and Tnd tests by bðF Þ and b0 ðFÞ; respectively: b0 ðFÞ ¼ PðTnd Xca jF AH1 Þ:

bðF Þ ¼ PðTn Xca jF AH1 Þ;

Suppose the alternative F is such that Tn test is consistent for this alternative, i.e. bðF Þ-1; n-N: Then, as we have proved, b0 ðF Þ-1: It follows from (6)–(9) that if condition (10) is satisfied then P

P

Wn =Tn ! 0 and jUn j=Tn ! 0 as n-N; therefore Tnd Wn 2Re Un P ¼1þ þ ! 1; Tn Tn Tn

n-N:

This means that with the exception of cases when distributions of Tn and Tnd have a very irregular shape, the following relation holds: 1  bðF Þ -1; n-N; 1  b0 ðFÞ i.e. the power of Tn  and Tnd tests converges to 1 with the same speed. In other words, these two tests are asymptotically equivalent, for each distribution F such that Tn is consistent against F : If Dn is consistent against F ; the same is true for Dn and Ddn because, due (5) pffiffiffi   d2  t2 d2 n td n ðDn Þ   ðD Þ2  1p4ðD Þ2 þ D ; n

n

n

which provided that condition (10) is satisfied, implies Ddn P ! 1; Dn

n-N:

5. Simulation It seems to be hopeless to make a rigorous theoretical comparison of the power of the tests based on statistics Tn and Dn with their binned counterparts (especially for finite values of the sample size n). Therefore, we use a simulation experiment with samples from the following distributions: Logistic, Laplace, Cauchy, uniform, triangular, Student’s t; stable and Tukey’s. For the last two distributions (stable(a; b) and Tukey(g; h)), the former is most conveniently defined by the cf which, for aAð0; 2 and bA½1; 1 ; is given by f ðtÞ ¼ expðjtja ½1 þ ibsgnðtÞ tanðpa=2Þ Þ; aa1; 2 while the latter is defined as the distribution of X ; where X ¼ ehZ =2 ððegZ  1Þ=gÞ; with ZBNð0; 1Þ: Since the test statistics are affine invariant, i.e. invariant under transformations of the type X -cX þ d; c > 0; dAR; all distributions are generated in standard form. Given a random sample, a slightly more general version Tn;g of the Epps and Pulley (1983) test statistic for normality, results from Tn when the weight function wðtÞ ¼ expðgt2 Þ; g > 0; is employed. This test statistic may be written as sffiffiffiffiffiffiffiffiffiffiffiffiffi rffiffiffi n rffiffiffiffiffiffiffiffiffiffiffi n 2 2 1 p X p 2p X 2 eðYj Yk Þ =4g þ n eYj =ð2þ4gÞ : Tn;g ¼ n g j;k¼1 1þg 1 þ 2g j¼1

ARTICLE IN PRESS 312

S. Meintanis, N.G. Ushakov / Statistics & Probability Letters 69 (2004) 305–314

d In order to give a computational formula for the binned test statistic Tn;g corresponding to Tn;g ; let nd (resp. Nd ) denote the number of consecutive bins (i.e. intervals of the form ðjd  d=2; jd þ d=2 ), with negative (resp. positive) end-points required to cover all observations. Then, nd ¼ ½md and

Md  1; if Md is an integer; Nd ¼ ½Md ; if Md is not an integer;

with md ¼ ðjminYj j=dÞ þ 12 and Md ¼ ðjmaxYj j=dÞ þ 12: Now, the binned test statistic takes the form sffiffiffiffiffiffiffiffiffiffiffiffiffi rffiffiffi X rffiffiffiffiffiffiffiffiffiffiffi Nd Nd 2 2 2 2 1 p p 2p X d 2 Tn;g ¼ fj fk eðjkÞ d =4g þ n fj ej d =ð2þ4gÞ ; n g j;k¼n 1þg 1 þ 2g j¼n d

d

where fj denotes the number of data-points in bin j: d : The power reported In Tables 1 and 2, we present some simulation results for Tn;g and Tn;g (percentage of rejection in 10 000 samples rounded to the nearest integer), shows that the binned d of the test statistic, while being computationally less demanding, retains the power version Tn;g characteristics of the original test to a satisfactory degree. In addition, as it was suggested by a referee, computational savings are reported. We have found that when the binned statistic is

Table 1 Percentage of rejection for 10 000 Monte Carlo samples of size n ¼ 20 (upper part) and n ¼ 50 (lower part) at significance level a ¼ 0:05 g

0.5

1.0

1.5

2.0

4.0

Altern.

1:0 Tn;g

Logistic Laplace Cauchy Uniform Triangular Student(2) Student(4) Stable(1.5,0) Stable(1.5,1) Tukey(0,0.2) Tukey(0.5,0.1)

8 16 77 13 5 40 17 38 44 21 37

8 12 70 8 4 36 15 35 45 19 38

8 11 65 5 4 33 15 34 41 17 33

7 10 59 5 4 29 14 31 38 16 30

6 7 36 4 4 17 9 20 24 10 18

Logistic Laplace Cauchy Uniform Triangular Student(2) Student(4) Stable(1.5,0) Stable(1.5,1) Tukey(0,0.2) Tukey(0.5,0.1)

8 30 99 32 7 72 25 66 80 36 72

8 22 98 18 6 68 24 65 82 33 74

8 18 97 12 6 64 23 63 81 30 72

8 15 95 9 5 59 21 59 77 27 67

6 9 86 6 5 45 15 49 65 19 50

0.5

1.0

1.5

2.0

4.0

10 23 84 12 4 49 21 46 54 27 50

11 24 82 6 3 50 23 47 56 28 52

11 23 80 4 3 49 23 46 56 28 52

11 22 78 3 3 47 22 45 55 28 50

9 18 71 3 3 41 19 40 48 23 42

15 45 99 50 6 83 38 77 89 51 86

16 42 99 27 4 82 40 77 91 51 88

16 39 99 15 3 80 39 77 91 49 88

16 36 99 9 3 78 38 75 91 48 87

13 27 96 5 3 70 32 69 87 40 81

0:5 Tn;g

ARTICLE IN PRESS S. Meintanis, N.G. Ushakov / Statistics & Probability Letters 69 (2004) 305–314

313

Table 2 Percentage of rejection for 10 000 Monte Carlo samples of size n ¼ 20 (upper part) and n ¼ 50 (lower part) at significance level a ¼ 0:05 g

0.5

Altern.

0:25 Tn;g

Logistic Laplace Cauchy Uniform Triangular Student(2) Student(4) Stable(1.5,0) Stable(1.5,1) Tukey(0,0.2) Tukey(0.5,0.1)

11 26 85 13 4 52 23 47 57 29 54

12 26 84 4 3 53 25 49 59 31 56

13 26 83 2 2 52 25 49 59 31 56

13 26 81 2 2 52 25 48 59 31 55

12 24 78 1 2 49 24 46 57 29 52

Logistic Laplace Cauchy Uniform Triangular Student(2) Student(4) Stable(1.5,0) Stable(1.5,1) Tukey(0,0.2) Tukey(0.5,0.1)

16 51

18 48 99 25 3 85 40 80 92 55 91

18 46 99 9 2 84 44 80 93 54 91

18 44 99 5 2 82 43 79 93 53 91

18 37 98 2 1 78 40 76 92 49 89



53 5 85 42 79 90 55 88

1.0

1.5

2.0

4.0

0.5

1.0

1.5

2.0

4.0

11 27 86 12 4 53 24 48 57 30 55

12 27 85 4 3 54 25 50 60 32 57

13 27 84 2 2 53 26 50 60 32 57

13 27 83 2 2 53 26 50 60 32 57

13 27 80 1 2 52 26 49 60 32 56

17 52

19 50 99 24 3 86 46 81 93 57 91

19 47 99 7 2 85 45 81 93 56 91

19 45 99 4 1 84 45 80 93 55 91

19 41 98 1 1 81 43 78 93 52 91

Tn;g



54 5 86 43 80 91 56 89

 Denotes power 100%.

employed instead of the original statistic, there is a considerable gain. It is a standard practice to express computational savings, in terms of the average number of non-empty bins. This number, which slightly varies with the type of data-distribution, and more importantly with the sample size n and the value of d; for n ¼ 20 is averaged to 10 bins for d ¼ 0:25; 7 bins for d ¼ 0:5; and 4 bins for d ¼ 1:0: The average number of non-empty bins for n ¼ 50 are 14, 9, and 5, respectively.

Acknowledgements The authors wish to sincerely thank T.W. Epps and N. Henze for suggestions that led to the improvement of the paper. Research on this topic began while the second author was visiting the University of Patras. Nikolai Ushakov would like to thank the Department of Engineering Sciences for its hospitality and strong support. The work was partially supported by RFBR (grants 00-01-00656, 01-01-97005).

ARTICLE IN PRESS 314

S. Meintanis, N.G. Ushakov / Statistics & Probability Letters 69 (2004) 305–314

References Baringhaus, L., Henze, N., 1988. A consistent test for multivariate normality based on the empirical characteristic function. Metrika 35, 339–348. Baringhaus, L., Danschke, R., Henze, N., 1988. Recent and classical tests for normality—a comparative study. Comm. Statist. B 18 (1), 363–379. + S., 1986. Testing for normality in arbitrary dimension. Ann. Statist. 14 (2), 708–723. . o, Csorg Epps, T.W., Pulley, L.B., 1983. A test for normality based on the empirical characteristic function. Biometrika 70, 723–726. Fan, J., Marron, J.S., 1994. Fast implementations of nonparametric curve estimation. J. Comput. Graph. Statist. 3, 35–56. Gurtler, . N., Henze, N., 2000. Goodness-of-fit tests for the Cauchy distribution based on the empirical characteristic function. Ann. Inst. Statist. Math. 52 (2), 267–286. Hall, P., Wand, M.P., 1996. On the accuracy of binned kernel density estimators. J. Multivariate Anal. 56, 165–184. H.ardle, W., Scott, D.W., 1992. Smoothing by weighted averaging of rounded points. Comput. Statist. 7, 97–128. Henze, N., 1990. An approximation to the limit distribution of the Epps–Pulley test statistic for normality. Metrika 37, 7–18. . Holmstrom, L., 2000. The accuracy and the computational complexity of a multivariate binned kernel density estimator. J. Multivariate Anal. 72, 264–309. Meintanis, S., 2004. A class of omnibus tests for the Laplace distribution based on the empirical characteristic function. Commun. Statist.-Theor. Meth. 33(4), 925–948. Minnotte, M.C., 1998. Achieving high-order convergence rates for density estimation with binned data. J. Amer. Statist. Assoc. 93 (442), 663–672. Scott, D.W., 1985. Average shifted histograms: effective nonparametric density estimators in several dimensions. Ann. Statist. 13, 1024–1040. Silverman, B.W., 1982. Kernel density estimation using the fast Fourier transform. Appl. Statist. 31, 93–99. Ushakov, N.G., 1999. Selected Topics in Characteristic Functions. VSP, Utrecht. Wand, M.P., 1994. Fast computation of multivariate kernel estimators. J. Comput. Graph. Statist. 3, 433–445.