bayesian detection of a change of scale parameter in sequences of independent gamma random variables

7

Click here to load reader

Upload: joaquin-diaz

Post on 21-Jun-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Bayesian detection of a change of scale parameter in sequences of independent gamma random variables

Journal of Econometrics 19 (1982) 23-29. North-Holland Publishing Company

BAYESIAN DETECTION OF A CHANGE OF SCALE PARAMETER IN SEQUENCES OF INDEPENDENT

GAMMA RANDOM VARIABLES

Joaquin DIAZ

IIMAS-UNAM, Mkxico, D.F., MPxico

1. Introduction

The gamma distribution, whose density function is given by

j-(x; e) = xkB*);;;. 8>0, k>O, x>O.

where k is a known constant and 0 is the so-called scale parameter, has been widely used as a model in many practical situations. Hsu (1979) presents two practical examples in which this happens.

Under certain conditions, it is likely that a change in the scale parameter occurs at least once while taking a sample from a population whose density is (1). In other words, let us suppose that there is a sequence x1,x2,. ..,-Y~, x1 + 1,. . ., x, of independent observations for which

Xi-_(X;6,) if i=1,2 ,..., A,

-f(x;0,) if i=l+l,...,n, (2)

where f corresponds to (l), 8, and t?2 are the unknown scale parameters, and 2 is the parameter that corresponds to the change point. It is clear that 1 can take values between 1 and n, and also that, if A=n, there is no change and therefore d1 = &.

Under the previous conditions, two different problems can be stated; the first is the detection of the change, while the second is the estimation of the change point and the two scale parameters under the assumption that a change has occurred.

Several authors have proposed Bayesian solutions to the previous problems for the normal sequences and regression models; among others, Bacon and Watts (1971), Broemeling (1972), Smith (1973, Ferreira (1975), Holbert and Broemeling (1977), Tsurumi (1977), Chin Choy and Broemeling

0165-7410/82/OOO&OOO O/$02.75 0 1982 North-Holland

Page 2: Bayesian detection of a change of scale parameter in sequences of independent gamma random variables

24 J. Diaz, Changes of the scale parameter

(1980), and Chin Choy and Broemeling (1981). For the gamma case, Hsu (1979) presents a classical (non-Bayesian) asymptotic solution to the first problem and makes a review of other solutions proposed that can be used only for large samples.

The purpose of this paper is to present a procedure to test

H,:A=n vs H,:l<=A~n-1, (3)

using an informal Bayesian analysis where the test is based on the marginal posterior density of A. One of the advantages of this procedure is that asymptotic approximations are not required. Obviously, this corresponds to a solution to the first problem mentioned above. The solution to the second problem is not complicated, but will be reported elsewhere.

Section 2 of this paper is devoted to the presentation of the detection procedure, while in section 3 the results are applied to several examples including the two presented by Hsu (1979).

2. Detection procedure

In this section, the prior assumptions will be stated and the marginal posterior density of A, from which the detection procedure will be derived, will be obtained.

Starting from (2), the likelihood function for A, 0, and 0, is given by

ev a epc; - W

if ?,#n, (4)

where O,>O, O,>O and A=l,2 ,..., n.

Regarding the prior information, we will consider A independent of 0, and 0, with marginal density given by

aA4 = P if L=n,

l-p . =-

n-l if lfn, (5)

Page 3: Bayesian detection of a change of scale parameter in sequences of independent gamma random variables

J. Diaz, Changes of the scale parameter 25

where p is a known constant such that 05~5 1. Also, if II =.n, the density of

8, is

gm = ew(- md) ayr(r,)ey +I ’ 600,

and, if A#n, the two scale parameters will be assumed to be independent, and the density of e2 will be given by

gA&) = exti - lm,d) a;qr,)e,rz + 1 ’ e,>o, (7)

while the density of 0, remains as in (6). The parameters c(~, rl, a2 and r2 are positive and known. The densities (6) and (7) are the so-called conjugate priors for the corresponding parameters, and this is the reason for selecting them.

From (4) (5), (6) and (7) one finds the joint posterior distribution of the parameters; then integrating out the scale parameters, the marginal posterior density of the switch point can be easily obtained and its formula is

if i=n,

(1 -p)T(lk+r,)T((n-~)k+r,)a;‘2(T(r,))-’

“_1)($l Xi+(ll.,))il”‘(~~~j+~I~~~)~n-~‘k~~

if ifn.

