hypothesis (2) on the level of signi¬cance ± has the form

Wc = {y ∈ Y : ’2 ln »(y) > c} such that P {Wc |γ = γ0 } = ±, (7.12)

where Y denotes the sample space. The power p(γ1 , ±) of the test of the

hypothesis (2) at the point γ1 of the alternative is equal to P {Wc |γ = γ1 },

where Wc is de¬ned by (12).

Applying Theorem 4 in (Stehl´ 2001) we obtain in the case of the Gamma(v, γ)

±k,

distributed observations the equality

γ1 γ1

c±,N c±,N

’1’ 2vN ’1’ 2vN

1’P {Wc |γ = γ1 } = FvN {’vN W’1 (’e )}’FvN {’vN W0 (’e )}.

γ0 γ0

This completes the proof.

The testing of the scale of the failure process based on the one observation is

nice example of application of the testing based on ”one measurement” which

accumulate information from more failures. In such situations the exact test

based on the one measurement can be useful.

The other interesting case of scale testing is sample of the form Tr1 , Tr2 , ..., TrN

where r is ¬xed number of observed failures. Then Tri , i = 1, ..., N are iid and

Gamma(γ, rv) distributed.

The optimal test of the hypothesis (2) is the exact LR test of the scale in the

gamma family, we use the quantlet etgammaexacttest again.

The exact test for the general form {Tr,j } of sample is much more complicated

and can be found in Stehl´ (2002a).

±k

7.4 Implementation to the XploRe

The cdfs of the Wilks statistics of the LR tests of the scale are written in terms

of the incomplete Gamma function and two branches W0 and W’1 of the LW

function. The branches of the LW function are implemented to the standard

138 7 The exact LR test of the scale in the gamma family

mathematical computational environments, e.g. Maple, Matlab, Mathematica

and Mathcad. The reason of this implementation is a large diversity of problems

to their the LW gives solution. If the LW is not implemented in some statistical

software (which is the case of the XploRe) we can proceed as follows. Let us

consider the selectors min(S) and max(S), where S is the set of solutions of

the equation x ’ ln(x) = c, c > 1. Then we have the following relations in the

terms of the Lambert W function (Stehl´ 2001) for proof :

±k,

min(S) = ’W0 (’e’c )

and

max(S) = ’W’1 (’e’c ).

Practically, we use the numerical solver of the equation x ’ ln(x) = c. The

problem is that the derivative is unbounded at the zero neighborhood. Thus

the speed methods as Newton-Raphson or modi¬ed Newton-Raphson based on

ˇ ±ˇ a

derivative are not applicable. We use the quantlet nmbrentroot.xpl (C´zkov´,

2003). The nmbrentroot.xpl is the XploRe implementation of the Brent™s

improvement (Press, 1992) of the van Wijngaarden-Dekker method. Brent™s

method joint the advantages of the root bracketing, bisection method and in-

verse quadratic interpolation and this is the way to combine superlinear con-

vergence with the sureness of bisection.

7.5 Asymptotical optimality

The one of the much more interesting theoretical properties of the exact LR

test of the scale of the exponential distribution is its asymptotical optimality

(AO) in the sense of Bahadur, which can be described as follows.

Consider a testing problem H0 : ‘ ∈ ˜0 vs H1 : ‘ ∈ ˜1 \ ˜0 , where ˜0 ‚

˜1 ‚ ˜. Further consider sequence T = {TN } of test statistics based on

measurements y1 , ..., yN which are iid according to an unknown member of

an family {P‘ : ‘ ∈ ˜}. We assume that large values of test statistics give

evidence against H0 . For ‘ and t denote FN (t, ‘) := P‘ {s : TN (s) < t} and

GN (t) := inf{FN (t, ‘) : ‘ ∈ ˜0 }. The quantity Ln (s) = 1 ’ Gn (Tn (s)) is called

the attained level or the p-value. Suppose that for every ‘ ∈ ˜1 the equality

’2 ln Ln

lim = cT (‘)

n

holds a.e. P‘ .

7.6 Information and exact testing in the gamma family 139

Then the nonrandom function cT de¬ned on ˜1 is called the Bahadur exact

slope of the sequence T = {Tn }. According to the theorem of Raghavachari

(1970) and Bahadur (1971), the inequality

cT (‘) ¤ 2K(‘, ˜0 ) (7.13)

holds for each ‘ ∈ ˜1 . Here K(‘, ˜0 ) := inf{K(‘, ‘0 ) : ‘0 ∈ ˜0 } and K(‘, ‘0 )

denotes the Kullback-Leibler information number. If (13) holds with the equal-

ity sign for all ‘ ∈ ˜1 , then the sequence T is said to be asymptotically optimal

in the Bahadur sense. The maximization of cT (‘) is a nice statistical property,

because the greater the exact slope is, the more one can be convinced that

the rejected null hypothesis is indeed false. The class of such statistics is ap-

parently narrow, though it contains under certain conditions the LR statistics

(Bahadur, 1967) and (Rubl´ 1989a).

±k,

Rubl´ (1989a) proved AO of the LR statistic under regularity condition which

±k

is shown in (Rubl´ 1989b) to be ful¬lled by regular normal, exponential and

±k,

Laplace distribution under additional assumption that ˜0 is a closed set and

˜1 is either closed or open in metric space ˜. For more extensive discussion

on asymptotical optimality see also monograph of Nikitin (1995).

7.6 Information and exact testing in the gamma

family

Model (1) is a regular exponential family (Barndor¬-Nielsen, 1978), the su¬-

cient statistics for the canonical parameter γ ∈ “ has the form t(y) = ’y and

“ = {(γ1 , . . . , γN ), γi > 0; i = 1, . . . , N }. The ”covering” property

{t(y) : y ∈ Y } ⊆ {Eγ [t(y)] : γ ∈ “}

(P´zman, 1993) together with the relation

a

‚κ(γ)

Eγ [t(y)] =

‚γ

N

where κ(γ) = N ln(“(v)) ’ v i=1 ln(γi ) enables us to associate to each value

of t(y) a value γy ∈ “ which satis¬es

ˆ

‚κ(γ)

= t(y). (7.14)

γ=ˆy

γ

‚γ

140 7 The exact LR test of the scale in the gamma family

The equation (14) follows that γy is the MLE of the canonical parameter γ

ˆ

in the family (1). By the use of (14) we can de¬ne the I-divergence of the

observed vector y in the sense of P´zman (1993):

a

IN (y, γ) := I(ˆy , γ).

γ

Here I(γ , γ) is the Kullback-Leibler divergence between the parameters γ

and γ. The I-divergence has nice geometrical properties, let us mention only

the Pythagorean relation

I(¯ , γ) = I(¯ , γ ) + I(γ , γ)

γ γ

for every γ, γ , γ ∈ int(“) such that (Eγ (t) ’ Eγ (t))T (γ ’ γ) = 0. The

¯ ¯

Pythagorean relation can be used for construction of the MLE density in reg-

ular exponential family, see P´zman (1996) for details.

a