Advances in Decision Sciences

Volume 2012 (2012), Article ID 150303, 9 pages

doi:10.1155/2012/150303

Research Article

Comparison of Some Tests of Fit for the Inverse Gaussian Distribution

D. J. Best,¹ J. C. W. Rayner,1,2 and O. Thas2,3

¹School of Mathematical and Physical Sciences, University of Newcastle, NSW 2308, Australia

²Centre for Statistical and Survey Methodology, School of Mathematics and Applied Statistics, University of Wollongong, NSW 2522, Australia

³Department of Mathematical Modelling, Statistics and Bioinformatics, 9000 Gent, Belgium

Received 27 April 2012; Revised 18 July 2012; Accepted 26 July 2012

Academic Editor: Shelton Peiris

Copyright © 2012 D. J. Best et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract.

This paper gives an empirical investigation of some tests of goodness of fit for the inverse Gaussian distribution.

1. Introduction

The inverse Gaussian distribution is an important statistical model for the analysis of positive data. See, for example, Seshadri [1]. In its standard form the distribution, denoted , depends on the shape parameter and the mean . Its probability density function is

Let be a sequence of independent observations. We wish to test H₀: is distributed as for and against and not H₀.

The maximum likelihood estimators are

Put .

We consider the following test of fit statistics:

(i)the smooth test statistic of Ducharme [2], denoted by ,(ii)the Laplace transform test statistic of Henze and Klar [3], denoted by , (iii)the empirical likelihood ratio test statistic of Vexler et al. [4], denoted by ,(iv)the traditional Anderson-Darling test statistic, denoted by ,(v)conventional smooth tests following Rayner et al. [5].

We strongly suggest that values for all tests be found using the parametric bootstrap. A link for smooth test statistics for many distributions and bootstrap values for their tests of fit is http://www.biomath.ugent.be/~othas/smooth2.

2. Definitions

2.1. Ducharme’s

The usual approach to constructing a smooth test as outlined, for example, in Rayner et al. [5], produces inconsistent and less powerful tests; see Ducharme [2, page 279] and Henze and Klar [3, Tables 1 and 2]. Ducharme [2] suggests testing H₀ above by first defining ; he then states that has a random walk distribution, say. The Ducharme [2] statistic is , where and are, under H₀, asymptotically independent and asymptotically standard normal variables, and hence is asymptotically distributed. Thus does not depend on , as do (see Section 2.2) and the Anderson-Darling test statistic . Ducharme [2, page 279] notes this implies loses power for some values can take. The components and are defined by

in which .

A positive feature of smooth tests is that their components can often shed light on how the data differ from the hypothesised distribution. This is somewhat less evident with Ducharme’s test given that he transforms the data. Another positive feature of smooth tests is that their components often give highly focused tests with good power. Ducharme’s test has components that are likely to fulfil this role.

2.2. Henze and Klar’s

This is defined using the exponentially scaled complementary error function where . Note that in we divide by and not as in Henze and Klar [3, page 428], as we believe a typographical error was made in their paper. Now let and . Then

Tests based on the empirical Laplace transform, as is , have produced powerful tests for other distributions, and so it is useful to compare with other recently suggested tests.

2.3. The Statistic of Vexler et al.

Order the observations so that , and let . Then

where can be taken to be 0.5. Observe that, for small , such as , the statistic can take an infinite value when there are tied data. Vexler et al. [4] do not appear to note this. For the Poisson alternative in Table 1 and the statistic is often infinite. Choi and Lim [6] show that an entropy-type statistic-like has good power for the Laplace distribution and so it is of interest to see how the entropy method works with a skewed distribution.

Table 1: Powers (in percentages) of goodness of fit tests for the inverse Gaussian distribution for and (a) , (b) .

(a)  

Alternative

log()

IG(0.25)
10
10
11
9
9
10
10
10
3
6

IG(0.5)
10
10
9
11
10
10
10
10
4
8

IG(1)
10
10
10
11
10
10
10
8
6
9

