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
3 votes
1 answer
75 views

Usefulness of KS tests and other similar distribution comparing tests

I am working on a machine learning binary classification problem. I have an outcome variable status called as loan paid and <...
user avatar
  • 1,780
1 vote
1 answer
21 views

Manually estimate KS statistic

I use the proc npar1way with the edf option to produce the KS statistic. My aim is to use KS to understand if the sample (smp) is different from the population (pop). When I run the proc npar1way I ...
user avatar
  • 335
0 votes
0 answers
24 views

Gini Coefficient and KS statistic conflict

What would it mean if the interpretation of the gini coefficient and KS statistic conflict with one another? In a scorecard model, if they were to conflict should you rely on one over the other?
user avatar
  • 1
0 votes
0 answers
11 views

Finding an optimal split of a sample, based on distance of sub-sample's empirical distributions

Consider a sample $X$, consisting of $n$ observations that are independent (but not necessarily identically distributed), as well as two splits $S_1 := (X_{1,\dots,i}, X_{i+1, \dots, n})$ and $S_2 := (...
user avatar
0 votes
0 answers
34 views

KS-Test and KL-divergence have diffrent result

It is a similar question to this but it didn't help me When KL Divergence and KS test will show inconsistent results? I have run into a situation in which I have no clue how to interpret it. I tried ...
user avatar
  • 73
2 votes
0 answers
36 views

Test for distribution equality

This question touches Kolmogorov-Smirnov testing, but asks actually something different. Consider independent random variables $X_1, \dots, X_n$. I want to test the following hypothesis: $$ H_0: X_i\ ...
user avatar
0 votes
0 answers
18 views

Kolmogorov-Smirnov inconsistency with increasing dataset sizes

I want to compare two arbitrary distributions and know that Kolmogorov-Smirnov is one such test that can handle any non-normal distribution. I noticed however, that p-values returned by the KS test ...
user avatar
  • 101
7 votes
2 answers
2k views

Kolmogorov-Smirnov Test in Python weird result and interpretation

I have difficulties to understand how the Kolmogorov-Smirnov Test works. If I want to know if my samples are from a specific distribution (for example from the weibull distribution) I can compare my ...
user avatar
  • 73
0 votes
0 answers
11 views

Detecting Mean differences on streaming data

Im taking online measurements on highly skewed real valued data of two possibly unrelated distributions. The precision is low, which means small values tend to come in duplicates, while large values ...
user avatar
0 votes
0 answers
43 views

How to compare distributions with errors on the data points?

Here's a mock set-up of my problem: I have two non-normal probability density distributions (PDFs), $A$ and $B$. Distribution $A$ has error measurements for each data point while distribution $B$ ...
user avatar
1 vote
2 answers
72 views

Kolmogorov-Smirnov p-value and alpha value in python

I am having trouble understanding the scipy.stats documentation against the backdrop of a book that explains the KS-Test. The documentation (https://docs.scipy.org/doc/scipy/reference/generated/scipy....
user avatar
2 votes
0 answers
25 views

Correct hypothesis test to use here?

I have 5 samples from which I gathered data at 5 separate time points (days). Each day I observe the distribution of some RV. When I plot the distribution for each day it sort of looks like this for ...
user avatar
  • 21
1 vote
1 answer
28 views

Significance level to accept null hypothesis using KS Test

Apologies in advance if I am thinking about this in the totally wrong way. Essentially, I have a theoretical distribution that I want to test, using the KS test, if my numerical data follows the same ...
user avatar
1 vote
0 answers
32 views

KS test for more than two variables

If we have two random variables $X,Y$ and their random sample $X_1, \dots, X_n, Y_1, \dots, Y_m$. We can test whether $F_Y=F_X$ by classical Kolmogorov Smirnov test, or AD test etc ($F_X$ is the ...
user avatar
0 votes
0 answers
18 views

Time Series with Possible Discontinuity - Is the discontinuity significant?

I am just beginning to learn about statistics and statistical tests, so please forgive me if I'm using entirely the wrong terminology or I've missed something obvious. I'm trying to solve a problem ...
user avatar
2 votes
0 answers
36 views

KS-statistic decile seperation - significance?

I already referred the posts here and here but they are different and doesn't answer my problem. I am currently working on a binary classification problem with random forests, neural networks etc. ...
user avatar
  • 1,780
0 votes
0 answers
19 views

Same distribution failed and passed Kolmogorow-Smirnow-Test before and after normalization? [duplicate]

Below is the python code for the KS test. ...
user avatar
1 vote
0 answers
15 views

Formula for Leemis's m

I'm looking for the formula to calculate the statistics and the significance level of Leemis's m. Wikipedia reports the statistics as $$m = \sqrt{N}\cdot\max_{i=1}^9 \left\{ \left|\Pr (X \text{ has ...
user avatar
  • 223
1 vote
0 answers
38 views

Can I use both a Kolmogorov–Smirnov test and a T-test to compare two distributions?

I have two distributions (N ~ 300, μ = 1.89 and σ = 0.97) and (N ~ 40, μ = 1.74 and σ = 1.18). A ks_2samp returns statistic = 0.2 and p-value = 0.057. Therefore, I cannot reject the null hypothesis ...
user avatar
1 vote
0 answers
23 views

Unclear as to purpose of K-S test & U test in this study

I'm currently looking at this study's statistical measures: https://www.sciencedirect.com/science/article/pii/S0191886920302531?via%3Dihub Somewhere in the paper I noticed this: I have some questions ...
user avatar
9 votes
3 answers
828 views

Is it reasonable to use the Kolmogorov-Smirnov test to assess the normality of a random variable?

Context I am confused by the following post where the accepted answer states that : You can't really even compare the two since the Kolmogorov-Smirnov is for a completely specified distribution (so ...
user avatar
1 vote
2 answers
84 views

Kolmogorov–Smirnov statistic/distance is normally distributed?

Suppose we have two populations X and Y, then compute the KS statistic/distance for samples drawn from them. Is this KS statistic/distance normally distributed? If so, how to prove it? If not, what ...
user avatar
  • 643
2 votes
1 answer
41 views

Finding percentiles without complete data set

I have a set of incomplete data for wealth of a given population. Whilst I have the wealth of these individuals (around 27% of the population), I do not have the wealth of every individual. I do have ...
user avatar
  • 25
1 vote
2 answers
63 views

Convergence in distribution and convergence in Kolmogorov distance

Let $X, Y$ be two random variables with laws $F$ and $G$ respectively. The Kolmogorov distance between these two laws is defined as: $$ d_{Kol}(F, G) = \sup_{x \in \mathbb R} |\mathbb P(X \leq x) - \...
user avatar
0 votes
0 answers
65 views

How to Compare Data Distribution of 2 large datasets?

I want to compare two super large datasets (petabytes). I have tried to use scipy ks_2samp kolmogoroc smirnov 2 sample test, but I get all the pvalues to be 0. I tried to downsample by random sampling ...
user avatar
  • 21
2 votes
1 answer
151 views

Kolmogorov–Smirnov statistics as distance

I have a feature measured for each institution in each city. I want to calculate similarity between cities using the institutions' features. I think that if I compare the distributions pairwise and ...
user avatar
  • 123
1 vote
1 answer
34 views

Test and minimum sample size to conclude that 2 ECDFs are different

Let's say I have samples $X$ from one distribution and I am now collecting new samples $Y$ from another unknown distribution. What would be the best test to check whether the samples $Y$ come from the ...
user avatar
  • 119
0 votes
0 answers
13 views

How do I make statements about parts of distributions?

Let the following be the situation: I am measuring the occurrences of certain events (say "smiles") of individuals in the two situations A and ¬A, from which I calculate an index between -1 ...
user avatar
  • 101
0 votes
0 answers
41 views

KS-Test on Discrete Distributions on Poisson-type Process

I have two distributions of data from a Poisson-like process. The data is based on randomized searches and tallies the amount of results found in one hour. One distribution has over 300 searches, ...
user avatar
  • 123
0 votes
0 answers
30 views

KS test or chi square for comparing two distributions of a discrete ratio variable

I have a discrete ratio variable (length) from two samples and I'd like to know if the distributions are different or the same. In my case length is discrete because it can only take on integer values ...
user avatar
0 votes
0 answers
115 views

KS test on exponential distribution

I'm trying to determine how well an observed distribution matches a theoretical one However, if I do a KS test as I've been taught on this, the highest difference (KS statistic) between the two ...
user avatar
  • 101
1 vote
1 answer
37 views

Pass KS Test Fail Z Score Test

Im working with some messy data and was comparing two data sets. I used both the KS test and the Z-Score I found instances where Means would be found to be different under the Z score test but the ...
user avatar
0 votes
0 answers
17 views

Kolmogorov-smirnov test to compare how similar different pairs of samples are

Say I have a list of samples in pairs: [(A, B), (C,D), (E, F)], where A,B,C,D,E,F are different samples and can be of different sizes. Now if I want to compare which of these pairs are statistically ...
user avatar
  • 101
1 vote
1 answer
290 views

Wasserstein distance and Kolmogorov-Smirnov statistic as measures of effect size

So I've been dealing with 2 sample hypothesis testing with very large samples (around 20,000s each). Whenever I test for the equality of distribution I always reject the null hypothesis, even though ...
user avatar
  • 23
1 vote
2 answers
48 views

What is the theoretical justification of testing for equal mean/distribution via resampling?

If we have two data sets $X_1,\ldots,X_m$ and $Y_1,\ldots,Y_n$, each i.i.d., and wanted to determine whether $\mathbb{E}[X_1] = \mathbb{E}[Y_1]$ or not using $\bar{X}_m - \bar{Y}_n = \hat{\Delta}_{m,n}...
user avatar
  • 1,063
0 votes
0 answers
24 views

What is the different between 2 codes for K-S test

What is different between these two codes and when can we use them I use K-S test code in R to check normaliity for data that is generated from N(1,6) of size 5 ...
user avatar
0 votes
0 answers
24 views

Aggregating individual ks 2 samp results?

Lets say I have two servers each reporting an individual time series of cpu usage, ts_a and ts_b. I can average these two CPU usage metrics together to get an averaged or "composite" time ...
user avatar
0 votes
0 answers
37 views

K-S test for weighted histogram/samples

I have the following problem: I am estimating two PDFs using histograms, and I would like to assess how different the two are. This is in principle a classical example for a K-S test. However, I need ...
user avatar
0 votes
0 answers
54 views

Why does R give different value for one-sample K-S test?

I want to do K-S test in R. In this case, I use AdequacyModel and ks.test in R. My data: ...
user avatar
  • 41
2 votes
3 answers
282 views

Kolmogorov Smirnov Test : CDF vs PDF

Does anyone know that why in the Kolmogorov-Smirnov Test, the empirical distribution function is compared with the cumulative distribution function and not the probability distribution function? Is ...
user avatar
  • 5,718
1 vote
1 answer
52 views

Why is 'just' the supremum used for both 2-sample kolmogorov-smirnov test, as well as the kuiper's test, rather than a more comprehensive difference?

I am looking for a method to compare two distributions of numbers (whether they differ in underlying distribution). However, after reading thhrough respective wikipedia pages ( kuipers , 2-sample KS ) ...
user avatar
0 votes
0 answers
25 views

How to test stock price predicted probability distribution?

I made an algorithm that calculates the probability distribution for the stock price. How can I measure how good it is? I have stock price for Microsoft for last 20 years. And for every day ...
user avatar
0 votes
0 answers
58 views

Comparing P-Values of two tests doing the same task

There are two statistical tests which do the same thing. For instance, they both tell if two samples are generated from same distribution. KS Test (2 samples) and Anderson Darling Test (K Samples). I ...
user avatar
1 vote
1 answer
46 views

Multi-variate two-sample ANDERSON-DARLING TEST

Suppose we receive a reading of samples taken from a sensor system with multiple variables, which may be assumed as continuous real values. After few days, we receive another reading of samples from ...
user avatar
0 votes
0 answers
27 views

Kstable not fully correlated with p-value in KS-test

I have done Kolmogorov-Smirnov (ks-test) between 2 groups and I got the following values: Description Kstable p-val A1 0.64091 0 A9 0.64546 0 B67 0.74318 2.92E-20 B1 0.68636 2.14E-19 A6 0.62046 ...
user avatar
0 votes
1 answer
31 views

How do I calculate a proper sample size to get a suitable power of Kolmogorov-Smirnov test with an underlying Zipf distribution?

I have been trying to develop to calculate the sample size to maximize the power of KS test (±0.8) on an underlying Zipf distribution. I have tried estimating the power by performing simulations: <...
user avatar
0 votes
0 answers
25 views

Confused about testing my data for normality

I am starting some quantitative analysis of a dataset. My sample size is just over 100 (approx 110) and before doing the descriptive stats I attempted some normality testing to determine if I should ...
user avatar
3 votes
1 answer
64 views

Test whether or not quantile values belong to a distribution

I have a list of 23 values for the following quantiles: ...
user avatar
1 vote
1 answer
303 views

How to choose parameters for Kolmogorov-Smirnov test in python?

I am testing the set of data of coefficient J. It looks like this I want to test the normality of this set using the K-S test, but I.m not sure how the parameters should be adjusted here. I wrote <...
user avatar
1 vote
0 answers
16 views

How is Dowd's (2007) resampling procedure supposed to mitigate the problem of autocorrelated multiple-step-ahead forecasts?

Dowd "Validating multiple‐period density‐forecasting models" (2007) considers evaluation of multiple-step-ahead density forecasts. There is a know problem of dependence between forecast ...
user avatar

1
2 3 4 5
12