# Should percentiles of one set of samples from a distribution wrt another set be uniformly distributed?

I'd like to pose the following question which for some reason is proving to be unclear to me.

Assume we have the Normal distribution, mean 0, sd 1. Let's say we take 1000 samples from it; call them $X_1, X_2, X_3,..., X_{1000}$.

Now, draw a random variable $Y$ (from the same Normal distribution mean 0, sd 1), and compute its percentile score with respect to the entire set of values in $X$. Is this percentile score uniformly distributed between 0 and 1?

• When you say the "percentile score" of $Y_i$, do you mean the proportion of the $X$s that are $\leq Y_i$? a.k.a. $$p_i = \frac{1}{n} \sum_{k=1}^{n} \mathcal{I} \{ X_k \leq Y_i \}$$ – Macro Aug 22 '13 at 19:25
• yes, that is correct – user635185 Aug 22 '13 at 19:27
• It depends on what model of this process you have in mind and what you mean by "those percentiles." Conditional on the values in $X$, we should not expect the percentile score of a single independent additional value $Y$ to have a uniform distribution, because its distribution depends on the chance outcomes of the $X_i$ themselves. And why do you posit $100$ of the $Y$s, given that your question appears to be only about each one individually and all have identical distributions? What would it mean for the entire _set_ of $100$ percentiles of the $Y_i$ to be "uniformly" distributed? – whuber Aug 22 '13 at 19:49
• There are still two correct answers to the rewritten question: no, the distribution of the percentile score of $Y$ is not uniform, because it depends on the values of the $X_i$; yes, the marginal distribution of the percentile score for the joint multivariate distribution of $(X_1, \ldots, X_{100},Y)$ is uniform (assuming all $101$ variables are exchangeable.) Perhaps that's why the answer is unclear to you? – whuber Aug 22 '13 at 20:12
• Take a smaller example with $100$ replaced by $2$. There's a $25$% chance both $X$'s will be positive. Consider such a situation, which obviously will occur frequently. Because the chance that $Y$ will be the smallest of the three values is now at least $50$%, then no matter what convention you use to compute percentile scores, there is at least a $50$% chance that it will have the lowest of the three possible scores. That's not uniform. – whuber Aug 22 '13 at 20:23