# Distance between empirical and uniform continuous distribution

I would like to define a measure of the non-uniformity of the distribution. I have a sample of $n$ iid values drawn from an unknown underlying continuous distribution with cdf $F(x), x \in [0,1)$. I need to define a distance from the empirical distribution to the uniform distribution. What I tried to use Kolmogorov-Smirnov distance to the uniform distribution ($F_{uniform}(x) \equiv x$): $$K_n = \sqrt{n} \sup_x |F_n(x)-x|$$

where $F_n(x)$ is empirical cdf. It would be perfect if the underlying distribution was uniform. It also works really great when the underlying distribution is close to uniform. Unfortunately, if the underlying distribution is non-uniform, one cannot say anything about the distribution of $K_n$ and it also becomes strongly $n$-dependent

That statistic would still work for me as a distance if all my samples (drawn from different $F(x)$) had the same $n$ in the sense that I could arrange all these samples by the distance to the uniform distribution and say which one is more uniform. In the case of variable $n$ and $F(x)$ I am trying to think of the KS distance as: $$K_n = \sup_x |\sqrt{n}(F_n(x)-F(x)) + \sqrt{n}(F(x)-x)|$$

So, the first "part" of this expression is the standard KS statistic and has a universal distribution independent of $n$ (for big enough $n$), and the second part grows as $\sqrt{n}$, but of course it's hard or impossible to say anything about the whole expression. Still, my physiscist's intuition tells me that $K_n \propto A+B\sqrt{n}$ and the B coefficient can be a measure of distance between $F(x)$ and $F_{uniform}(x) \equiv x$. Perhaps I can estimate $B$ if I resample my original sample (either with or without replacement).

Does it look like the right direction? Does anyone have better ideas?

P.S: In my original problem the distributions are defined on circles, so I use Kuiper's statistic instead of KS. However, I expect people to be more familiar with KS and it seems to me that any developments for KS distance can be simply moved to Kuiper's distance.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 17, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9563597440719604, "perplexity_flag": "head"}