Skip to main content

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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
23 views

The F-test and the t-test reject the null hypothesis while the KS test and the Chi-Squared test do not

This is a follow-up question to How can the F-test reject the null hypothesis while the KS test does not?. Let's consider I perform the following tests: Two-sample Kolmogorov-Smirnov test (KS-test), ...
Ommo's user avatar
  • 280
0 votes
0 answers
25 views

Where can I find a Kolmogorov-Smirnov critical value table for an F-distribution? [closed]

I have developed an Excel model for a one-sample Kolmogorov-Smirnov test for an F-distribution. I have the K-S test statistic, but no CV to compare it to. If anyone knows of an online table of ...
Jim Robison's user avatar
7 votes
4 answers
267 views

Estimating Probability Density for Sample

I have a dataset of over 20,000+ samples. The objective here is to define a distribution for the sample so that I can plot all possible outcomes. However, I am unable to find an appropriate ...
Ahmed Jyad's user avatar
1 vote
1 answer
71 views

Two-sample Kolmogorov-Smirnoff test in R and/or Python, how to find degrees of freedom?

I am trying to run a Kolmogorov-Smirnov/K-S test in R using the ks.test() function, and I am trying to find the degrees of freedom when comparing across two different groups. I am also trying in ...
Rachel's user avatar
  • 13
1 vote
0 answers
75 views

My professor insists that this data is normally distributed but I cannot work out how that can be!

I have a data set on deforestation and the impact that the distance from a road has on deforestation. For the assignment, I need to assess the correlation between these two variables. In class, my ...
Daisy's user avatar
  • 11
1 vote
0 answers
38 views

Statistical test to check if two samples come from the same DISCRETE distribution

I am computing hourly backward wind trajectories for the 1985-2023 period, and obtaining all the pixels that are crossed by these trajectories. I have the pixel ID frequencies for these trajectories - ...
jparbache's user avatar
3 votes
1 answer
82 views

Two-sided KS-Test for Evaluating Prediction Model?

In the article https://ginimachine.com/blog/machine-learning-model-evaluation/ there is a proposal of using Two-Sided KS-Tests for evaluating the accuracy of predictions from Machine Learning (ML) ...
Alex's user avatar
  • 133
0 votes
0 answers
34 views

Using two-sample K-S test for the same time-series data

I have time-series data which is a recording of neural activity in a neuron before and after some stimuli (I know the specific time when the stimuli was introduced). I'm considering using the two-...
kz253745's user avatar
4 votes
1 answer
36 views

How to estimate required sample size for the two-sample Kolmogorov-Smirnov test

I have a simulation model which produces a value for an output variable. Running it many times gives skewed distributions for this output variable. What I'd like to do is compare two distributions, ...
Riley's user avatar
  • 151
0 votes
0 answers
23 views

Comparing 2 distributions in R from a smaller sample

I am in the process of planning out a statistical analysis for future data I will collect. I am primarily a neurobiologist, trying to implement more appropriate statistical models for my data. First, ...
user avatar
4 votes
2 answers
171 views

Which statistic to use for measurement between two samples [closed]

I am measuring stem widths of a control plant and a mutant plant and want to determine if there is any significant difference between them. The sample sizes are not the same. When I use a test like ...
Ruochan Liu's user avatar
1 vote
1 answer
77 views

Sampling 1 item from groups of correlated values and combining the statistics

We have a dataset consisting of several groups of observations: Group Object Value Gr_1 Ob_1 V_1 Gr_1 Ob_2 V_2 Gr_2 Ob_3 V_3 ... ... ... All values lie in the interval [0,1]. In each of the ...
Andrei Smolensky's user avatar
0 votes
0 answers
15 views

Can we compare distributions in a subsampled Kolmogorov Smirnov test?

(stats newbie here) The highlighted answer to Can you compare p-values of Kolmogorov Smirnov tests of normality of two variables to say which is more normal? refers to a paper* that says that when the ...
cnocoill's user avatar
2 votes
0 answers
63 views

How to evaluate model's performance using a K-S test

I am wondering if a K-S test or other test can be used for comparing models' performance. For example, I have two prediction models, the prediction result of first model is ...
Xudong's user avatar
  • 121
1 vote
1 answer
63 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 ...
Frank's user avatar
  • 21
0 votes
0 answers
31 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 ...
confused_data_scientist's user avatar
0 votes
0 answers
43 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, ...
Ana's user avatar
  • 101
0 votes
0 answers
40 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 ...
Christopher Clark's user avatar
0 votes
0 answers
73 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 ...
Student's user avatar
  • 235
