November 2016
Beginner to intermediate
959 pages
43h 46m
English
A one-sample Kolmogorov-Smirnov test is used to compare a sample with a reference probability. A two-sample Kolmogorov-Smirnov test compares the cumulative distributions of two datasets. In this recipe, we will demonstrate how to perform the Kolmogorov-Smirnov test with R.
Ensure that mtcars has already been loaded into a data frame within an R session. As the ks.test function is originated from the stats package, make sure the stats library is loaded.
Perform the following steps:
rnorm function), is distributed normally with a one-sample Kolmogorov-Smirnov test:> x = rnorm(50) > ks.test(x,"pnorm") One-sample Kolmogorov-Smirnov ...
Read now
Unlock full access