Consider data \(latex\) and \(latex\) as two samples, assumed to have come from probability density functions \(latex\) and \(latex\), respectively. Let \(latex\) and \(latex\) be the cumulative density functions, respectively. We are interested to test the null hypothesis \(latex\). The main function is Cram.test() which will calculate the test statistic
$$latex$$
and its corresponding p-value based on the approximation of the generalized Pareto distribution to the test statistic.