# 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.

445 questions
Filter by
Sorted by
Tagged with
33 views

### Kolmogorov Smirnov test - correct data to compare against a standard normal distribution or not correct?

The question arose from my analysis on Matlab. The function kstest(x) compares data set x against a standard normal distribution (mean 0 and std 1) My question is, do you correct the data set to ...
16 views

### Testing asymmetry and normality directly on my time series

This might be a stupid question but I am just approaching time series analysis in r for the first time. I have to choose a model for my financial time series, I have daily frquency data and I want to ...
19 views

### Two-sample KS test null distribution, reference request

I follow, more or less, the derivation of the KS test statistics's distribution that is given on Wikipedia. The following section on the two-sample test also makes sense if all I want to do is reject ...
35 views

### Comparing 2D data sets using python

Thanks in advance for everyone reading this question. I have to write a program that takes a 2D data set (Force[y axis] versus displacement[x axis] data, if it matters), compare it with around 600 2D ...
436 views

### How can the F-test reject the null hypothesis while the KS test does not?

Suppose I have two datasets, $\mathbf{a}$ and $\mathbf{b}$. I want to test whether the two datasets are different in a statistically significant way. To compute the F-test, I take the ratio of the ...
26 views

### Why do my Kolmogorov-Smirnov test statistic D differ?

I did a ks test on excel through a youtube video. https://www.youtube.com/watch?v=cltWQsmBg0k In case I had done the excel wrongly I thought that I should check it with an online calculator of the ...
32 views

82 views

### Kolmogorov Smirnov p-values not uniform under the null in R?

It is well known that the distribution of the p-value in a statistical test is $U(0,1)$ under the null. Now, consider the following implementation of the two-samples Kolmogorov Smirnov test on normal ...
20 views

### Use Effect Size VS p-Value when determining the best fitting distribution?

I have a large sample size of about 50,000 I want to determine what theoretical distribution fits the distribution of my samples the best. What I did is to fit all distributions I know to the data ...
83 views

### Can the Kolmogorov-Smirnov statistic be used to check if these

Disclaimer: Note this is a simplified version of my actual problem. These are not my real data. The set up The hexbin plot shows mass and height of goats in Iceland. There are a few thousand samples....
46 views

### Two-sample KS test results vs distributions

WARNING : MAJOR UPDATE BELOW, I've made a mistake I am currently working on validating a predictive model that was made some years ago. In doing so, I am comparing the distribution of the Target ...
44 views

### What statistical test should I perform for the data who comes from more than one population? [closed]

I want to check the chosen property (for example volume, density etc.) between data of experiment 1 and experiment 2, whether the difference of property between the experiment is significant or not? ...
35 views

### Is a Kolmogorov-Smirnov test appropriate for this use case?

I have two surveys out right now, both with approximately 200K responses. After looking at their descriptive statistics, one of them seem to be getting slightly higher ratings (type int; range(0-5)). ...
48 views

### Is Kolmogorov-Smirnov test known to fail in some special cases?

I would like to use two samples Kolmogorov-Smirnov test to check if two given samples are coming from different distributions. For that I use scipy implementation of the KS test. I have found out ...
58 views

### Comparing two-sample statistical test results: Kolmogorov-Smirnov and Anderson-Darling

I am not sure how to interpret a given Anderson-Darling criterion as computed from SciPy. Suppose, for example, I have a Kolmogorov-Smirnov (KS) statistic of 0.60 and an Anderson-Darling (AD) ...
8 views

### Questions Tags Users Unanswered Connection of the critical value for KS distance and model complexity

I asked a similar question is math exchange, but here it seems to fit better. I wonder about a relationship of the critical value for the KS distance (with Lilliefor correction) and model complexity? ...
28 views

### Comparing survey data to passively measured data

Basic Situation: I have quite a large sample of around 10k people. In that sample I have two values for each person: a passively measured value of an amount of time, as well as their estimation of ...
16 views

### Tests if k-samples are from same population are rejected for large N?

For a very large data set I have created a number of samples and try to verify whether the distribution of the variables in those samples is similar. I.e. I'm trying to verify that the sampling ...
184 views

### Kolmogorov-Smirnov (ks_2samp) p-value not as expected - Wrong test or understanding?

Context I am using scipy's ks_samp in order to apply the Kolmogorov-Smirnov-test. The data I use is twofold: I have a dataset ...
29 views

### How do I statistically compare the readings from two different sensors? [duplicate]

I have temperature and humidity readings from two different sensors (located in the same geographical area). The data is logged every hour and I have data for more than a year, logged this way 2/1/...
26 views

