Showing an equality for the KS-statistic with Jacobi theta functions

45 Views Asked by At

I recently read about the Kolmogorov-Smirnov statistic and on wikipedia it is stated that the cdf of the random variable $K$ is given by

$$ Pr(K\leq x) = 1-2\sum_{n=1}^{\infty} (-1)^{n-1}e^{-2n^2x^2} = \frac{\sqrt{2\pi}}{x} \sum_{n=1}^{\infty} e^{-(2n-1)^2\pi^2/(8x^2)}, \quad x\geq 0 $$

and that these can be expressed in terms of the Jacobi theta function. I tried to show the equality (between the two sums, not the derivation of cdf itself). It feels like it's only one last step left but I don't seem to know how to take it (maybe it's something trivial I'm missing).

I started with writing that

$$ 1-2\sum_{n=0}^{\infty} (-1)^{n-1}e^{-2n^2x^2} = \vartheta_{00}\left(z=\frac{1}{2};\tau = 2ix^2/\pi \right) $$

with the attempt of trying to transform this into the rhs somehow. Using $\vartheta_{00}\left(\frac{1}{2};\tau\right)=\vartheta_{01}(0;\tau)$ and $\vartheta_{10}\left(\frac{z}{\tau};\frac{-1}{\tau} \right) = \alpha\vartheta_{01}(z;\tau)$ with $\alpha = (-i\tau)^{1/2} \exp\left(\frac{\pi}{\tau}iz^2 \right)$ gives

$$ \vartheta_{01}(0,2ix^2/\pi) = \sqrt{\frac{\pi}{2x^2}}\vartheta_{10}\left(0;-\frac{\pi}{2ix^2} \right) = \sqrt{\frac{\pi}{2x^2}}\sum_{n=-\infty}^{\infty}\exp\left(-\frac{(2n+1)^2\pi^2}{8x^2} \right) $$

Changing the order of summation, i.e. letting $n\rightarrow -n$ then gives $\exp\left((2n+1)^2\pi^2/(8x^2) \right) \rightarrow \exp\left((2n-1)^2\pi^2/(8x^2) \right)$ so this is the same term as in the rhs I want to show. Also, the term for e.g. $n=1$ is the same as for $n=-1$ so I can add these up, but I'm not sure what to do with the term for $n=0$, I end up with

$$ Pr(K\leq x) = \sqrt{\frac{\pi}{2x^2}}\exp\left(-\frac{\pi^2}{8x^2} \right) + \frac{\sqrt{2\pi}}{x}\sum_{n=1}^{\infty} \exp\left(-\frac{(2n-1)^2\pi^2}{8x^2}\right) $$

which is the same as I wanted to show except I'm stuck with the additional term for $n=0$ which I guess shouldn't be there. Is there something trivial I am missing or is it something else? I think it's only in the last step that I'm going wrong somehow.

1

There are 1 best solutions below

0
On BEST ANSWER

Well, it was indeed a blunder in my calculations...

Looking at $(2n-1)^2$, both $n=0$ and $n=1$ give the result $1$, $n=-1$ and $n=2$ give $9$ etc. So pairing things up, one indeed has that

$$ \sqrt{\frac{\pi}{2x^2}}\sum_{n=-\infty}^{\infty}\exp\left(-\frac{(2n-1)^2\pi^2}{8x^2} \right) =\frac{\sqrt{2\pi}}{x^2}\sum_{n=1}^{\infty}\exp\left(-\frac{(2n-1)^2\pi^2}{8x^2} \right) $$

which gives the sought expression for the cdf.