Goodness-of-Fit Test



Similar documents
Chapter 3 RANDOM VARIATE GENERATION

Review of Fundamental Mathematics

MATH BOOK OF PROBLEMS SERIES. New from Pearson Custom Publishing!

START Selected Topics in Assurance

Math 120 Final Exam Practice Problems, Form: A

The Variability of P-Values. Summary

6 3 The Standard Normal Distribution

Overview of Violations of the Basic Assumptions in the Classical Normal Linear Regression Model

6.4 Normal Distribution

MBA Jump Start Program

3.2. Solving quadratic equations. Introduction. Prerequisites. Learning Outcomes. Learning Style

Microeconomic Theory: Basic Math Concepts

This unit will lay the groundwork for later units where the students will extend this knowledge to quadratic and exponential functions.

Probability and Statistics Prof. Dr. Somesh Kumar Department of Mathematics Indian Institute of Technology, Kharagpur

Permutation Tests for Comparing Two Populations

Prentice Hall Algebra Correlated to: Colorado P-12 Academic Standards for High School Mathematics, Adopted 12/2009

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions.

Descriptive Statistics

Section 1.1. Introduction to R n

Summary of Formulas and Concepts. Descriptive Statistics (Ch. 1-4)

4. How many integers between 2004 and 4002 are perfect squares?

How To Check For Differences In The One Way Anova

A logistic approximation to the cumulative normal distribution

Estimating Industry Multiples

CHAPTER 2 Estimating Probabilities

Fairfield Public Schools

Solutions to Homework 10

CHI-SQUARE: TESTING FOR GOODNESS OF FIT

5/31/ Normal Distributions. Normal Distributions. Chapter 6. Distribution. The Normal Distribution. Outline. Objectives.

What are the place values to the left of the decimal point and their associated powers of ten?

with functions, expressions and equations which follow in units 3 and 4.

Algebra I Vocabulary Cards

Exact Nonparametric Tests for Comparing Means - A Personal Summary

Higher Education Math Placement

Simple linear regression

Modeling Individual Claims for Motor Third Party Liability of Insurance Companies in Albania

Probability density function : An arbitrary continuous random variable X is similarly described by its probability density function f x = f X

STATISTICA Formula Guide: Logistic Regression. Table of Contents

ANALYZING NETWORK TRAFFIC FOR MALICIOUS ACTIVITY

Multivariate Normal Distribution

Common Core State Standards for Mathematics Accelerated 7th Grade

Current Standard: Mathematical Concepts and Applications Shape, Space, and Measurement- Primary

SOLUTIONS. f x = 6x 2 6xy 24x, f y = 3x 2 6y. To find the critical points, we solve

Equations. #1-10 Solve for the variable. Inequalities. 1. Solve the inequality: Solve the inequality: 4 0

3. Reaction Diffusion Equations Consider the following ODE model for population growth

2.2 Derivative as a Function

Session 7 Bivariate Data and Analysis

Inference on the parameters of the Weibull distribution using records

Two Correlated Proportions (McNemar Test)

SENSITIVITY ANALYSIS AND INFERENCE. Lecture 12

Student Performance Q&A:

LOGNORMAL MODEL FOR STOCK PRICES

Maximum likelihood estimation of mean reverting processes

Algebra 1 Course Information

CALCULATIONS & STATISTICS

Logarithmic and Exponential Equations

UNDERSTANDING THE INDEPENDENT-SAMPLES t TEST

Tutorial Paper on Quantitative Risk Assessment. Mohammad Reza Sohizadeh Abyaneh Seyed Mehdi Mohammed Hassanzadeh Håvard Raddum

CA200 Quantitative Analysis for Business Decisions. File name: CA200_Section_04A_StatisticsIntroduction

Introduction to General and Generalized Linear Models

Dongfeng Li. Autumn 2010

Continuous Random Variables

4.3 Lagrange Approximation

Notes on Continuous Random Variables

Measurement with Ratios

Vocabulary Words and Definitions for Algebra

1 The Brownian bridge construction

Method To Solve Linear, Polynomial, or Absolute Value Inequalities:

Nonparametric statistics and model selection

Mathematics Review for MS Finance Students

How To Write A Data Analysis

Pennsylvania System of School Assessment

3.2 LOGARITHMIC FUNCTIONS AND THEIR GRAPHS. Copyright Cengage Learning. All rights reserved.

SAS Software to Fit the Generalized Linear Model

Principle of Data Reduction

FINAL EXAM SECTIONS AND OBJECTIVES FOR COLLEGE ALGEBRA

Algebra Academic Content Standards Grade Eight and Grade Nine Ohio. Grade Eight. Number, Number Sense and Operations Standard

