1 Introduction

It is well known that, the exponential distribution is one of the fundamental lifetime models and is widely used for describing a failure mechanism of a system. Applications of this distribution in survival analysis and reliability theory are presented in statistical literature. Therefore, there is a clear need to check whether the exponential distribution is a reasonable model for the observations.

Many investigators have been interested in testing exponentiality and then different tests are developed for exponentiality in the literature. For example, see D’Agostino and Stephens [8] and Huber-Carol et al. [15]. Moreover, Ebrahimi [11, 12], Balakrishnan et al. [4, 5], Park [22], Lim and Park [18], Lin et al. [19], Habibi Rad et al. [14], and Pakyari and Balakrishnan [20, 21] developed some tests based on censored samples.

Recently, Zhang [27] introduced three test statistics based on the likelihood ratio and used them for testing normality and showed that these tests have higher power than the competitor tests. In the present paper, we apply these test statistics to test the hypothesis of exponentiality against a wide variety of alternative hypotheses.

In Sect. 2, we introduce three exponentiality tests based on the likelihood-ratio. The properties of the test statistics are discussed. Also, the critical values of the test statistics are obtained by Monte Carlo simulations. In Sect. 3, the power values of the proposed tests are computed and then compared with the power values of the recent published exponentiality tests. All simulations were carried out by using R 3.0.2 and with 30,000 replications. Section 4 contains applications of the tests in real examples.

2 Testing Exponentiality

Suppose \(X_1 ,\ldots ,X_n \) are a random sample from a continuous probability distribution F with density f over a non-negative support and with mean \(\upmu <\infty \). We are interested to test the hypothesis

$$\begin{aligned} H: F(x)=F_0 (x)=1-\exp (-\lambda x), \qquad \mathrm{for} \, \mathrm{all}\; x\in (0,\infty ), \end{aligned}$$

against the general alternative

$$\begin{aligned} {\bar{H}}: F(x)\ne F_0 (x) , \qquad \mathrm{for} \, \mathrm{some} \;x\in (0,\infty ). \end{aligned}$$

where \(\lambda =1/\upmu \) is unspecified.

Let \(H_t : F(t)=F_0 (t)=1-\exp (-\lambda t),\) and \({\bar{H}}_t : F(t)\ne F_0 (t)\). According to Zhang [27], testing H vs \({\bar{H}}\) is equivalent to testing \(H_t \) vs \({\bar{H}}_t \) for every \(t\in (0,\infty )\) in the sense that

$$\begin{aligned} H=\bigcap _{t\in (0,\infty )} {H_t }\quad \hbox {and}\quad {\bar{H}}=\bigcup _{t\in (0,\infty )} {{\bar{H}}_t }. \end{aligned}$$

Zhang [27] defined a binary random sample to test \(H_t\) vs. \({\bar{H}}_t \) for each t;

$$\begin{aligned} X_{it} =I\left( {X_i \le t} \right) \quad i=1,2,\ldots ,n, \end{aligned}$$

where \(P\left( {X_{it} =1} \right) =F(t)\) and \(P\left( {X_{it} =0} \right) =1-F(t)\).

Let \(Z_t \) denotes a statistic based on \(X_{it} \) for testing \(H_t \) vs \({\bar{H}}_t \) where large values of \(Z_t \) reject \(H_t \). For testing H vs \({\bar{H}}\), Zhang [26, 27] proposed two test statistics given by

$$\begin{aligned} Z=\int {Z_t dw(t)} \quad \hbox {and}\quad Z_{\max } =\mathop {\sup }\limits _{t\in (0,\infty )} \left[ {Z_t w(t)} \right] , \end{aligned}$$

where w(t) is some weight function. Also, large values of these statistics reject H.

Zhang [27] for \(Z_t \) considered Pearson’s Chi squared statistic

$$\begin{aligned} X_t^2 =\frac{n\left[ {F_n (t)-F_0 (t)} \right] ^{2}}{F_0 (t)\left[ {1-F_0 (t)} \right] }, \end{aligned}$$

