# Transforming to uniform numbers

Hi

I have a time series of probabilites, vector X I need to convert the probabilites to uniform numbers.

As I understand it if I put the series into the cdf the output is thus uniform.

The problem is I do not know what the cdf is for my series so how is this done ? Every question/example I see seems to say ...'data follows norm dist' or some such but when you don't know what the distribution is how is this possible?

Any help appreciated as this seems v confusing to me. Thks vm.

-

Replace each data point by its percentile. E.g., if $x_{27}$ is the 45th largest of 7289 data points, let $u_{27} = 45/7289$.

-
To clear up some sloppiness in my original answer: (1) I wrote "largest" when I probably meant "smallest". (2) With that change, my example has a slight discrepancy from the standard definition of percentile. This discrepancy would be resolved by having u_27 be (45-1)/7289 instead. (3) Either way, there is a slight bias in that the mean of the u_i will be slightly different from 0.5. If that's a problem, an affine transformation will resolve it. – Chris Grant Aug 6 '10 at 22:00

The more relevant question is why do want to do this unless you have some idea or conjecture for the distribution $F(x)$ of the $X$'s? In any application I am aware of, the investigator has reason to believe (from some model) that the cdf is $F(x)$, in which case $\{F(X_i)\}^n_{i=1}$ should be iid uniform $[0,1]$. There are a variety of statistical tests for uniformity.

If $F(x,\hat\theta)$ is implied by an estimated parametric model, then $\{F(X_i,\hat\theta)\}^n_{i=1}$ should be approximately (asymptotically) uniform. There are ways to take account of the fact that $\hat\theta$ is estimated on the same data set $\{X_i\}^n_{i=1}$, but an adjustment is tedious and oftentimes we do not make an adjustment and just interpret $\{F(X_i,\hat\theta)\}^n_{i=1}$ with some caution.

Hope this helps.

G

-