# Upper bound on Kolmogorov-Smirnov distance after some transformation $h$

Problem setup: Suppose $$X_1, \ldots, X_n$$ is an i.i.d. sample from $$F_X$$ (CDF), and $$Y_1, \ldots, Y_n$$ is another i.i.d. sample from $$F_Y$$ (also CDF). In addition, $$h(z_1, \ldots, z_n)$$ is a real-valued symmetric function. Let $$H_X = h(X_1, \ldots, X_n)$$ and $$H_Y = h(Y_1, \ldots, Y_n)$$. Denote $$D_{KS}(X, Y)$$ as the Kolmogorov-Smirnov distance between $$X \sim F_X$$ and $$Y \sim F_Y$$, that is,

$$D_{KS}(X, Y) = \sup_{z \in \mathbb R} |F_X(z) - F_Y(z)|.$$

Question: How should I use $$D_{KS}(X, Y)$$ to bound $$D_{KS}(H_X, H_Y)$$, as in finding a function $$g$$ such that $$D_{KS}(H_X, H_Y) \leq g(D_{KS}(X, Y))$$? One can make assumptions on $$F_X$$, $$F_Y$$, and $$h$$, but should be as minimal as possible. (for example, compact support of $$F_X$$, $$h$$ being Lipschitz, and etc.).

My intuition is that if $$X$$ and $$Y$$ are from two close distributions (in terms of KS distance), so should $$H_X$$ and $$H_Y$$, but I couldn't find a way to formally make a statement.

Any help or ideas would be much appreciated!

If you think of $$h$$ as a test statistic, then you should be able to get substantial differences between the distributions of $$h({\mathbf X})$$ and $$h({\mathbf X})$$ when the K-S distance between the distributions of $$X$$ and $$Y$$ is of order $$n^{-1/2}$$.
For example, take $$X\sim N(0,1)$$ and $$Y\sim N(\mu,1)$$ and $$h({\mathbf X})= n^{-1/2}\sum_i X_i$$. Then $$h(X)\sim N(0,1)$$ and $$h(Y)\sim N(n^{1/2}\mu,1)$$, which is not small if $$\mu$$ is of order $$n^{-1/2}$$ or larger.