and the likelihood ratio statistic

$$\begin{aligned} G_t^2 =2n\left\{ {F_n (t)\log \frac{F_n (t)}{F_0 (t)}+\left[ {1-F_n (t)} \right] \log \frac{1-F_n (t)}{1-F_0 (t)}} \right\} , \end{aligned}$$

where \(F_n (t)\) is the empirical distribution function.

Zhang [27] chose \(Z_t =X_t^2 \) with

$$\begin{aligned} w(t)=n^{-1}F_0 (t)\left[ {1-F_0 (t)} \right] , \quad dw(t)=n^{-1}F_0 (t)\left[ {1-F_0 (t)} \right] dF_0 (t), \end{aligned}$$

and \(w(t)=F_0 (t)\). Next, he obtained traditional Kolmogorov–Smirnov, Cramer–von Mises and Anderson–Darling statistics. Moreover, he considered \(Z_t =G_t^2 \) with \(w(t)=1\), \(dw(t)=F_0 (t)^{-1}\left[ {1-F_0 (t)} \right] ^{-1}dF_0 (t)\) and \(dw(t)=F_n (t)^{-1}\left[ {1-F_n (t)} \right] ^{-1}dF_n (t)\), respectively, and further, \(F_n (X_{(i)} )=\frac{i-0.5}{n}\). Thus, he obtained the following statistics:

$$\begin{aligned}&\displaystyle Z_A =-\sum _{i=1}^n \left( {\frac{\log F_0 (X_{(i)} )}{n-i+0.5}+\frac{\log \left[ {1-F_0 (X_{(i)} )} \right] }{i-0.5}} \right) ,\\&\displaystyle Z_C =\sum _{i=1}^n {\left( {\log \left\{ {\frac{F_0 (X_{(i)} )^{-1}-1}{{(n-0.5)}/{(i-0.75)}-1}} \right\} } \right) ^{2}},\\&\displaystyle Z_K =\mathop {\max }\limits _{1\le i\le n} \left( {\left( {i-0.5} \right) \log \left\{ {\frac{i-0.5}{nF_0 (X_{(i)} )}} \right\} +\left( {n-i+0.5} \right) \log \left\{ {\frac{n-i+0.5}{n(1-F_0 (X_{(i)} ))}} \right\} } \right) , \end{aligned}$$

where \(X_{(1)} \le X_{(2)} \le \ldots \le X_{(n)} \) are the order statistics based on \(X_1 ,\ldots ,X_n \).

It is obvious that for large values of the test statistics the null hypothesis H will be rejected.

Here, we consider \(F_0 (x)=1-\exp (-\lambda x),\) that is, the exponential family with unknown parameter and then compared the performance of the tests with the recent exponentiality tests. Note that the likelihood ratio tests are distribution-free for the exponential family.

It is clear that we need to estimate the scale parameter first and then we can apply the tests. We estimate \(\lambda \) by the sample mean \({\bar{X}}=\frac{1}{n}\sum \nolimits _{i=1}^n {X_i } \) and thus, \({\hat{\lambda }}=1/{\bar{X}}\).

The test statistics are invariant under any affine transformation on the sample data (see Zhang [27]). Therefore, they are distribution-free within the exponential distribution family.

For different sample sizes, the critical values of the tests are obtained by Monte Carlo simulations. These values are presented in Table 1.

In the next section, the power values of \(Z_A , Z_C \) and \(Z_K \) are compared with the best existing tests, namely Cramer–von Mises [24], Kolmogorov–Smirnov [16], Anderson–Darling [3], Sahpiro–Wilk [23], Ebrahimi et al. [13], Alizadeh Noughabi and Arghami [1], Baratpour and Habibi Rad [6], Dhumal and Shirk [10] tests.

Table 1 Critical values of the \(Z_A \), \(Z_C \), \(Z_K \) statistics

3 Power Study

