We study the problem of {\em generalized uniformity testing}~\cite{BC17} of a discrete probability distribution: Given samples from a probability distribution p over an {\em unknown} discrete domain , we want to distinguish, with probability at least 2 3 , between the case that p is uniform on some {\em subset} of versus -far, in total variation distance, from any such uniform distribution.
We establish tight bounds on the sample complexity of generalized uniformity testing. In more detail, we present a computationally efficient tester whose sample complexity is optimal, up to constant factors, and a matching information-theoretic lower bound. Specifically, we show that the sample complexity of generalized uniformity testing is 1 ( 4 3 p 3 ) + 1 ( 2 p 2 ) .