# Questions tagged [kolmogorov-smirnov-test]

The Kolmogorov-Smirnov test is a test for goodness of fit of data to a distribution. It is often used to test whether a variable is normally distributed.

612 questions
Filter by
Sorted by
Tagged with
33 views

### How to perform a 2 sample Kolmogorov-Smirnov test controlling for a type II error instead of type 1

I have four completely different sets of two samples and want to check for each set if both samples come from the same distribution, so four Kolmogorov-Smirnov tests total. If it's going to be ...
28 views

### Test Distribution Difference between small sample sizes

My first post of StackExchange. I am working on data analysis project for comparison of fraud and nonfraud transactions. My objective is to compare the feature vectors of nonfraud transactions and ...
31 views

### testing difference in distributions with population values (using python)

I am looking for the best method to test for a difference between two distributions. I have data from a patient group, and my aim is to compare the distribution to a reference distribution. However, ...
22 views

### What Python library functions can one use to determine if a sample is drawn from a Laplace distribution?

I have some data I suspect is drawn from a Laplace distribution rather than a Gaussian one. I can use the Kolmogrov-Smirnov test and the ability to create Uniform and Gaussian distributions of the ...
65 views

### What is this nonparametric goodness-of-fit test?

I wrote down a goodness-of-fit test that I have not seen before. However, it is quite elementary and has many applications, so I bet it must have been known. Could someone tell me its name? Setup. The ...
30 views

### Correctly interpreting a two-sample Kolmogorov-Smirnov test and a Kruskal-Wallis test

I want to confirm my understanding of the two tests referenced in the title. Say I have data on a variable $Y$ from two groups (0 and 1), and I perform the following tests in Stata: ...
13 views

### What is the relationship between convergence in measure and convergence in Kolmogorove distance?

Suppose I have a sequence of distribution $F_1, ..., F_n$ convergence to a limiting distribution $F$ in the sense that \begin{align} \sup ||F_n - F|| \overset{a.s.}{\rightarrow} 0 \end{align} which ...
33 views

### Tests that Quantify Deviation from Null Hypotheses

I have been delving into non-parametric tests recently, and I've come to realize that most of these tests offer only a partial perspective. For example, lets say the underlying distribution is $\theta$...
1 vote
34 views

### Discrete P-values in Kolmogorov-Smirnov Test with Small Sample Sizes

I'm facing an issue while conducting the Kolmogorov-Smirnov (KS) test with two datasets of different sizes: 84 and 28 samples. I got these sets from normal distribution. I've noticed that the ...
33 views

### How to test for significance of differences between metrics for two models? (Machine learning model selection)

Problem - I want to test whether the difference in a metric (say AUC) between two models is significant. I have one vector of binary class predictions from a custom function and one from sklearn....
147 views

### Kolmogorov-Smirnov test with median ranks instead of traditional empirical distribution function

I know that Kolmogorov-Smirnov test uses the empirical distribution function of the sample studied $\widehat{F}(X_i) = \frac{i}{n}$ and then measures the adequacy of function $\widehat{F}$ to function ...
1k views

### Kolmogorov-Smirnov test fails to recognize a normally distributed sample

I created a sample with 10000 normally distributed numbers. Subsequently, I used the Kolmogorov-Smirnov test to check if they are indeed normally distributed, and it turned out that they are not. How ...
30 views

### How to apply equivalence test of whether data come from a specified distribution?

I have evenly-spaced locations from $1, 2, \dotsc, 1000$. At each location I have data from my $N$ samples coming from two groups, and I apply a (one-sided) test to obtain a p-value. I want to know if ...
1 vote
73 views

### What test can I use to compare two peaks in an image?

This question is related but I want to check if my idea is valid. I have two peaks and I want to check if they are the same. They are the linecut of an image. The background noise in the image is not ...
29 views

### Relation between the sample size with the powers of Kolmogorov Smirnov, Cramer Von Mises and Anderson Darling?

I want to know the mathematical relation between the sample size with the powers of 1. Kolmogorov Smirnov, 2. Cramer Von Mises, and 3. Anderson Darling. I have seen many posts and other websites ...
544 views

### Kolmognorov Smirnov test p values is 0

I am trying to use Kolmogorov-Smirnov test to check the goodness of fit of the distributions for the dataset. I have dataset consisting of 100,000 samples and I apply expectation-maximization ...
76 views

