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

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

`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. |

The Kochar test for exponentiality is based on the following statistic:

*
T = √{\frac{108n}{17}}\frac{∑_{i=1}^n{J(i/(n+1))X_{(i)}}}{∑_{i=1}^n{X_i}},
*

where

*
J(u) = 2(1-u)[1-\log{(1-u)}] - 1.
*

The statistic *T* is asymptotically standard normal.

A list with class "htest" containing the following components:

`statistic` |
the value of the Kochar statistic. |

`p.value ` |
the p-value for the test. |

`method` |
the character string "Kochar test for exponentiality". |

`data.name` |
a character string giving the name(s) of the data. |

Alexey Novikov and Ruslan Pusev

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

1 2 | ```
kochar.exp.test(rexp(100))
kochar.exp.test(rchisq(100,1))
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.