Kolmogorov-Smirnov 检验用于检查 2 个样本是否遵循相同的分布。
ks.test(x, y) # x and y are two numeric vector
# From different distributions
x <- rnorm(50)
y <- runif(50)
ks.test(x, y) # perform ks test
#=> Two-sample Kolmogorov-Smirnov test
#=>
Kolmogorov-Smirnov 检验用于检查 2 个样本是否遵循相同的分布。
ks.test(x, y) # x and y are two numeric vector
# From different distributions
x <- rnorm(50)
y <- runif(50)
ks.test(x, y) # perform ks test
#=> Two-sample Kolmogorov-Smirnov test
#=>