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.

Filter by
Sorted by
Tagged with
1
vote
1answer
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 ...
0
votes
1answer
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
0
votes
1answer
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 ...
0
votes
0answers
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 ...
2
votes
1answer
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 ...
0
votes
1answer
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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) ...
1
vote
1answer
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 ...
1
vote
3answers
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 ...
2
votes
0answers
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 ...
3
votes
0answers
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 ...
1
vote
1answer
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,...
0
votes
0answers
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 ...
1
vote
0answers
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
1
vote
1answer
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 ...
0
votes
0answers
7 views

Compare two Kolomogorov tests with exponential distribution

I try understanding implementation of Kolomogorov test for one Sample. ...
1
vote
0answers
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 ...
0
votes
0answers
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 ...
0
votes
0answers
23 views

Is my observation in a lecture about Kolmogorov–Smirnov test correct?

I'm reading Kolmogorov–Smirnov test from a lecture note from MIT OpenCourseWare Statistics for Applications. In the lecture note, there are two important theorems: and It seems to me that $H(...
2
votes
0answers
18 views

Is this theorem wrongly stated on the lecture about Kolmogorov–Smirnov test?

I'm reading Kolmogorov–Smirnov test from a lecture note from MIT OpenCourseWare Statistics for Applications. In the lecture note, there are two important theorems: and It's unfortunate that ...
0
votes
0answers
30 views

Is 1-sample Kolmogorov–Smirnov test a special case of 2-sample one?

I asked this question before on MSE. It seems to me that I'm unlikely to receive any answer. So I post it here. As long as I get an answer from either site, I will make an update for them. I'm ...
0
votes
0answers
12 views

Good Book suggestions for model validation statistical tests? (Gini, Kolmogorov-Smirnov, Binomial/Adjusted binomial tests, Chi-square)

Any good books suggestion for the above mentioned topics such as Gini, Kolmogorov-Smirnov, Binomial/Adjusted binomial tests, Chi-square etc. tests?
4
votes
1answer
36 views

How to compare the distributions of censored data?

Is there a way to test if the distributions of the two samples of censored data? As the data is not defined exactly, Kolmogorov-Smirnov test does not seem to be directly applicable. Generally ...
0
votes
0answers
56 views

Binning of data before Kolmogorov-Smirnov test usage

I would like to quantify the difference between two sample sets using KS test. If i apply the test on the original data, the returned p value is less than 1%, but if I bin the set the returned p value ...
1
vote
0answers
67 views

Two sample Kolmogorov-Smirnov test in repeated measure

in the within-subject study design, I am comparing the two measures instrument (questionnaires) that are supposed to measure the same thing. Each gives us a single variable each (let's call it x1 and ...
1
vote
0answers
42 views

Whats the difference between Chi - Squared test vs Kolmogorov–Smirnov test? [closed]

I have two histograms that I want to compare to see if they come from the same distribution. I use the the Chi - Squared test and KS test and compare the p-values for statistical significance. The two ...
1
vote
0answers
315 views

testing for continuous uniform distribution in python

I'm setting up a statistical experiment. I am investigating whether a list of real values follows a continuous uniform distribution. In scipy, there is kstest to do it, I find it not robust after ...
0
votes
0answers
32 views

Two sample Kolmogorov–Smirnov test for multivariate data using random projections

I am not a statistician. I have multivariate data, of low dimensions, e.g. $d=10$. I want to show that after applying some transformations my data looks "more similar" than before. I came up with the ...
1
vote
1answer
39 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 ...
0
votes
0answers
26 views

Testing asymmetry and normality directly on my time series

I have to choose a model for my financial time series, I have daily frequency data and I want to estimate a conditional heteroskedastic model. I have already done all the estimation for the GARCH(1,1) ...
2
votes
0answers
31 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 ...
0
votes
1answer
323 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 ...
7
votes
2answers
576 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 ...
0
votes
2answers
61 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 ...
0
votes
1answer
44 views

Checking the normality of a large sample?

If I want to analyze a large sample size (N = 50.000) of continuous data ($ revenue) from an A/B test, what would then be the best way to check for normality? Thanks in advance!
1
vote
1answer
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 ...
2
votes
0answers
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 ...
1
vote
1answer
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. ...
1
vote
0answers
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 ...
2
votes
1answer
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 ...
0
votes
0answers
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 ...
1
vote
1answer
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 ...
3
votes
1answer
35 views

Scipy Kolmogorov Smirnov test

I wanted to know what is significance level (alpha) in scipy's Kolmogorov test. Here is a link to documentation page. I couldn't find anything in its documentation.
1
vote
1answer
174 views

Difference between QQ plot and KS test

While solving some exercises for HW, I came up to use QQ plot and KS test for the sake of testing goodness of fitting, where I also came up with the following doubts: Precisely, let $X, Y \sim \text{...
6
votes
1answer
113 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 ...

1
2
3 4 5
…
11