In this section, the power values of the likelihood ratio tests are computed and compared with the other tests. We consider the following tests in power comparisons.

  1. 1.

    The Cramer–von Mises statistic [24]:

    $$\begin{aligned} W^{2}=\frac{1}{12n}+\sum _{i=1}^n {\left( {\frac{2i-1}{2n}-F_0 (X_{(i)} )} \right) } ^{2} . \end{aligned}$$
  2. 2.

    The Kolmogorov–Smirnov statistic [16]:

    $$\begin{aligned} D=\max (D^{+},D^{-}). \end{aligned}$$

    where

    $$\begin{aligned} D^{+}=\mathop {\max }\limits _{1\le i\le n} \left\{ {\frac{i}{n}-F_0 (X_{(i)} )} \right\} ; D^{-}=\mathop {\max }\limits _{1\le i\le n} \left\{ {F_0 (X_{(i)} )-\frac{i-1}{n}} \right\} . \end{aligned}$$
  3. 3.

    The Anderson–Darling statistic [3]:

    $$\begin{aligned} A^{2}=-n-\frac{1}{n}\sum _{i=1}^n {(2i-1)\left\{ {\log F_0 (X_{(i)} )+\log \left[ {1-F_0 (X_{(n-i+1)} )} \right] } \right\} } . \end{aligned}$$
  4. 4.

    The Shapiro–Wilk statistic [23]:

    $$\begin{aligned} SW=\frac{n({\bar{X}}-X_{(1)} )^{2}}{(n-1)S^{2}}. \end{aligned}$$
  5. 5.

    Ebrahimi et al. statistic [13] based on entropy:

    $$\begin{aligned} {\textit{KL}}=-{\textit{HV}}_{mn} +\log ({\bar{X}})+1 , \end{aligned}$$

    where

    $$\begin{aligned} {\textit{HV}}_{nm} =\frac{1}{n}\sum _{i=1}^n {\log \left( {\frac{n}{2m}\left( {X_{\left( {i+m} \right) } -X_{\left( {i-m} \right) } } \right) } \right) } . \end{aligned}$$
  6. 6.

    Alizadeh Noughabi and Arghami statistic [1]:

    $$\begin{aligned} T=\frac{1}{{n}'}\sum _{i=1}^{{n}'} {\left| {Y_i {\hat{f}}(Y_i )-F_0 (Y_i )} \right| } , \end{aligned}$$

    where \({n}'=n(n-1)\), \(Y_{ij} =\frac{X_{(i)} }{X_{(i)} +X_{(j)} } , i\ne j ,\quad i,j=1,2,\ldots ,n,\) and

    $$\begin{aligned} {\hat{f}}(x_i )=\frac{1}{nh}\sum _{j=1}^n {K(\frac{x_i -x_j }{h})} . \end{aligned}$$
  7. 7.

    Baratpour and Habibi Rad statistic [6]:

    $$\begin{aligned} {\textit{CKL}}=\frac{\sum \limits _{i=1}^{n-1} {\frac{n-i}{n}\left( {\log \frac{n-i}{n}} \right) } \left( {X_{(i+1)} -X_{(i)} } \right) +{\sum \limits _{i=1}^n {X_i^2 } }/{2\sum \limits _{i=1}^n {X_i } }}{{\sum \limits _{i=1}^n {X_i^2 } }/{2\sum \limits _{i=1}^n {X_i } }} . \end{aligned}$$
  8. 8.

    Dhumal and Shirke statistic [10]:

    $$\begin{aligned} {\textit{TDS}}=\frac{1}{n(n-1)}\sum _{i=1}^{n(n-1)} {\left| {{\hat{f}}(Y_i )-f_0 (Y_i )} \right| } . \end{aligned}$$

To facilitate the comparison of the power values of the proposed tests with those of the existing tests, we selected the same alternatives listed in Alizadeh Noughabi and Arghami [2] and their choices of parameters:

  • the Weibull distribution with density \(\uptheta x^{\uptheta -1}\exp \left( {-x^{\uptheta }} \right) \), denoted by \(W(\uptheta )\),

  • the gamma distribution with density \(\Gamma (\uptheta )^{-1}x^{\uptheta -1}\exp \left( {-x} \right) \), denoted by \(\Gamma (\uptheta )\),

  • the lognormal law \({\textit{LN}}(\uptheta )\) with density \((\uptheta x)^{-1}(2\pi )^{-1/2}\exp \left( {-{(\log x)^{2}}/{(2\uptheta ^{2})}} \right) \),

  • the half-normal \({\textit{HN}}\) distribution with density \(\Gamma (2/\pi )^{1/2}\exp \left( {-{x^{2}}/2} \right) \),

  • the uniform distribution U with density \(1, 0\le x\le 1\),

  • the modified extreme value \(EV(\uptheta )\), with distribution function \(1-\exp \left( {\uptheta ^{-1}(1-e^{x})} \right) \),

  • the linear increasing failure rate law \(LF(\uptheta )\) with density \((1+\uptheta x)\exp \left( {-x-\uptheta {x^{2}}/2} \right) \),

  • Dhillon’s [9] law \(DL(\uptheta )\) with distribution function \(1-\exp \left( {-\left( {\log (x+1)} \right) ^{\uptheta +1}} \right) \),

  • Chen’s [7] distribution \(CH(\uptheta )\), with distribution function \(1-\exp \left( {2\left( {1-e^{x^{\uptheta }}} \right) } \right) \).

Alizadeh Noughabi and Arghami [2] used these alternatives in their study of power comparisons of several tests for exponentiality. The considered alternatives comprise of widely used alternatives to the exponential model. Also, the considered alternatives include densities f with decreasing hazard rates (DHR) \({f(x)}/{[1-F(x)]}\), increasing hazard rates (IHR) as well as models with non-monotone hazard functions.

We estimated the powers of the present tests based on 30,000 samples of size n equal to 10 and 20. Table 2 shows the estimated powers at the significance level \(\upalpha =0.05\).

For each alternative, the bold type in Table 2 indicates the test achieving the maximal power.

Table 2 Monte Carlo power estimates of the tests at 5 % significant level

From Table 2, we can not determine the best test in term of power for testing exponentiality against all alternatives. We observe that for some alternatives, the tests \(A^{2}\), T and \({\textit{CKL}}\) are powerful. But for other alternatives these tests are not powerful. For example, let \(n=20\) and alternative be \(\Gamma (2)\), the power of \(A^{2}\) is 0.458 and it is not powerful but the power of T is 0.627 and is a powerful test. If we look at the power of the proposed tests we can see that the power of \(Z_A \) is 0.578 and the difference between power of this test with the powerful test is small. For another example, let \(n=20\) and alternative be W(0.8), the power of T and \({\textit{CKL}}\) are 0.006 and 0.079 and they are not powerful but the power of \(A^{2}\) is 0.273 and is powerful test. The power values of the proposed tests are not very low, for example, the power of the \(Z_K \) is 0.221.

Therefore, from the above discussion, we can conclude that the power values of the proposed tests are not very low and also very high. But the proposed tests have a reasonable power (it is not very low and not high) for all types of alternatives. Then, if we don’t have any information about the alternative (e.g., DHR, IHR, and etc.), it is reasonable to use the proposed tests because we will obtain a good power (not high or low).

Further, from the power values in Table 2, we observe that the \({\textit{KL}}\), T, \({\textit{TDS}}\) and \({\textit{CKL}}\) tests are not unbiased tests but the EDF-tests and the proposed tests are unbiased.

For testing normality, Zhang and Wu [28] concluded that the likelihood ratio tests are very powerful and robust for various kinds of departures from normality. In terms of power performance, the overall ranks of the considered statistics by Zhang [27] are:

$$\begin{aligned} Z_A \succ Z_C \succ SW\succ Z_K \succ A^{2}\succ D. \end{aligned}$$

For exponentiality test, we can not exactly rank the tests in term of power performance but we observed that they have good powers against all types of alternatives and therefore the proposed tests are recommended in practice.

4 Applications to Real Data

In this section, two real data sets to illustrate how the proposed tests can be applied in real cases are presented. Figure 1 presents the histograms of these data sets.

Example 1

The times between arrivals of 25 customers at a facility presented by Wadsworth [25] are considered. The data are

1.80, 3.43, 3.98, 4.23, 4.65, 2.89, 3.48, 4.06, 4.34, 4.84, 2.93, 3.57, 4.11, 4.37, 4.91, 3.03, 3.85, 4.13, 4.53, 4.99, 3.15, 3.92, 4.16, 4.62, 5.17.

Their quantile plot shows a clear departure from the exponentiality hypothesis. Here, we use all tests for hypothesis of exponentiality. For the proposed tests, we obtain

$$\begin{aligned} Z_A =6.105 , Z_C =82.207 , Z_K =15.596 , \end{aligned}$$

and the critical values at 5 % significance level are 3.558, 16.593 and 2.702, respectively. Hence, we conclude that the data don’t follow an exponential distribution. The other tests \(A^{2}, D, W^{2}, {\textit{KL}}, {\textit{SW}}, {\textit{CKL}}, T\) and \({\textit{TDS}}\), like the proposed tests, reject the null hypothesis.

Fig. 1
figure 1

Histogram for data sets in Examples 1 and 2

Example 2

The following data are failure times for 36 appliances subjected to an automatic life test. These data are obtained from one real-life data analysis from Lawless [17].

11, 35, 49, 170, 329, 381, 708, 958, 1062, 1167, 1594, 1925, 1990, 2223, 2327, 2400, 2451, 2471, 2551, 2565, 2568, 2694, 2702, 2761, 2831, 3034, 3059, 3112, 3214, 3478, 3504, 4329, 6367, 6976, 7846, 13403.

Ebrahimi et al. [13] based on the sample entropy fitted the exponential distribution for the data successfully. Recently, the same conclusion has been drawn by Baratpour and Habibi Rad [6].

For this data set the values of the proposed test statistics are computed as

$$\begin{aligned} Z_A =3.421 , Z_C =10.264 , Z_K =2.468. \end{aligned}$$

For 5 % significance level, the critical values for \(Z_A , Z_C \) and \(Z_K \) are 3.494, 17.659 and 2.910, respectively. Since the value of the test statistics are less than the critical values, the tests accept the null hypothesis that failure times follow an exponential distribution.

Moreover, if we consider the other tests we will see that the tests \(A^{2}, D, W^{2}, T\) and \({\textit{TDS}}\) reject the null hypothesis but the tests \({\textit{KL}}, {\textit{SW}}\) and \({\textit{CKL}}\), like the proposed tests, don’t reject the exponential hypothesis.

5 Conclusions

In this article, we have proposed tests of exponentiality based on the likelihood ratio. The critical points of the test statistics have obtained by Monte Carlo simulations. The power values of the proposed tests have computed against a wide variety of alternative hypotheses and then these values have compared with the power values of the recent published exponentiality tests. It has shown that the proposed tests have a reasonable power for various kinds of departures from exponentiality.

Our simulation study shows that any tests can not be the best test in term of power for testing exponentiality against all alternatives. We observed that the performance of the proposed tests (\(Z_A \), \(Z_C \) and \(Z_K\)) is good and the difference between power values of these tests with those of the other powerful tests are small. Based on the simulation results, we concluded that the power values of the proposed tests are not very low and also very high and they have a reasonable power for all types of alternatives. Therefore, if we don’t have any information about the alternative (e.g., DHR, IHR, and etc.), it is reasonable to use the proposed tests because we will obtain a good power (not high or low). Lastly, for illustrative purpose, real examples have presented and it is concluded that the proposed tests can be applied in practice.