In: Statistics and Probability
Here we have given 5 observations as follows
1.30, 7.15, 3.15, 0.30, 2.15
Kolmogorov test : The Kolmogorov-Smirnov test (Chakravart, Laha, and Roy, 1967) is used to decide if a sample comes from a population with a specific distribution.
By using r-software have command for kolmogorov test is as follows
ks.test(x, y,alternative=c("two.sided","less","greater"),exact=NULL)
x-a numeric vector of data values.y-either a numeric vector of data values, or a character string naming a cumulative distribution function or an actual cumulative distribution function such as pnorm
. Only continuous CDFs are valid.
alternative-indicates
the alternative hypothesis and must be one of "two.sided"
(default),
"less"
,
or "greater"
.
For your data,all calculations are done in r-software. So I have enclosed all the images of deskstop related to question above.
Here Null hypothesis is
H0: given observations come from uniform(0,1) vs H1: given observations does not come from U(0,1).
For question 1 we directly use default command as given in following image.
Result : If p-value is greater than alpha=0.95 then we accept H0. Here we observe that p-value is less than alpha so here we reject null hypothesis. Means we conclude that given observation does not belong to uniform(0,1)
For question 2 ,we first draw 5 random numbers from uniform(0,24), then we compaire these random numbers with those of observations which we get from clocks in shop.
Result: By observing p-value we conclude that given observations come from uniform(0,24). Means these data distributed uniformly on the 24-hours clock-face.