### Comparing the distribution

I want to compare the distribution of 2 independant datasets. Measurements were performed on an experimental dataset (TEST) and compared with a completely independant reference dataset (REF). The idea ...
87 views

### How do you decide what an acceptable p-value is for a K-S test?

Let's say you're thinking about running a hypothesis test (like a t-test) on some data that requires your sample to be normally distributed. You decide on a 95% CI and you run a Kolmogorov-Smirnov ...
29 views

### Kolmogorov–Smirnov (KS) two sample test interpretation

I am reading a paper which uses the KS two sample test to compare two signals: observed signal and predicted signal. The authors compute the test statistic value and p-value, and set the critical ...
67 views

### Interpretation of the D-statistic from 2-sample KS-tests

I've been using the two sample Kolmogorov-Smirnov test to compare observations from 2018 vs observations from 2019. I heard from my co-worker that you can interpret the D-statistic as the magnitude ...
12 views

### Why does the test statistic of a 2 Sample K-S test change drastically when noise is added to samples?

I believe I have gone through all 2 Sample K-S test related posts here, but I could not see the answer to my problem. At this point, I don't know whether the problem is related to a bug in the ...
23 views

### Mysterious recurrance of p value 0.2 in Kolmogorov Smirnov test

I am using the code that I posted in this question, although the question was different. So my problem is that I am running Kolmogorov Smirnov test for normality in statsmodels diagnostics, to test ...
130 views

### Combine multiple metrics to evaluate / choose a ML Model

I'm working on a credit binary classification task.For this business is something usual to meassure model's performance from two metrics: ROC AUC and KS .This sounds reasonable until I have to choose ...
37 views

### QQ plot looks like gaussian, but kolmogorov smirnov test suggests to reject null hypothesis

I am testing my estimation of maximum likelihood parameters using the normal equation for gaussian generalised linear model. I am trying 3 covariates and 4 parameters (i.e. includingintercept) and in ...
21 views

### Anomaly detection through distribution-based hypothesis testing

I have a table of event logs that contains several categorical variables (gender, age bucket, city of residence, and education level), and I'd like to retroactively identify if a given hour of logs ...
73 views

### How to test difference in skewness and kurtosis for two samples with different mean?

There are several questions asking for comparing these moments for two distributions coming from the same population distribution (i.e. expecting to have the same mean). Examples are here and here. ...
112 views

### Kolmogorov-Smirnov test vs. Wilcoxon signed-rank test for two samples

I would like to ask a question about the usage of Kolmogorov-Smirnov test and Wilcoxon signed-rank test to show that two samples have the same distribution (specifically, log-normal). Specifically, I ...
16 views

### Estimator maximizing pvalue of Kolmogorov-Smirnov test

Suppose we have some reasonable distribution known up to some unknown parameter $θ$ and sample $X_1$, $X_2$, ..., $X_n$ from that distribution. For each possible candidate parameter $\hat{θ}$ we can ...
96 views

### Non-uniform distribution of p-values

I'm running a Monte Carlo simulation to check whether a distribution generated by my model fits a pre-defined target distribution where the parameters of the target distribution are estimated from the ...
118 views

### Peacock Test Implementation in R

I have two empirical distribution (without access to the observations themselves). So, in order to see if the empirical distributions are "significantly" different, I took two large random samples ...
80 views

### How to test statistics for the similarity or dissimilarity between these two curve?

I want to check how dissimilar these two curves are. What statistical test shall I perform? Pvalue from following test (MATLAB command) are given. ...
21 views

### Stopping rule in a Monte Carlo simulation for a convergent sequence of unknown random variables

Given an unknown random variable $X: \Omega \mapsto [a,b] \subset \mathbb{R}$, let us imagine we want to estimate $\mathbb{E}(X)$. We can sample sequentially as many times as desired, let us say $m$ ...
39 views

### solve an exercise of two samples using Kolmogorov-smirnov

I'm looking for books and information like crazy and I can not find what I need. Well the example proposed is about methods that have been used in literature students and these are the data collected: ...
31 views

### Probability Integral Transforms (Not getting U(0,1))

I am trying to transform my GARCH standardized residuals to PITs in order to use them in a copula. The following code has been so far applied: ...
193 views

### Why does the ks.test function give a p-value of 0 for these two samples?

I have two numeric data vectors: NA_Sales and EU_Sales, which are really similar. When I plot their ECDFs like this: ...
I want to test if a given sample $x$ of $n = 500$ continuous observations is uniformly distributed on a given interval of $[a,b]$ ($a = min(x)$ and $b = max(x)$). Therefore I would like to compare the ...