IG(3)
10
10
10
10
10
10
9
8
8
10

IG(5)
11
11
10
12
10
11
8
9
8
10

IG(10)
9
9
10
10
10
10
8
10
9
11

IG(20)
10
8
11
9
10
9
9
11
9
9

IG(100)
10
9
9
8
9
10
9
10
11
10

W(0.5)
95
92
83
93
96
95
6
17
0
8

W(0.8)
84
79
72
68
83
82
52
61
6
21

W(1)
74
70
61
55
75
73
65
63
10
30

W(1.2)
67
64
55
49
67
63
61
50
18
36

W(1.5)
64
60
53
42
58
55
52
34
29
47

W(2)
58
54
44
37
54
48
43
12
40
54

W(3)
50
47
37
30
46
39
16
15
50
56

LN(0.6)
15
15
13
9
13
14
13
8
9
12

LN(1)
23
23
19
10
22
22
20
12
4
10

LN(1.4)
42
39
31
18
39
36
23
26
2
7

LN(2)
70
66
57
47
70
68
9
20
0
4

LN(3)
94
90
80
87
95
95
0
1
0
1

G(0.6)
90
87
77
83
91
91
41
51
8
21

G(2)
49
46
37
26
47
41
39
20
21
34

94
89
86
89
95
95
25
36
4
19

28
26
21
15
24
21
8
5
19
25

HN(0, 1)
79
74
65
65
80
78
74
64
36
59

HC(0, 1)
56
56
41
30
55
49
18
25
2
4

U(0, 1)
90
84
77
93
91
91
88
68
94
98

POI(3)
52
39
49
49
50
92
39
1
40
57

(b)  

Alternative

log()

IG(0.25)
5
5
5
5
4
5
4
5
2
5

IG(0.5)
5
5
6
5
4
5
5
4
2
5

IG(1)
5
6
5
5
4
6
6
4
2
5

IG(3)
6
5
6
4
4
4
6
6
1
3

IG(5)
5
5
5
4
5
6
4
5
1
2

IG(10)
5
5
5
5
4
6
3
4
0
1

IG(20)
5
4
5
5
5
5
2
4
0
1

IG(100)
5
5
5
5
5
6
2
2
0
0

W(0.5)
93
91
83
87
87
94
1
3
0
2

W(0.8)
76
72
60
61
77
77
26
42
1
10

W(1)
67
65
54
47
70
63
45
49
4
14

W(1.2)
62
59
47
38
63
57
47
42
8
21

W(1.5)
54
53
37
31
50
48
45
28
15
32

W(2)
45
43
31
22
41
42
37
12
23
39

W(3)
41
39
29
20
34
29
13
3
35
47

LN(0.6)
8
8
7
4
5
8
6
2
3
6

LN(1)
16
18
10
5
15
13
9
2
1
4

LN(1.4)
35
34
24
11
27
27
8
2
1
2

LN(2)
64
61
47
38
55
63
2
1
0
1

LN(3)
90
86
76
81
92
94
0
1
0
0

G(0.6)
87
85
75
78
88
88
20
35
1
11

G(2)
37
37
26
18
36
33
28
15
8
21

89
87
83
85
93
92
7
17
1
8

17
19
10
6
12
13
6
2
10
18

HN(0, 1)
74
70
60
55
70
72
63
55
19
39

HC(0, 1)
51
51
36
23
46
46
7
14
0
2

U(0, 1)
85
81
67
87
83
88
81
61
80
94

POI(3)
37
30
35
39
34
77
8
0
24
43

2.4. The Anderson-Darling Statistic

Again order the data from smallest to largest to obtain and take where is the distribution function for the IG distribution. Then the Anderson-Darling statistic is

The Anderson-Darling has stood the test of time as a useful general option for tests of fit for many distributions. Have newer tests improved on its power performance?

2.5. Conventional Smooth Test Third and Fourth Components