List the elements of the given set that are natural numbers, integers, rational numbers, and irrational numbers. (Enter your answers as commaseparated

Students Currently in Algebra 2 Maine East Math Placement Exam Review Problems

PROBABILITY AND STATISTICS. Ma To teach a knowledge of combinatorial reasoning.

Linear Programming. Solving LP Models Using MS Excel, 18

**BEGINNING OF EXAMINATION** The annual number of claims for an insured has probability function: , 0 < q < 1.

Chapter 10. Key Ideas Correlation, Correlation Coefficient (r),

MATH 095, College Prep Mathematics: Unit Coverage Pre-algebra topics (arithmetic skills) offered through BSE (Basic Skills Education)

Math 370/408, Spring 2008 Prof. A.J. Hildebrand. Actuarial Exam Practice Problem Set 3 Solutions

E3: PROBABILITY AND STATISTICS lecture notes

For additional information, see the Math Notes boxes in Lesson B.1.3 and B.2.3.

NCSS Statistical Software

4. Continuous Random Variables, the Pareto and Normal Distributions

Generating Random Numbers Variance Reduction Quasi-Monte Carlo. Simulation Methods. Leonid Kogan. MIT, Sloan , Fall 2010

Review of Random Variables

Expression. Variable Equation Polynomial Monomial Add. Area. Volume Surface Space Length Width. Probability. Chance Random Likely Possibility Odds

VISUALIZATION OF DENSITY FUNCTIONS WITH GEOGEBRA

Multi-variable Calculus and Optimization

UNIT I: RANDOM VARIABLES PART- A -TWO MARKS

a. all of the above b. none of the above c. B, C, D, and F d. C, D, F e. C only f. C and F

Time Series and Forecasting

AP Statistics Solutions to Packet 2

1 Error in Euler s Method

Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

Transcription:

Communications in Statistics Simulation and Computation, 37: 396 4, 008 Copyright Taylor & Francis Group, LLC ISSN: 036-098 print/53-44 online DOI: 0.080/0360908098360 Goodness-of-Fit Test The Distribution of the Kolmogorov Smirnov, Cramer von Mises, and Anderson Darling Test Statistics for Exponential Populations with Estimated Parameters DIANE L. EVANS, JOHN H. DREW, AND LAWRENCE M. LEEMIS Department of Mathematics, Rose Hulman Institute of Technology, Terre Haute, Indiana, USA Department of Mathematics, The College of William & Mary, Williamsburg, Virginia, USA This article presents a derivation of the distribution of the Kolmogorov Smirnov, Cramer von Mises, and Anderson Darling test statistics in the case of exponential sampling when the parameters are unknown and estimated from sample data for small sample sizes via maximum likelihood. Keywords Distribution functions; Goodness-of-fit tests; Maximum likelihood estimation; Order statistics; Transformation technique. Mathematics Subject Classification 6F03; 6E5.. The Kolmogorov Smirnov Test Statistic The Kolmogorov Smirnov (K S) goodness-of-fit test compares a hypothetical or fitted cumulative distribution function (cdf) F x with an empirical cdf F n x in order to assess fit. The empirical cdf F n x is the proportion of the observations X X X n that are less than or equal to x and is defined as: F n x = I x n where n is the size of the random sample and I x is the number of X i s less than or equal to x. Received July 3, 007; Accepted February, 008 Address correspondence to Lawrence M. Leemis, Department of Mathematics, The College of William & Mary, Williamsburg, VA 387, USA; E-mail: leemis@math.wm.edu 396

Test Statistics for Exponential Populations with Estimated Parameters 397 The K S test statistic D n is the largest vertical distance between F n x and F x for all values of x, i.e., D n = sup F n x F x x The statistic D n can be computed by calculating (Law and Kelton, 000, p. 364) { } { i D + n = max i= n n F X i D n = max i= n where X i is the ith order statistic, and letting D n = max D + n D n F X i i n Although the test statistic D n is easy to calculate, its distribution is mathematically intractable. Drew et al. (000) provided an algorithm for calculating the cdf of D n when all the parameters of the hypothetical cdf F x are known (referred to as the all-parameters-known case). Assuming that F x is continuous, the distribution of D n, where X X X n are independent and identically distributed (iid) observations from a population with cdf F x, is a function of n, but does not depend on F x. Marsaglia et al. (003) provided a numerical algorithm for computing Pr D n d. The more common and practical situation occurs when the parameters are unknown and are estimated from sample data, using an estimation technique such as maximum likelihood. In this case, the distribution of D n depends upon both n and the particular distribution that is being fit to the data. Lilliefors (969) provides a table (obtained via Monte Carlo simulation) of selected percentiles of the K S test statistic D n for testing whether a set of observations is from an exponential population with unknown mean. Durbin (975) also provides a table (obtained by series expansions) of selected percentiles of the distribution of D n. This article presents the derivation of the distribution of D n in the case of exponential sampling for n =, n =, and n = 3. Additionally, the distribution of the Cramer von Mises and Anderson Darling test statistics for n = and n = are derived in Sec.. Two case studies that analyze real-world data sets (Space shuttle accidents and commercial nuclear power accidents), where n = and the fit to an exponential distribution is important, are given in Sec. 3. Future work involves extending the formulas established for the exponential distribution with samples of size n =, and 3 to additional distributions and larger samples. For a summary of the literature available on these test statistics and goodness-of-fit techniques (including tabled values, comparative merits, and examples), see D Agostino and Stephens (986). We now define notation that will be used throughout the article. Let X be an exponential random variable with probability distribution function (pdf) f x = e x/ and cdf F x = e x/ for x>0 and fixed, unknown parameter >0. If x x x n are the sample data values, then the maximum likelihood estimator (MLE) ˆ is: ˆ = n n x i i= }

398 Evans et al. We test the null hypothesis H 0 that X X X n are iid exponential( ) random variables... Distribution of D for Exponential Sampling If there is only n = sample data value, which we will call x, then ˆ = x. Therefore, the fitted cdf is: F x = e x/ˆ = e x/x x>0 As shown in Fig., the largest vertical distance between the empirical cdf F x and F x occurs at x and has the value /e, regardless of the value of x. Thus, the distribution of D is degenerate at /e with cdf: F D d = { 0 d /e d> /e.. Distribution of D for Exponential Sampling If there are n = sample data values, then the maximum likelihood estimate (mle) is ˆ = x + x /, and thus the fitted cdf is: F x = e x/ˆ = e x/ x +x x>0 A maximal scale invariant statistic (Lehmann, 959, p. 5) is: x x + x Figure. The empirical and fitted exponential distribution for one data value x, where D = /e and D+ = /e. (Note: The riser of the empirical cdf in this and other figures has been included to aid in comparing the lengths of D and D+ ).

Test Statistics for Exponential Populations with Estimated Parameters 399 The associated statistic which is invariant to re-ordering is: y = x x + x where x = min x x, x = max x x, and 0 <y / since 0 <x x. The fitted cdf F x at the values x and x is: F x = e x / x +x = e y and F x = e x / x +x = e y It is worth noting that the fitted cdf F x always intersects the second riser of the empirical cdf F x. This is due to the fact that F x can range from /e 0 63 (when y = /) to /e 0 8647 (when y = 0), which are both included in the second riser s extension from 0.5 to. Conversely, the fitted cdf F x may intersect the first riser of the empirical cdf F x, depending on the value of y. When 0 <y ln 0 3466, the first riser is intersected by F x (as displayed in Fig. ), but when ln <y /, F x lies entirely above the first riser (as subsequently displayed in Fig. 6). Define the random lengths A, B, C, and D according to the diagram in Fig.. With y = x / x + x, the lengths A, B, C, and D (as functions of y) are: A = e y 0 = e y 0 <y / Figure. The empirical and fitted exponential distribution for two data values x and x. In this particular plot, 0 <y ln, so the first riser of the empirical cdf F x is intersected by the fitted cdf F x.

400 Evans et al. B = e y e y = ln e y ln 0 <y <y / C = e y = e y 0 <y / D = e y = e y 0 <y / where absolute value signs are used in the definition of B to cover the case in which F x does not intersect the first riser. Figure 3 is a graph of the lengths A, B, C, and D plotted as functions of y, for 0 <y /. For any y 0 /, the K S test statistic is D = max A B C D. Since the length D is less than max{a, B, C} for all y 0 /, only A, B, and C are needed to define D. Two particular y values of interest (indicated in Fig. 3) are y and y since:. for 0 <y<y, B = max A B C D ;. for y <y<y, C = max A B C D ; 3. for y <y /, A = max A B C D ; 4. B y = C y and C y = A y. The values of y, y, C y, and C y are given below: The smallest value y in 0 / such that B y = C y is: y = + ( ln ) 4e 0 0880 Figure 3. Lengths A, B, C, and D from Fig. for n = and 0 <y /.

Test Statistics for Exponential Populations with Estimated Parameters 40 which results in C y = 4 e 0 3386 The only value y in 0 / such that A y = C y is: y = + ln ( 4 + 6 e ) 4 0 8 which results in C y = 3 4 4 + 6 e 0 305 Thus, the largest vertical distance D is computed using the length formula for A Y, B Y, orc Y depending on the value of the random variable Y = X / X + X, i.e., B Y 0 <Y y D = C Y y <Y y A Y y <Y /... Determining the Distribution of Y = X / X + X. Let X X be a random sample drawn from a population having pdf f x = e x/ x>0 for >0. In order to determine the distribution of D, we must determine the distribution of Y = X / X + X, where X = min X X and X = max X X. Using an order statistic result from Hogg et al. (005, p. 93), the joint pdf of X and X is: g x x =! e x / ( ) e x / = e x +x / 0 <x x In order to determine the pdf of Y = X / X + X, define the dummy transformation Z = X. The random variables Y and Z define a one-to-one transformation that maps = x x 0 <x x to B = y z 0 <y / z>0. Since x = yz/ y, x = z, and the Jacobian of the inverse transformation is z/ y, the joint pdf of Y and Z is: h y z = e z+yz/ y / z y = z y e z/ y 0 <y / z > 0

40 Evans et al. Integrating the joint pdf by parts yields the marginal pdf of Y : f Y y = ze z/ y dz = 0 <y / y 0 i.e., Y U 0 /. The final step in determining the distribution of D is to project max{a, B, C} (displayed in Fig. 4) onto the vertical axis, weighting appropriately to account for the distribution of Y. Since lim y 0 B y = /, in order to determine the cdf for D, we must determine the functions F, F, and F associated with the following intervals for the cdf of D : 0 d C y F d C y <d C y F d C y <d F D d = F d <d e d> e... Determining the Distribution of D. In order to determine F, F, and F, it is necessary to find the point of intersection of a horizontal line of height d C y /e with A y, B y, and C y, displayed in Fig. 4. These points of intersection will provide integration limits for determining the distribution of D. Figure 4. D = max A B C for n = and 0 <y /.

Test Statistics for Exponential Populations with Estimated Parameters 403 Solving B y = d, where d satisfies B y d</ yields: y = ( ln d + ) Solving C y = d, where d satisfies C y d C y, yields: y = + ln ( d ) Finally, solving A y = d where d satisfies A y d e, yields: y = ln d The following three calculations yield the limits of integration associated with the functions F, F, and F. For C y <d C y : F D d = F d = Pr D d = ln d + ln d f Y y dy = ln / d d For C y <d /: For / <d /e: F D d = F d = Pr D d = ln d ln d+ f Y y dy ( ) d + / = ln d F D d = F d = Pr D d = ln d 0 = ln d f Y y dy

404 Evans et al. Putting the pieces together, the cdf of D is: 0 d C y ln / d ln d C y <d C y ln d + / ln d C y <d F D d = ln d <d e d> e Differentiating with respect to d, the pdf of D is: d + + d + d ( + d)( d) C y <d C y f D d = d + + d C y <d d <d e which is plotted in Fig. 5. The percentiles of this distribution match the tabled values from Durbin (975). The distribution of D can also be derived using A Probability Programming Language (APPL) (Glen et al., 00). The distribution s exact mean, variance, skewness (expected value of the standardized, centralized third moment), and kurtosis (expected value of the standardized, centralized fourth moment) can be Figure 5. The pdf of D.

Test Statistics for Exponential Populations with Estimated Parameters 405 determined in Maple with the following APPL statements: Y = UniformRV 0 / A = exp y B = exp y / C = / exp y ys = solve B = C y yss = solve A = C y g = unapply B y unapply C y unapply A y 0 ys yss / D = Transform Y g Mean D Variance D Skewness D Kurtosis D The Maple solve procedure is used to find y and y (the variables ys and yss) and the APPL Transform procedure transforms the random variable Y to D using the piecewise segments B, C, and A. The expressions for the mean, variance, skewness, and kurtosis are given in terms of radicals, exponentials, and logarithms, e.g., the expected value of D is: r + 6e ln e + e ln e + er + e ln er e e ln e es s + e ln e + es e where r = e + 6 and s = e 4. The others are too lengthy to display here, but the decimal approximations for the mean, variance, skewness, and kurtosis are, respectively, E D 0 4430, V D 0 000, 3 0 877, and 4 7907. These values were confirmed by Monte Carlo simulation. Example.. Suppose that two data values, x = 95 and x = 00, constitute a random sample from an unknown population. The hypothesis test H 0 F x = F 0 x H F x F 0 x where F 0 x = e x/, is used to test the legitimacy of modeling the data set with an exponential distribution. The mle is ˆ = 95 + 00 / = 97 5. The empirical distribution function, fitted exponential distribution, and corresponding lengths A, B, C, and D are displayed in Fig. 6. The ratio y = x / x + x = 95/95 corresponds to A being the maximum of A, B, C, and D. This yields the test statistic d = e 95/95 0 66

406 Evans et al. Figure 6. The empirical and fitted exponential distribution for two data values x = 95 and x = 00. In this example, y> ln, so the first riser of the empirical cdf is not intersected by the fitted cdf. which falls in the right-hand tail of the distribution of D, as displayed in Fig 7. (The two breakpoints in the cdf are also indicated in Fig. 7.) Hence, the test statistic provides evidence to reject the null hypothesis for the goodness-of-fit test. Since large values of the test statistic lead to rejecting H 0, the p-value associated with this particular data set is: p = F D ( e 95/95 ) = + ln ( [ e 95/95 ]) = 90 95 = 39 0 0564 Figure 7. The cdf of D and the test statistic D = e 95/95.

Test Statistics for Exponential Populations with Estimated Parameters 407 Using the exact pdf of D to determine the p-value is superior to using tables (e.g., Durbin, 975) since the approximation associated with linear interpolation is avoided. The exact pdf is also preferred to approximations (Law and Kelton, 000; Stephens, 974), which often do not perform well for small values of n. Since the distribution of D is not a function of, the power of the hypothesis test as a function of is constant with a value of. Since there appears to be a pattern to the functional forms associated with the three segments of the pdf of D, we derive the distribution of D 3 in the Appendix in an attempt to establish a pattern. The focus of the article now shifts to investigating the distributions of other goodness-of-fit statistics.. Other Measures of Fit The K S test statistic measures the distance between F n x and F x by using the L norm. The square of the L norm gives the test statistic: L = ( Fn x F x ) dx which, for exponential sampling and n = data value, is: L = x ( ) e x/x dx + e x/x dx 0 x ( ) 4 e = x e Since X exponential, L exponential( 4 e ). Unlike the K S test e statistic, the square of the L norm is dependent on. For exponential sampling with n =, the square of the L norm is also dependent on : L = ( F x F x ) dx = = = 0 x 0 x 0 x 0 x ( F x dx + F x dx + x ) ( ) x ( e x/ x +x dx + x ( ) x e x/ x +x dx + x e x/ x +x ( 4 e x/ x +x x ( F x ) dx ) ( dx + ) e x/ x +x dx x ) dx + = x + x + x (e x / x +x + e ) x / x +x 0 e 4x/ x +x dx where X exponential and X has pdf f X x = e x/ ( e x/ ), x>0. Unlike the square of the L norm, the Cramer von Mises and Anderson Darling test statistics (Lawless, 003) are distribution-free. They can be defined as: W n = n ( Fn x F x ) d F x

408 Evans et al. and ( A n = n Fn x F x ) F x F x d F x where n is the sample size. The computational formulas for these statistics are: ( n W n = i= F x i i 0 5 n ) + n and A n = n i= i n ( ) ln F x i + ln F x n+ i n.. Distribution of W and A for Exponential Sampling When n = and sampling is from an exponential population, the Cramer von Mises test statistic is: W = ( e ) + = 3 e + e Thus, the Cramer von Mises test statistic is degenerate for n = with cdf: 0 w 3 e + e F W w = w> 3 e + e When n = and sampling is from an exponential population, the Anderson Darling test statistic is: A = ln e ln e = ln e It is also degenerate for n = with cdf: 0 a ln e F A a = a> ln e.. Distribution of W and A for Exponential Sampling When n = and sampling is from an exponential population, the Cramer von Mises test statistic is: ( W = e x /ˆ 3 ) ( + e x /ˆ ) + 4 4 4

Test Statistics for Exponential Populations with Estimated Parameters 409 where ˆ = x + x /. The Anderson Darling test statistic is: A = ln ( e x /ˆ ) 3 ln ( e x /ˆ ) If we let y = x / x + x, as we did when working with D, we obtain the following formulas for W and A in terms of y: and ( W = e y 3 ) ( + e y ) + 4 4 4 A = ln ey 3 ln e y for 0 <y /. Graphs of D, W, and A are displayed in Fig. 8. Although the ranges of the three functions are quite different, they all share similar shapes. Each of the three functions plotted in Fig. 8 achieves a minimum between y = 0 5 and y = 0. The Cramer von Mises test statistic W achieves a minimum at y that satisfies 4e 4y 3e y 4e 4 y + e y = 0 for 0 <y /. This is equivalent to fourth-degree polynomial in e y that can be solved exactly using radicals. The minimum is achieved at y 0 549. Likewise, the Anderson Darling test statistic A achieves a minimum at y that satisfies e y + e 3e y = 0 Figure 8. Graphs of D, W, and A for n = and 0 <y /.

40 Evans et al. for 0 <y /, which yields y = + ln ( e + 3 e ) 0 583 These values and other pertinent values associated with D, W, and A are summarized in Table. Figure 8 can be helpful in determining which of the three goodness-offit statistics is appropriate in a particular application. Consider, for instance, a reliability engineer who is interested in detecting whether reliability growth or reliability degradation is occurring for a repairable system. One would expect a shorter failure time followed by a longer failure time if reliability growth were occurring; one would expect a longer failure time followed by a shorter failure time if reliability degradation were occurring. In either case, these correspond to a small value of y, so Fig. 8 indicates that the Anderson Darling test is preferred due to the vertical asymptote at y = 0. For notational convenience below, let D y, W y, and A y denote the values of D, W, and A, respectively, corresponding to a specific value of y. For example, W /4 denotes the value of W when y = /4. Example.. Consider again the data from Example.: x = 95 and x = 00. Since y = 95/95 = 9/39, the Cramer von Mises test statistic is: w = ( e 38/39 3/4 ) + ( e 40/39 /4 ) + /4 0 93 The p-value for this test statistic is the same as the p-value for the K S test statistic, namely: / 9/39 f Y y dy = / 9/39 dy = /39 0 056 More generally, for each value of y such that both D y >D 0 and W y > W 0 : F D D y = F Y y = F W ( W y ) Table Pertinent values associated with the test statistics D, W, and A Test Value when Minimized Global minimum Value when statistic y = 0 at on 0 / y = / D y 0 8 D y 0 305 e 0 63 W 6 + e 4 e y 0 549 W y 0 0463 + 0 06 e e 3 0 73 A + y 0 583 A y 0 769 ln e 0 974

Test Statistics for Exponential Populations with Estimated Parameters 4 The Anderson Darling test statistic for x = 95 and x = 00 is: a = ln e38/39 3 ln e40/39 0 8774 Since the value of A y exceeds the test statistic a 0 8774 only for y<y = 0 0044 (where y is the first intersection point of A y and the horizontal line with height A 9/39 ) and for y>9/39, the p-value for the Anderson Darling goodness-of-fit test is given by: y / p = dy + dy 0 9/39 = y + 38/39 0 06654... Determining the Distribution of W and A. As was the case with D,wecan find exact expressions for the pdfs of W and A. Consider W first. For w values in the interval W y w<w 0, the cdf of W is: F W w = P W w = y y f Y y dy = y y where y and y are the ordered solutions to W y = w. For w values in the interval W 0 w<w /, the cdf of W is: F W w = P W w = y 0 = y f Y y dy where y is the solution to W y = w on 0 <y</. The following APPL code can be used to find the pdf of W : Y = UniformRV 0 / W = exp y 3/4 + exp y /4 + /4 ysss = solve diff W y = 0 y g = unapply W y unapply W y 0 ysss / W = Transform Y g The Transform procedure requires that the transformation g be input in piecewise monotone segments. The resulting pdf for W is too lengthy to display here.

4 Evans et al. Now consider A. For a value in the interval A y a<a /, the cdf of A is: F A a = P A a = y y f Y y dy = y y where y and y are the ordered solutions to A y = a on 0 <y /. For a values in the interval A / a<, the cdf of A is: F A a = P A a = / y = y f Y y dy where y is the solution to A y = a on 0 <y</. The following APPL code can be used to find the pdf of A : Y = UniformRV 0 / A = ln exp y / 3 log exp y / yssss = solve diff A y = 0 y g = unapply A y unapply A y 0 yssss / A = Transform Y g The resulting pdf for A is again too lengthy to display here. 3. Applications Although statisticians prefer large sample sizes because of the associated desirable statistical properties of estimators as the sample size n becomes large, there are examples of real-world data sets with only n = observations where the fit to an exponential distribution is important. In this section, we focus on two applications: U.S. Space Shuttle flights and the world-wide commercial nuclear power industry. Both applications involve significant government expenditures associated with decisions that must be made based on limited data. In both cases, events are failures and the desire is to test whether a homogeneous Poisson process model or other (e.g., a non homogeneous Poisson process) model is appropriate, i.e., determining whether failures occur randomly over time. Deciding which of the models is appropriate is important to reliability engineers since a non homogeneous Poisson process with a decreasing intensity function may be a sign of reliability growth or improvement over time (Rigdon and Basu, 000).

Test Statistics for Exponential Populations with Estimated Parameters 43 Example 3.. NASA s Space Shuttle program has experienced n = catastrophic failures which have implications for the way in which the United States will pursue future space exploration. On January 8, 986, the Challenger exploded 7 seconds after liftoff. Failure of an O-ring was determined as the most likely cause of the accident. On February, 003, Shuttle Columbia was lost during its return to Earth. Investigators believed that tile damage during ascent caused the accident. These two failures occurred on the 5th and 3th Shuttle flights. A goodnessof-fit test is appropriate to determine whether the failures occurred randomly, or equivalently, whether a Poisson process model is appropriate. The hope is that the data will fail this test due to the fact that reliability growth has occurred due to the many improvements that have been made to the Shuttle (particularly after the Challenger accident), and perhaps a non homogeneous Poisson process with a decreasing intensity function is a more appropriate stochastic model for failure times. Certainly, large amounts of money have been spent and some judgments about the safety and direction of the future of the Shuttle program should be made on the basis of these two data values. The appropriate manner to model time in this application is nontrivial. There is almost certainly increased risk on liftoff and landing, but the time spent on the mission should also be included since an increased mission time means an increased exposure to internal and external failures while a Shuttle is in orbit. Because of this inherent difficulty in quantifying time, we do our numerical analysis on an example in an application area where time is more easily measured. Example 3.. The world-wide commercial nuclear power industry has experienced n = core meltdowns in its history. The first was at the Three Mile Island nuclear facility on March 8, 979. The second was at Chernobyl on April 6, 986. As in the case of the Space Shuttle accidents, it is again of interest to know whether the meltdowns can be considered to be events from a Poisson process. The hypothesis test of interest here is whether the two times to meltdown are independent observations from an exponential population with a rate parameter estimated from data. Measuring time in this case is not trivial because of the commissioning and decommissioning of facilities over time. The first nuclear power plant was the Calder Hall I facility in the United Kingdom, commissioned on October, 956. Figure 9 shows the evolution of the number of active commercial reactors between that date and the Chernobyl accident on April 6, 986. The commissioning and decommissioning dates of all commercial nuclear reactors is given in Cho and Spiegelberg-Planer (00). Downtime for maintenance has been ignored in determining the times of the two accidents. Using the data illustrated in Fig. 9, the time of the two accidents measured in cumulative commercial nuclear reactor years is found by integrating under the curve. The calendar dates were converted to decimal values using Julian dates, adjusting for leap years. The two accidents occurred at 548.0 and 337.7 cumulative operating years, respectively. This means that the hypothesis test is to see whether the times between accidents, namely 548.0 and 337 7 548 0 = 84 5 can be considered independent observations from an exponential population. The maximum likelihood estimator for the mean time between core meltdowns is ˆ = 686 4 years. This results in a y-value of y = 548 0/ 548 0 +

44 Evans et al. Figure 9. Number of operating commercial nuclear power plants world-wide between October, 956 and April 6, 986. 84 5 = 0 459 and a K S test statistic of d = 0 60. This corresponds to a p-value for the associated goodness-of-fit test of p = + ln d = 0 08. There is not enough statistical evidence to conclude a nonhomogeneous model is appropriate here, so it is reasonable to model nuclear power accidents as random events. Figure 0 shows a plot of the fitted cumulative distribution function and associated values of A, B, C, and D for this data set. Figure 0. The empirical and fitted exponential distribution for the two times between nuclear reactor meltdowns (in years), x = 548 0 and x = 84 5.

Test Statistics for Exponential Populations with Estimated Parameters 45 Appendix: Distribution of D 3 for Exponential Sampling This Appendix contains a derivation of the distribution of the K S test statistic when n = 3 observations x, x, and x 3 are drawn from an exponential population with fixed, positive, unknown mean. The maximum likelihood estimator is ˆ = x + x + x 3 /3, which results in the fitted cdf: F x = e x/ˆ x>0 Analogous to the n = case, define and so that x y = x + x + x 3 x z = x + x + x 3 y z = The domain of definition of y and z is: x 3 x + x + x 3 = y z 0 <y<z< y / The values of the fitted cdf at the three order statistics are: F x = e x /ˆ = e 3y F x = e x /ˆ = e 3z and F x 3 = e x 3 /ˆ = e 3 y z The vertical distances A, B, C, D, E, and F (as functions of y and z) are defined in a similar fashion to the n = case (see Fig. ): A = e 3y B = 3 ( e 3y) = e 3y 3 C = ( ) e 3z 3 = e 3z 3 D = 3 ( e 3z) = e 3z 3

46 Evans et al. E = ( ) e 3 y z 3 = e 3 y z 3 F = ( e 3 y z ) = e 3 y z for y z. Figure shows the regions associated with the maximum of A, B, C, D, E, F for y z. In three dimensions, with D 3 = max A B C D E F as the third axis, this figure appears to be a container with the region E at the bottom of the container and with each of the other four sides rising as they move away from their intersection with E. The absolute value signs that appear in the final formulas for B, C, D, and E above can be easily removed since, over the region associated with D 3, the expressions within the absolute value signs are always positive for B and D, but always negative for C and E. The distance F is never the largest of the six distances for any y z, so it can be excluded from consideration. Table gives the functional forms of the two-way intersections between the five regions shown in Fig.. Note that the BC and AD curves, and the AC and BD curves, are identical. In order to determine the breakpoints in the support for D 3, it is necessary to find the y z coordinates of the three-way intersections of the five regions in Fig. and the two-way intersections of the regions on the boundary of. Table 3 gives the values of y and z for these breakpoints on the boundary of, along with the value of D 3 = max A B C D E F at these values, beginning at y z = 0 / and proceeding in a counterclockwise direction. One point has been excluded from Figure. Regions associated with max A B C D E F over y z.

Test Statistics for Exponential Populations with Estimated Parameters 47 Table Intersections of regions A, B, C, D, and E in AD z = ln ( 4 e 3y) 3 3 BD z = ln ( ) e 3y 3 3 BC z = ln ( 4 e 3y) 3 3 AC z = ln ( ) e 3y 3 3 AE z = ln [ e 3 y ( )] e 3y 3 3 DE z = ln [ e3 y ( 9e 3 y )] 3 3 BE z = ln [ e 3 y ( e 3y)] 3 CE z = ln [ e3 y ( + + 36e 3 y )] 3 6 Table 3 because of the intractability of the values y z. The three-way intersection between regions A, C, and the line z = y / can only be expressed in terms of the solution to a cubic equation. After some algebra, the point of intersection is the decimal approximation y z 0 608 0 496 and the associated value of D 3 is /3 minus the only real solution to the cubic equation which yields 3d 3 + d 3e 3 = 0 d AC = 7 9 8 96e 3 8 + c /3 9 96e 3 8 + c /3 0 387 where c = 08 79e 6 4e 3. The three-way intersection points in the interior of are more difficult to determine than those on the boundary. The value of D 3 associated with each of these four points is the single real root of a cubic equation on the support of D 3. These equations and approximate solution values, in ascending order, are given in Table 4. For example, consider the value of the maximum at the intersection of regions A, Table 3 Intersection points along the boundary of y z D 3 0 / /3 e 3/ 0 4435 0 ln 3 /3 /3 0 3333 0 ln 3/ /3 /3 0 3333 0 0 /3 0 6667 ln 3/ /3 ln 3/ /3 /3 0 3333 /3 / /e 0 63

48 Evans et al. Table 4 Three-way interior intersection points of regions A, B, C, D, and E in Regions Cubic equation Approximate solution ACE e 3 d ( d)( d) = d 3 3 ACE 0 000 BCE e 3( d)( d + 3 3)( d) = d 3 BCE 0 09 ADE e 3( d)( d + 3 3) d = dade 0 78 BDE e 3( )( d + 3 d + 3)( d) = d 3 BDE 0 366 C, and E in Fig.. The value of D 3 must satisfy the cubic equation: ( )( ) e 3 d 3 d 3 d = which yields d ACE = 43 + c /3 /3 c 43 43 + c /3 /3 + 44e 5 4/3 e 4 43 + c /3 6e 5 0 9998 where c = 59049 e 6. The largest value of D 3 = max A B C D E on occurs at the origin (y = 0 and z = 0) and has value /3, which is the upper limit of the support of D 3. The smallest value of D 3 on occurs at the intersection ACE and is d ACE 0 9998, which is the lower limit of the support of D 3. Determining the Joint Distribution of Y and Z The next step is to determine the distribution of Y = X / X + X + X 3 and Z = X / X + X + X 3. Using an order statistic result from Hogg et al. (005, p. 93), the joint pdf of X, X, and X 3 is: g x x x 3 = 3! 3 e x +x +x 3 / 0 <x x x 3 In order to determine the joint pdf of Y = X / X + X + X 3 and Z = X / X + X + X 3, define the dummy transformation W = X 3. The random variables Y, Z, and W define a one-to-one transformation from = x x x 3 0 <x x x 3 to B = y z w 0 <y<z< y / w>0. Since x = yw/ y z, x = zw/ y z, and x 3 = w, and the Jacobian of the inverse transformation is w / y z 3, the joint pdf of Y, Z, and W on B is: h y z w = 6 yw+zw e y z +w / w 3 y z 3

Test Statistics for Exponential Populations with Estimated Parameters 49 w = 6 3 y z 3 e w y z y z w B Integrating by parts, the joint density of Y and Z on is: 6 f Y Z y z = w e w y z dw = 3 y z 3 0 y z w i.e., Y and Z are uniformly distributed on. Determining the Distribution of D 3 The cdf of D 3 will be defined in a piecewise manner, with breakpoints at the following ordered quantities: d ACE, d BCE, d ADE, d BDE,/3, d AC, 3 e 3/,, and e /3. The cdf F D3 d = Pr D 3 d is found by integrating the joint pdf of Y and Z over the appropriate limits, yielding: 0 d d ACE [ ln 3 3 ln d> 3 ( e 3 d [ e 6 d [ ][ ])] 3 d 3 d d ACE <d d BCE ) ( )( ) ] ( 3 d d BCE <d d ADE ( ) ( d + /3 d + /3 ln /3 d d 3 + d 4 3 ln d ADE <d d BDE ( ) ( ) 4 d + /3 d + /3 3 ln ln /3 d d F D3 d = ( /3 d 4 3 ln 3 d + /3 [ ln ) ln d 3 3 d ( ) d ln /3 + d ) [ [ ln (e 3 d + ][ d + ][ ])] 3 3 3 3 d d BDE <d 3 ( )] d + /3 d 3 <d d AC [ + 3 ( )] 3 ln d [ ln ( d + 3)] + ln d 3 d AC <d 3 e 3/ 3 3 [ ( ln d + )] + ln d 3 3 e 3/ <d e [ ( ln d + )] e <d 3 3 which is plotted in Fig.. Dots have been plotted at the breakpoints, with each of the lower four tightly-clustered breakpoints from Table 4 corresponding to

40 Evans et al. Figure. The cdf of D 3. a horizontal plane intersecting one of the four corners of region E in Fig.. Percentiles of this distribution match the tabled values from Durbin (975). We were not able to establish a pattern between the cdf of D and the cdf of D 3 that might lead to a general expression for any n. APPL was again used to calculate moments of D 3. The decimal approximations for the mean, variance, skewness, and kurtosis, are, respectively, E D 3 0 377, V D 3 0 008804, 3 0 454, and 4 6538. These values were confirmed by Monte Carlo simulation. Although the functional form of the eight-segment PDF of D 3 is too lengthy to display here, it is plotted in Fig. 3, with the only non obvious breakpoint being on the initial nearly-vertical segment at d BCE f D3 d BCE 0 09 564. Figure 3. The pdf of D 3.

Test Statistics for Exponential Populations with Estimated Parameters 4 Acknowledgments The first author acknowledges summer support from Rose Hulman Institute of Technology. The second and third authors acknowledge FRA support from the College of William & Mary. The authors also acknowledge the assistance of Bill Griffith, Thom Huber, and David Kelton in selecting data sets for the case studies. References Cho, S. K., Spiegelberg-Planer, R. (00). Country nuclear power profiles. http://www-pub. iaea.org/mtcd/publications/pdf/cnpp003/cnpp_webpage/pdf/00/index.htm Accessed August, 004. D Agostino, H., Stephens, M. (986). Goodness-of-Fit Techniques. New York: Marcel Dekker. Drew, J. H., Glen, A. G., Leemis, L. M. (000). Computing the cumulative distribution function of the Kolmogorov Smirnov statistic. Computational Statistics and Data Analysis 34: 5. Durbin, J. (975). Kolmogorov Smirnov tests when parameters are estimated with applications to tests of exponentiality and tests on spacings. Biometrika 6:5. Glen, A. G., Evans, D. L., Leemis, L. M. (00). APPL: a probability programming language. The American Statistician 55:56 66. Hogg, R. V., McKean, J. W., Craig, A. T. (005). Mathematical Statistics. 6th ed. Upper Saddle River, NJ: Prentice Hall. Law, A. M., Kelton, W. D. (000). Simulation Modeling and Analysis. 3rd ed. New York: McGraw-Hill. Lawless, J. F. (003). Statistical Models and Methods for Lifetime Data. nd ed. New York: John Wiley & Sons. Lehmann, E. L. (959). Testing Statistical Hypotheses. New York: John Wiley & Sons. Lilliefors, H. (969). On the Kolmogorov Smirnov test for the exponential distribution with mean unknown. Journal of the American Statistical Association 64:387 389. Marsaglia, G., Tsang, W. W., Wang, J. (003). Evaluating Kolmogorov s distribution. Journal of Statistical Software 8:8. URL: http://www.jstatsoft.org/v08/i8/ Rigdon, S., Basu, A. P. (000). Statistical Methods for the Reliability of Repairable Systems. New York: John Wiley & Sons. Stephens, M. A. (974). EDF statistics for goodness of fit and some comparisons. Journal of the American Statistical Association 69:730 737.