Learn R Programming

exptest (version 1.2)

kochar.exp.test: Kochar test for exponentiality

Description

Performs Kochar test for the composite hypothesis of exponentiality, see e.g. Kochar (1985).

Usage

kochar.exp.test(x, simulate.p.value=FALSE, nrepl=2000)

Arguments

x
a numeric vector of data values.
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 Kochar statistic.
  • p.valuethe p-value for the test.
  • methodthe character string "Kochar test for exponentiality".
  • data.namea character string giving the name(s) of the data.

Details

The Kochar test for exponentiality is based on the following statistic: $$T = \sqrt{\frac{108n}{17}}\frac{\sum_{i=1}^n{J(i/(n+1))X_{(i)}}}{\sum_{i=1}^n{X_i}},$$ where $$J(u) = 2(1-u)[1-\log{(1-u)}] - 1.$$ The statistic $T$ is asymptotically standard normal.

References

Kochar, S.C. (1985): Testing exponenttality against monotone failure rate average. --- Communications in Statistics -- Theory and Methods, vol. 14, pp. 381--392.

Examples

Run this code
kochar.exp.test(rexp(100))
kochar.exp.test(rchisq(100,1))

Run the code above in your browser using DataLab