# Kolmogorv Smirnov Test in R

I want to proof the "Relative Age Effect" of a football team. I have a list of birth dates of the team members (about 20 numbers between 1 and 365, the day of the year). I now want to use the KS-Test to test against a uniform distribution.

this is how I did it, but it looks very wrong to me:

ks.test(dates,"punif")

D = 1, p-value = 3.331e-16 alternative hypothesis: two-sided

almost all players are born in the first half of the year, yet the p-value seems far too low in my opinion.

-

Try:

ks.test(dates, "punif", 1, 365)


To understand why, try typing

?ks.test


and reading the last bit of the 'Details' section.

-
 thanks. Isn't the reference distribution a continuous distribution between 1 and 365, in my case it's a discrete: it can only take values 1,..,365. – spore234 Dec 8 '11 at 19:13 I don't think the discreteness would matter unless you had an awful lot more than 20 data points. – onestop Dec 8 '11 at 19:32