If, instead of using (6) and (7) as prior densities for the scale parameters, we use the improper priors (non-informative) g(OJcc l/e, (i= 1, 2), and assuming O,, and 8, are independent, the marginal posterior density of the change point is given by

if i=n,

Page 4: Bayesian detection of a change of scale parameter in sequences of independent gamma random variables

26 J. Diaz, Changes of the scale parameter

Once the marginal posterior density of the change point is obtained, the inference problem is basically solved. The decision about accepting or rejecting H, in (3) will be based on the behavior of this density and especially on its value for A=n which corresponds to the probability of no change.

In the following section, formula (9) will be applied to three numerical examples.

3. Applications

As an illustration, the detection procedure described in the previous section will be applied now to three examples.

Example 1. The following observations were artificially generated with a density that corresponds to (1) with k = 2 and unitary scale parameter:

2.0777 2.1089 0.4033 2.0729 1.3243 1.5223 3.0164 4.0225 3.3887 0.8362 3.3298 1.0387 1.2537 1.3364 1.2291 1.0502 1.7754 3.9709 1.9282 0.2673

Table 1 shows the results obtained from the application of (9) to three different situations. In the three cases, the first eight observations remained

Table 1

Posterior density of the changing point for Example 1.

i (=l <=1.5 1=3

12 13 14 15 16 17 18 19 20

0.08325 0.07642 0.01651 0.02890 0.02677 0.00828 0.02738 0.03985 0.03290 0.02273 0.03463 0.04311 0.023 17 0.04545 0.11572 0.02345 0.05726 0.28998 0.01817 0.03664 0.23537 0.01897 0.02105 0.12200 0.02645 0.01521 0.00789 0.02001 0.01620 0.01130 0.03084 0.01584 0.00323 0.02396 0.01544 0.00375 0.02120 0.01589 0.00409 0.02005 0.01685 0.00440 0.01971 0.01885 0.00521 0.02120 0.02380 0.00739 0.02414 0.02660 0.00710 0.04858 0.03417 0.00425 0.09965 0.10328 0.02321 0.39808 0.35969 0.05501

Page 5: Bayesian detection of a change of scale parameter in sequences of independent gamma random variables

J. Diaz, Changes of the scale parameter 21

unchanged, while in the first case the last twelve observations of the previous list were taken, in the second and third they were multiplied by 1.5 and 3, respectively, in order to produce a change in the scale parameter after the eighth observation with different relative magnitude. The prior probability of no change was p=O.5.

From the different posterior densities of the change point shown in table 1, we can conclude that, when [=8,/e, is equal to 1 and 1.5, the hypothesis of no change cannot be rejected. For [=3, a set of highest posterior density of probability 0.76 does not contain the value 2=20, and this could lead us to reject H, under certain circumstances. It is important to notice that in this case (c= 3), the posterior probability of no change is 0.055.

Example 2. In Appendix B of Hsu (1979), the arrival times of aircraft to a control sector during a certain time interval are reported. Under the hypothesis that the interarrival times are exponentially distributed, several tests were performed and not one indicated a change in the scale parameter.

Formula (9) was applied to the interarrival times and the results obtained for the posterior density of the change point is shown in fig. 1. It is evident from the graph that if there was any change it should have occurred close to the extreme points. Therefore we can conclude that there was no change in the scale parameter.

h( h/x)

0.517 -

Fig. 1. Marginal posterior density of 1 for Example 2.

Page 6: Bayesian detection of a change of scale parameter in sequences of independent gamma random variables

28 J. Diaz, Changes of the scale parameter

Example 3. In Appendix A of Hsu (1969), the values of a certain index P, for the stock market were reported. Under the hypothesis that R,=

(Pt+1- p,)/p, is approximately normally distributed and supposing that the population mean is equal to R = - 0.0008, given that we have a large sample, the variable K =(R, + 0.0008)2 is approximately gamma distributed with k =3 and scale parameter 8 = &a’).

Formula (9) was applied to the W,‘s and the results obtained are shown in fig. 2. It is clear from the graph that we can conclude that the hypothesis of no change can be rejected and, moreover, we can say that the change point must be somewhere around A= 88. According to Hsu’s paper, the maximum likelihood estimate of the changing point is x=89, which obviously coincides with the mode of the posterior density.

hlh/x)

Fig. 2. Marginal posterior density of I for Example 3.

4. Summary and comments

In this paper, a Bayesian procedure to detect a change of scale parameter in a sequence of gamma random variables was presented. The application of the procedure to examples that were analysed through other procedures shows that the results obtained are similar, with the advantage that the

Page 7: Bayesian detection of a change of scale parameter in sequences of independent gamma random variables

J. Diaz, Changes of the scale parameter 29

decision is not based on the asymptotic behavior of a test statistic. Also, the knowledge of the exact posterior distribution of the change point gives the user much more information to base his or her decisions on, than one number that corresponds to an outcome of a random variable whose distribution is only approximately known. Further work can be done to determine how sensible is the procedure to changes in the prior assumptions and also to the position of the real change point.

Other related problems one can think about are the detection of multiple changes and the introduction of unknown location parameters in the problem presented here. In these cases one might face some difficulties in expressing prior information and in obtaining closed forms for the posteriors.

References

Bacon, D.W. and D.G. Watts, 1971, Estimating the transition between two intersecting lines, Biometrika 58, 524-534.

Broemeling, L.D., 1972, Bayesian procedures for detecting a change in a sequence of random variables, Metron XXX, 1-14.

Chin Choy, J.H. and L.D. Broemeling, 1980, Some Bayesian inferences for a changing linear model, Technometrics 22, no. 1, 71-78.

Chin Choy, J.H. and L.D. Broemeling, 1981, Detecting structural change in linear models, Communications in Statistics, forthcoming.

Ferreira, P.E., 1975, A Bayesian analysis of a switching regression model: Known number of regimes, Journal of the American Statistical Association 70, 370-374.

Holbert, D.H. and L.D. Broemeiing, 1977, Bayesian inferences related to shifting sequences and two-phase regression, Communications in Statistics, Theory and Methods A6, no. 3, 265-275.

Hsu. D.A., 1979, Detecting shifts of parameter in gamma sequences with applications to stock price and air traffic flow analysis, Journal of the American Statistical Association 74, 31-40.

Smith, A.F.M., 1975, A Bayesian approach to inference about a change point in a sequence of random variables, Biometrika 62, 407416.

Tsurumi, H., 1977, A Bayesian test of a parameter shift with an application, Journal of Econometrics 6,371-380.

JE- B