Learn R Programming

exptest (version 1.2)

deshpande.exp.test: Deshpande test for exponentiality

Description

Performs Deshpande test for the composite hypothesis of exponentiality, see Deshpande (1983).

Usage

deshpande.exp.test(x, b=0.44, simulate.p.value=FALSE, nrepl=2000)

Arguments

x
a numeric vector of data values.
b
a parameter of the test (see below).
simulate.p.value
a logical value indicating whether to compute p-values by Monte Carlo simulation.
nrepl
the number of replications in Monte Carlo simulation.

Value

  • A list with class "htest" containing the following components:
  • statisticthe value of the test statistic.
  • p.valuethe p-value for the test.
  • methodthe character string "Deshpande test for exponentiality".
  • data.namea character string giving the name(s) of the data.

Details

The test is based on the following statistic: $$J = \frac{1}{n(n - 1)}\, \sum_{i\ne j}1{x_i > bx_j}.$$ Under exponentiality, one has $$\sqrt{n}(J-\frac{1}{b+1})\stackrel{d}{\rightarrow}\mathcal N\left(0,4\zeta_1\right),$$ where $$\zeta_1 = \frac{1}{4}\left(1+\frac{b}{b+2}+\frac{1}{2b+1}+\frac{2(1-b)}{b+1}-\frac{2b}{b^2+b+1}-\frac{4}{(b+1)^2} \right)$$ (see Deshpande (1983)).

References

Deshpande J.V. (1983): A class of tests for exponentiality against increasing failure rate average alternatives. --- Biometrika, vol. 70, pp. 514--518.

Examples

Run this code
deshpande.exp.test(rexp(100))
deshpande.exp.test(rweibull(100,1.5))

Run the code above in your browser using DataLab