I have a set of $30$ real numbers between zero and one. Let's say that the null hypothesis is that this data set fits a uniform distribution and that the alternative hypothesis is that this data set does not fit a uniform distribution. How would I test this?
My only ideas so far would be to divide the continuous distribution into a set of several categories so that the expected count in each category is at least five. With a set of $30$ numbers, I would divide the interval $(0,1)$ into six equal sections, such as $(0,0.166)$, $(0.166,0.333)$, etc. For each interval, I would count the quantity of data points that fall within the interval. Now that I have converted the original data into categorical data, I can run a chi-squared goodness-of-fit test with (in this case) $5$ degrees of freedom.
The above paragraph is just speculation on my part. Is there a better way to determine how well data fits a uniform distribution?