0 votes
0 answers
54 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: ...
msn's user avatar
  • 1
0 votes
0 answers
24 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 ...
0o0o0o0's user avatar
  • 21
0 votes
1 answer
36 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$...
Student's user avatar
  • 235
1 vote
0 answers
65 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 ...
Maksym Gachkivskyi's user avatar
0 votes
0 answers
40 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....
mckerm1t's user avatar
4 votes
1 answer
194 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 ...
Martin's user avatar
  • 43
7 votes
1 answer
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 ...
Kώστας Κούδας's user avatar
0 votes
0 answers
32 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 ...
user1799035's user avatar
1 vote
1 answer
157 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 ...
zaphod's user avatar
  • 13
0 votes
0 answers
37 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 ...
user391733's user avatar
5 votes
2 answers
1k 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 ...
amitha's user avatar
  • 117
2 votes
1 answer
102 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 ...
helveticat's user avatar
3 votes
1 answer
52 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 ...
Richard Hardy's user avatar
2 votes
1 answer
83 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 ...
m_delx's user avatar
  • 21
6 votes
1 answer
141 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, ...
Adam Streck's user avatar
0 votes
1 answer
25 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 ...
Eugene B.'s user avatar
3 votes
1 answer
185 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 ...
Piers's user avatar
  • 85
0 votes
0 answers
42 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 ...
gmavrom's user avatar
  • 101
1 vote
1 answer
94 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 ...
Andrew741's user avatar
3 votes
1 answer
78 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: ...
Pedro Caliari's user avatar
1 vote
1 answer
79 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-...
Ethan's user avatar
  • 43
3 votes
1 answer
143 views

Should we always use 100 samples for an equivalence test given the KS test size problems?

My problem:- I'm writing a test to see if a series of numbers come from certain theoretical distributions. And I need a p value so that software can automatically accept or reject $H_0$ on an $\alpha=...
Paul Uszak's user avatar
14 votes
2 answers
744 views

What are the advantages (if any) of the Kolmogorov-Smirnov test over other tests?

Given a reference distribution and an unknown sample, we need some statistical test to determine if the unknown sample came from the reference (one-sample test), or given two samples to determine ...
Number's user avatar
  • 1,040
0 votes
0 answers
21 views

How can I combine and get cdf of joint distribution of normal and beta distributions on the same set of data? [duplicate]

In my problem, I have a condition in which I need to compute the joint distribution of two dependent distributions. The first distribution is normal and the second one is beta distribution. How can I ...
Nmgh's user avatar
  • 31
0 votes
0 answers
44 views

Hypothesis testing for two samples from discrete distributions

There exists a classical method for solving a certain computational problem related to random sampling. It is the "gold standard", so to speak. I'm working on an algorithm that aims to solve ...
swineone's user avatar
8 votes
2 answers
950 views

Kolmogorov-Smirnov instability depending on whether values are small or big

Out of curiosity, I realised that the Kolmogorov-Smirnov normality test returns two very different p-values depending on whether the dataset has small or large numbers. Is this normal and is there a ...
Xav64's user avatar
  • 169
1 vote
1 answer
397 views

How combine two statistics from different tests?

I have a case in which I have two sets of ranks. To compare these two ranks, I use once wilcox test and once ks test. The reason why I am using both returns to the special cases of shapes of data ...
Nmgh's user avatar
  • 31
1 vote
0 answers
55 views

Multiple Kolmogorov-Smirnov tests with likelihood ratio

I would like to be able to establish whether a sample (let's call it A) is more likely than another sample (let's call it B) to be drawn from the same distribution as a third sample (let's call it C). ...
ben's user avatar
  • 111
4 votes
1 answer
213 views

Goodness-of-fit Tests

I wish to test whether a large number of observations $X_i$ follows an exponential distribution with parameter $\lambda=1$. I also wish to test this hypothesis exactly, and intend that if the ...
pecer10012's user avatar
10 votes
2 answers
8k views

Why are Shapiro-Wilk and Kolmogorov-Smirnov test compared with same sample size?

I am trying to understand when to use Shapiro-Wilk Test and/or Kolmogorov-Smirnov Test for normality. Currently, I am following this website How to Test for Normality in R (4 Methods). This paper ...
Quinten's user avatar
  • 389
0 votes
0 answers
421 views

How do I test differences between two (non-normal) distributions?

I have a large dataset containing the peak velocities of different people. I have then split this dataset into two depending on an attribute (for example male vs. female). Each dataset now contains ...
matte_fin's user avatar

1
2 3 4 5
13