# Questions tagged [kolmogorov-smirnov]

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.

519 questions
Filter by
Sorted by
Tagged with
34 views

### K-S Test on estimated parameters? 22 Million datapoints

I know this question has been asked before, but I am having trouble with what I need to do in order to have valid results from KS test I have ~22 Million data points. Does this mean the p-values are ...
17 views

### Does a 1-sample KS test compare raw data or a fitted model with a given distribution?

my question is: For a 1-sample K-S test should I be comparing my raw data to a given distribution (in this case, gamma) or comparing a fitted model to a given distribution? I am using scipy
36 views

### Why does the Kolmogorov distribution table have entries for $n$?

In my textbook it is said, that if the hypothesis of same population distributions is true, then $\sqrt{n}D\rightarrow K$ in distribution, where $D$ is the Kolmogorov-Smirnov statistic, and $K$ is ...
12 views

### Sample Size Guidelines for KS-Test and AD-Test

so I've been looking into the Anderson Darling and Kologorov-Smirnov test because I have datasets with a large number of observations (~6000) and would like to fit distributions to them. They are ...
239 views

### DHARMa diagnostics show significant deviations in KS tests for a glmm with beta distribution

I'm trying to use glmmTMB to fit a beta-distributed generalized mixed effects model with nested random effects. DHARMa residual diagnostics show a KS test with significant deviation. Is this serious ...
22 views

### How to check the distribution from which the sample with unknown parameters is drawn using ks.test in R [closed]

When I do a ks.test in R for a sample to check from which distribution it is, it gives me a 𝑝 value less than 0.01 for various distributions and I don't know why. It gives these small p values for ...
33 views

### Comparing return distributions

Taking the log and/or normalizing (subtracting the mean and dividing by the standard deviation) stock returns still does not eliminate the dependence or heterogeneity. E.g. I cannot assume that each ...
16 views

### Issue with two-samples Anderson-Darling test with same dataset (scipy anderson_ksamp)

I am computing several two samples Anderson-Darling statistics using the Python scipy.stats.anderson_ksamp function (both samples have $N = 20000$ values), and I ...
25 views

### Comparing sample distribution with population distribution

I have weekly data for 3 metrics for 100 stores(population), and I also have a sample of 30 stores which I need to check that whether this sample is representative of the entire population(100 stores) ...
25 views

### Kolmogorov-Smirnov interpretation in R for chi-square

With the sample size=500, I want to test whether the data follows chi-square distribution. For contiunous and one-dimensional distribution of the data, I use Kolmogorov-Smirnov test. Here I present ...
173 views

### Kolmogorov-Smirnov test statistic interpretation with large samples

As with almost all statistical tests in common use, the larger the sample the better the test will be at detecting even the tiniest differences. In my case I want to compare several empirical ...
50 views

### Which test to use for comparing two discrete distributions

I have two distributions for the travel times between 30 cities on two days (Monday and Friday) for multiple starting times (3am to 9pm). I now want to test if the distribution between these two days ...
139 views

### Comparing empirical distributions with an interaction effect

My experiment includes two subject groups: group1 and group2. Both groups undergo a behavioral test, the result of which is called “movement celerity” (this is my dependent variable). Both groups are ...
57 views

### Method to determine probability distribution

I am planning an experiment to determine the frequency of a binary variable (valued 1 or 0). Each day, there are 10,000 new events taking place Each day, I get to draw 100 randomly out of the new 10,...
7 views

### Distribution of censored data with Kaplan-Meier

I have a set of right censored data from a variable $T_{out}$ that expresses the survival time of a patient. In order to understand the distribution of this random variable, I used the Kaplan-Meier ...
73 views

### Paired t-test equivalent for comparing distributions (multiple Kolmogorov-Smirnov test)

I am looking for an equivalent of a paired t-test but for distributions. Let me try to explain. I am trying to test if a variable is selected randomly from the available pool of values or if there is ...
28 views

### Two-sample Kolmogorov–Smirnov w/ only relative population info

I have a set of experiments, each of which has an ECDF which represents my outcome. The number of samples used in each experiment is not the same. Unfortunately, I do not have information on the ...
9 views

### Comparing empirical distributions from two groups of subjects with repeated measures

I have a design where a continuous variable is measured over time in several individuals in different groups. I am plotting the distribution of that variable estimated from the data by kernel density ...
62 views

### How can we use Kolmogorov-Smirnov Test in ML?

I read about Kolmogorov-Smirnov Test. I understand that we can use Kolmogorov-Smirnov in 2 ways: Test if samples follows a given distribution Test if 2 variable (samples) have identical ...
71 views

### ks test for discrete distributions

I have a two samples of data of very different length, think train and test sets for a machine learning model. The data is binary and I'd like to know if the two have a comparable distribution of ...
7 views

### Compare two Kolomogorov tests with exponential distribution

I try understanding implementation of Kolomogorov test for one Sample. ...
22 views

### Is it fine to use Chi-squared test with parameters estimated from the same dataset?

I'm studying the Kolmogorov-Smirnov and Chi-squared tests. From this answer, On the other hand the chi-squared statistic does give useful shortcuts if you are trying to model the parameters that ...
20 views

### Any paper proposing calibration to increase Kolmogorov Smirnov distance in a binary classification?

Consider a traditional classification settings, when we already came up with a model parameter $\theta$ ( by Logistic Regression as example). We also have the scores $f(x, \theta |y=1) \in R$ for ...
23 views

72 views

### Using one-sample Kolmogorov-Smirnov test impementation for comparing two samples with purely discrete CDF

In one-sample Kolmogorov-Smirnov test one tests whether sample $X = (X_1,\dots,X_n)$ come from theoretical distribution by computing $D_n = \sup_{x} |F_n(x) - F(x)|$, where $F_n(x)$ denotes the ...
35 views

### What linear transformation minimizes the Kolmogorov–Smirnov distance between two sets of points?

Suppose we have two sets of real-valued points $X_1, \dots, X_m$ and $Y_1, \dots, Y_n$. We want to find the linear transformation that makes the distributions look alike. If we want them to have the ...
35 views

### How can I evaluate the performance of a program to calculate the exact Kolmogorov-Smirnof PDF

For reasons abstruse I wish to create a program to calculate the exact density function for the $D$ statistic from Kolmogorov-Smirnov's two-sample test. Here is the code I have so far. ...
45 views

### KS-style test between curves in general

The setup of my problem is that I have some response variable, $Y$, and a predictor, $X$. I have measurements on both variables from two groups. In each group, there is one $Y$ per $X$. I want to ...
446 views

### Limitations of Kolmogorov–Smirnov test

In this article, it is said that the test statistic tends to be more sensitive near the center of the distribution than at the tails. Can some please explain this what it means? (with a simple example ...
76 views

### Test to compare cumulative distributions

I would like to compare multiple cumulative distributions, and cluster them accordingly to their 'shape'. My distributions look like the one in the figure on the x axis there are the number of items ...
17 views

### How can a neural net recognize it is out of its training domain?

In a recent kaggle competition with a huge overfitting potential the winning team first searched for features on the training data and after the feature engineering used a Kolmogorov-Smirnov Test for ...