Henze and Klar [3] consider the test based on the conventional second-order component and show it has poor power for some alternatives. Ducharme [2] notes that these conventional smooth tests discussed, for example, in Rayner et al. [5], can be inconsistent. However we decided to include tests based on and in our comparisons.

In general the rth-order component is , in which is an orthonormal polynomial of degree on the inverse Gaussian distribution. We find

in which , , , , , , and .

Moreover

in which , and are as for , , , , , and .

The parameters and can be estimated by maximum likelihood (ML) estimation using the previous formula for and , thereby giving and . We also looked at and where the parameters are estimated using method of moments (MOM) estimators and .

As indicated previously, smooth tests can indicate in terms of moments how data and the hypothesised distribution differ. This feature, and good power in previous studies for testing for other distributions, prompted us to include conventional smooth tests in our comparisons.

3. Sizes and Powers

In this section wherever possible we have used IMSL routines to generate random deviates. Calculations were done using double precision arithmetic and FORTRAN code. For the inverse Gaussian random deviates were found as in Michaels et al. [7].

We examine a similar range of alternatives to that given by Henze and Klar [3] so that comparisons can be made with the other statistics in their Table 1(a). We note that

(i)for the lognormal alternative the probability density function should be ,(ii)the alternative is a standard exponential alternative. Note that in Henze and Klar [3, Table 1] , , and are equivalent.

It appears that the tests based on and generally do well while that based on is only competitive for the symmetric uniform alternative. The smooth tests based on and , like that based on in Henze and Klar [3], were not competitive. The tests based on and were generally even less competitive. This is unfortunate as these components help describe the data and this facility is not available with the other tests. All powers were calculated using parametric bootstrap.

The alternatives in Table 1 are defined in Henze and Klar [3]. However note that in Henze and Klar [3] is here. There is, however, one exception, and that is the Poisson-type alternative POI(3) which has probability function ! in which here and if a random value is zero we take this to be . This alternative was suggested by the comment in Henze and Klar [3] that for this shelf life data they examine and the other EDF statistics have a much smaller value than and the other empirical Laplace transform statistics. A feature of the shelf life data was that there were tied observations — not something one would expect for an inverse Gaussian distribution. The POI(3) alternative gives parametric bootstrap simulated samples with many ties and, as can be seen in Table 1, the power of the test based on is much greater than those for or . The test based on classifies infinite values as rejections of the null hypothesis. We have no explanation as to why the Anderson-Darling test is quite powerful for tied data when the null hypothesis specifies an inverse Gaussian distribution.

In Table 1(a) our powers for the tests based on and are very similar to those obtained by Henze and Klar [3]. Table 1(b) gives powers for the same alternatives as Table 1(a) but with as this choice of is commonly used in practice. The relative performance of the tests in Tables 1(a) and 1(b) is similar. The traditional smooth tests, based on the statistics, are sometimes particularly poor in Table 1(b).

4. The Approach to

An advantage of the smooth test statistics and their components is that under the null hypothesis they have asymptotic distributions. Thus for larger sample sizes approximate values can be found using the distribution. However for and Table 2 indicates that, to give actual test sizes close to the nominal 5%, for and a sample size of 200 might be needed, while an even greater sample size might be needed for . This ties in with the suggestion, made in Section 1, to use the parametric bootstrap.

Table 2: Empirical null 95% points for , , , , and /(T) for and .

/()

20
2.20
1.77
3.89
0.97
0.70

50
2.89
1.96
4.64
1.20
0.83

100
3.26
2.24
4.89
1.58
1.08

200
3.51
2.54
5.44
2.12
1.42

500
3.72
3.07
5.62
2.98
1.99

1000
3.75
3.20
5.76
3.97
2.62

2000
3.82
3.34
5.82
4.34
2.89

5000
3.82
3.54
5.84
5.39
3.58

3.84
3.84
5.99
—
3.84

We did not expect the conventional smooth test statistics to be asymptotically distributed; see, for example, Rayner et al. [5, Section 9.3]. As an illustration of this Table 2 shows that 95% points of do not converge to 3.84. If , we observe that because of the MOM estimators used in we can write the numerator of as say. Then , where is the variance of , should be asymptotically . Here . This formula can be found by the delta method. No powers for are shown in Table 1 as they are similar to those for .