### How to determine whether a sample from a known population is significantly biased?

I have a large dataset (the population) and a large subset of it (the sample) containing the same, continuous variables. The sample represents more than 90% of the population but is not random -- we ...
30 views

### Does the null distribution matter when choosing between goodness-of-fit tests?

There are multiple goodness of fit tests such as Kolmogorov-Smirnov, Cramer-von Mises, Anderson-Darling, and Kuiper's. Which one shall one use? There are threads (e.g. 1, 2, 3) and a nice textbook ...
71 views

### Comparison of KS test and MWW test

I want to compare two data samples which come from continuous distributions. However, the data is highly skewed and t-test is obviously not a choice. As an alternative, I wanted to use the MWW test ...
117 views

### P-Value == 1 of two-sided Kolmogorov-Smirnov test for clearly distinct distributions

I have preformed two-sided Kolmogorov-Smirnov test pair-wise across 6 datasets. It performs as expected (p-value <<< 0.05 in most cases, ...
21 views

### Is two-sample Kolmogorov test working correctly?

I have two one-dimensional samples that I'm trying to quantifiably distinguish (or deny such distinction). I.e. the null-hypothesis is that they come from the same population (distribution?). The ...
163 views

### How does the assumption that the distribution must be fully specified when using a Kolmogorov-Smirnov practically impact comparison of distributions?

As specified here on the NIST website, the 3rd assumption for the K-S test is "... the distribution must be fully specified. That is, if location, scale, and shape parameters are estimated from ...
31 views

### Two-sample Kolmogorov Smirnov test for global sensitivity analysis - How to treat discrete distributions?

Dear Cross Validated community, We are working on a uncertainty & sensitivity analysis using a mathematical optimization model. More specifically, we have a set of uncertain parameters, which ...
37 views

### Large data sets with heavy tails - best fitting strategy

I have relatively large data sets with about 20000 to 25000 data. The data are the orientation angles (0 - 180°) of fibers in a composite material. You can see two example histograms showing the most ...
1 vote
47 views

### Kolmogorov Smirnov Test Consistency

I was reading that the Kolmogorov Smirnov 2 sample test is consistent, that is Probability of rejection under $H_1$ is 1 for sample size going to infinity. Say we have 2 random variables X and Y. K-S ...
38 views

### Statistical tests for normality and log-normality testing?

I want to apply a filter to my data that assume its normality. The data comes from different sensors measuring the same quantity over the same period of time. Using a simple histogram plot, It seems ...
17 views

### Comparing ratings generated by overlapping groups of experts

Consider an experiment where randomly selected experts from a set are asked to attribute Likert-scale ratings to randomly selected objects from two groups A and B. Now, suppose I want to test whether ...
66 views

### Are there any differences in R if I use a "pnorm" or create a distribution with rnorm for Kolmogorov-Smirnov?

For testing distributions existing in base R, say normal or beta distributions, is there any difference if I use a one-sampled or two-sampled Kolmogorov-Smirnov test with same parameters? For example: ...
1 vote
51 views

### Upper bound on Kolmogorov-Smirnov distance after some transformation $h$

Problem setup: Suppose $X_1, \ldots, X_n$ is an i.i.d. sample from $F_X$ (CDF), and $Y_1, \ldots, Y_n$ is another i.i.d. sample from $F_Y$ (also CDF). In addition, $h(z_1, \ldots, z_n)$ is a real-...
104 views

46 views

### Can we have different results for the same exemple using chi 2 and KS?

I just wanted to know, can we have different results for the same inputs, using Chi 2 and KS? So for example I suppose that my variable flows a uniform law, as I do the test, the results I have are: ...
62 views

### Test for uniformity of a dataset with many ties?

My goal is to identify images (2D matrix) which are approximately uniform (all same brightness). Since I don't know of any "natural" tests for uniformity like Shapiro-Wilks for normality, I ...
87 views

### Compare 2 binned non-parametric histograms with hypothesis test

According to this guy here: https://towardsdatascience.com/how-to-compare-two-distributions-in-practice-8c676904a285 and the following papers he mentions inside his article, and more specifically the ...
106 views

### Chi Square Goodness of Fit or Kolmogorov–Smirnov test

I have a population binary data (2000 entries) as (pop_df): ...
1 vote