5. Examples

(i) Failure Times

Proschan [8] has given failure times for air conditioning in Boeing 720 jets. For jet number 7912 the 30 times were

Does the inverse Gaussian provide a good model for these times? We find , , and . With , with value 0.152. Further, with value 0.0007 and with value 0.012. If , say, it makes a difference which test is used: those based on and are significant but that based on is not. If only the test based on is significant. Further results with values in parentheses are , , , , , and . We see the tests based on and are significant at the 5% level; the latter suggests the lack of fit is due to kurtosis differences between the model and the data. See Figure 1. Observe that in Figures 1 and 2 the height of the histogram bars is class frequency/number of observations/class width and that this height is labelled “density” so as to be on the same scale as the probability “density” curve. Figure 1 uses MOM estimators for this curve.

Aside from that, we note that in Henze and Klar [3, Table 3] the value 3.7 should be 3.0. This does not affect the conclusions of Henze and Klar for this data set.

Figure 1: Air conditioner failure times in Boeing jets.

Figure 2: Storm precipitation at Jug bridge, MD, USA.

(ii) Precipitation at Jug Bridge

Ang and Tang [9, page 266] consider precipitation from storms in inches at the Jug bridge in MD, USA. Their data were

Figure 2 indicates the inverse Gaussian fit is marginal. We find , , and with , giving a value of 0.09. Further test statistics with values in parentheses are , , , , , , , and . As the test based on is most critical of the IG hypothesis, the data may be more symmetric than the . The inverse Gaussian curve in Figure 2 uses ML estimators.

In passing we note that the exponential distribution with parameter 0.463 does not provide a good fit to the data. When testing for an exponential distribution with an approximate value of 0.03. Visual inspection of Figure 2 may have indicated the exponential model may have been appropriate.

6. Conclusion

The tests based on and do well in the power comparisons while that based on indicates possible kurtosis differences from the distribution in the failure time example. For the precipitation data the test based on is most critical of the fit of the model. In fact apart from the tests based on and , all of the tests studied here had something to recommend them: reasonable power or interpretability. No test was uniformly superior to the others.

Acknowledgment

The authors thank a referee for a number of constructive comments.

References

V. Seshadri, The Inverse Gaussian Distribution: Statistical Theory & Applications, Springer, New York, NY, USA, 1998.

G. R. Ducharme, “Goodness-of-fit tests for the inverse Gaussian and related distributions,” Test, vol. 10, no. 2, pp. 271–290, 2001.

N. Henze and B. Klar, “Goodness-of-fit tests for the inverse Gaussian distribution based on the empirical Laplace transform,” Annals of the Institute of Statistical Mathematics, vol. 54, no. 2, pp. 425–444, 2002.

A. Vexler, G. Shan, S. Kim, W. M. Tsai, L. Tian, and A. D. Hutson, “An empirical likelihood ratio based goodness-of-fit test for Inverse Gaussian distributions,” Journal of Statistical Planning and Inference, vol. 141, no. 6, pp. 2128–2140, 2011.

J. C. W. Rayner, O. Thas, and D. J. Best, Smooth Tests of Goodness of Fit: Using R, Wiley, Singapore, 2nd edition, 2011.

B. Choi and K. Kim, “Testing goodness-of-fit for Laplace distribution based on maximum entropy,” Statistics, vol. 40, no. 6, pp. 517–531, 2006.

J. Michaels, W. Schucany, and R. Haas, “Generating random deviates using transformations with multiple roots,” American Statistician, vol. 30, no. 2, pp. 88–90, 1976.

F. Proschan, “Theoretical explanation of observed decreasing failure rate,” Technometrics, vol. 5, no. 3, pp. 375–383, 1963.

A. Ang and W. H. Tang, Probability Concepts in Engineering, Wiley, New York, NY, USA, 2nd edition, 2007.