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
0
votes
0answers
10 views

Feature selection using LASSO and KS tests

I have derived a binary classification model using LASSO-based feature selection and got a list of 10 features that gave an overall AUROC 0f 0.83. Now I wanted to check whether there exist any class-...
0
votes
0answers
11 views

KS Test for Hawkes Process

I am analyzing some data by applying 1d-Hawkes processes. To evaluate the fit of the model itself (and particularly the chosen kernel, i.e. exponential), I am performing a KS test. However, it is not ...
0
votes
1answer
38 views

Is the following approach a reasonable way of defining $p$-value thresholds?

I have many small sets of data (each sample containing 8 to 64 individual points) which I would like to test for normality. I want to do this with two main tests: Shapiro-Wilk Kolmogorov–Smirnov ...
0
votes
1answer
4 views

Comparing species size distribution across multiple habitats

I am looking at one species' size distribution across three primary habitats, we'll call them Habitat A, B, and C for simplicity. I have taken multiple samples (seine tows) within each habitat (n ...
0
votes
1answer
15 views

two-sample Kolmogorov-Smirnov test suggest that sample with the same data generating process from different populations

I have two different samples I need to test if they are drawn from the same population distribution. The two samples are of the volatility of an asset that I simulated. Since the data is simulated I ...
1
vote
1answer
27 views

Intepretation of $p$-values for a Kolmogorov-Smirnov test

I'm using a Kolmogorov-Smirnov test to examine how normal (or Gaussian) some data sets I have are. I am having trouble with interpreting the $p$-values (surprise surprise). My present understanding is ...
1
vote
2answers
101 views

Kolmogorov-Smirnov and AIC giving opposite goodness-of-fit results. Is this possible/surprising/normal?

I have some data on the duration of several activities (rounded to the nearest half hour). I'm trying to add up these random variables (one per activity) so that I can calculate the total duration of ...
2
votes
0answers
30 views

comparing gene expression distributions with replicates

I have gene expression data for single cells (hundreds per sample) in two conditions that I would like to compare. For each condition I have 4 replicates. So in essence I need to compare 4 ...
0
votes
0answers
18 views

Is it accurate to take the maximum distance between CDF and ECDF only at the edges? (Kolmogorov-Smirnov Test)

I have two samples, one obtained empirically and the other is the result of a simulation. I want to tune the simulation so that the result resembles the reality, for that I will minimize the KS ...
0
votes
0answers
24 views

KS two sample test, p-value equal to 1

I have done a KS two sample test with the following samples: I have received a P-value of 1, I was expecting a high p-value but I thought this value can never reach 1 unless both samples are exactly ...
0
votes
1answer
58 views

Appropiate test for comparing integer distance distributions

I am trying to determine if wildfires occur closer to forests or not. For this, I have two matrices with the same shape: A matrix of ones and zeros where each value represents whether a fire is ...
0
votes
0answers
14 views

Significant change over NxM distributions

I have 100 sets of data, each of which consists of ~ 15 distributions along time, I've attached a figure of 1 of these sets to hopefully clear up what I mean. The plot shows the 95% confidence ...
1
vote
1answer
38 views

Distribution Selection based on Kolmogorov Smirnov Test

I am trying to model the distribution of some non normal data, to do so i am fitting many different distributions(Student, Pareto...) to the data. When computing the Kolmogorov Smirnov Statistic for ...
0
votes
0answers
30 views

What distribution could the data stem from?

From checking the histogram of the distribution I had the intuition that the data could follow a Poisson or an exponential distribtuion. However, Lilliefors test that the data is exponentially ...
0
votes
0answers
19 views

Why do I have different KS test results?

I have been using scipython ks2samp to apply a two sided , sample KS test to some data. import scipy.stats as ss import numpy as np All_smirnoff = ss.ks_2samp(X, Y) where X and Y are two 1D numpy ...
1
vote
1answer
33 views

goodness-of-fit and bootstrap

Assume one has two data samples: $X = \{ x_{1}, \dots, x_{n} \}$ and $Y = \{y_{1}, \dots, y_{m}\}$. Next, we aim to check if the data $Y$ was generated by the same data generating process (DGP) as $X$ ...
0
votes
0answers
17 views

Unexpected behaviour of Anderson Darling test for normality for low sample size

I’m testing the power of the Anderson Darling test to detect deviations from standard normal distributions. I’m calibrating the AD test statistic numerically using python and I noticed an unexpected ...
1
vote
1answer
38 views

Identifying data generating process by testing

Assume one has two data samples: the first one , $X = x_{1}, \dots, x_{n}$ and second, $Y = y_{1}, \dots, y_{m}$, with $m \ll n$. I aim to check if the data $Y$ was generated by the same data ...
0
votes
0answers
14 views

Chapman kolmogrovs equation diffrential vs integrated

I wasstudying about the markov chains and jumps properties and ways to solve and form equation about them when I came across the chapman kolmogrovs equation. So i just wanted to ask when should i use ...
1
vote
1answer
27 views

Two-sample Kolmogorov-Smirnov, Anderson-Darling, and after?

I am trying to investigate the differences between two datasets. Each one is composed of 20 000 elements obtained from a Monte-Carlo method whose implementation slightly differs in both cases. I'd ...
0
votes
0answers
27 views

p-value to Z-statistic for a KS test

Say you had a two tailed normal distribution A for some dataset, and you then measured the probability that some set of data points ...
0
votes
1answer
54 views

How to find ks test statistic using the given maximum likelihood estimator values and a sorted data in R?

The random variable Y is said to have a two-parameter APE distribution denoted by APE(α, λ), with the shape and scale parameters as α > 0 and λ > 0, respectively, if the PDF of Y for y > 0 is ...
0
votes
0answers
28 views

p-values not uniform in KS simulation with estimated parameters

I want to perform a bootstrap/simulation of the significance of a KS test in some observed data and have come up with some synthetic examples to make sure my code works, which I base off Greg Snow's ...
1
vote
1answer
26 views

Finding the difference between a normally distributed random number and randn with an offset using Kolmogorov-Smirnov test and Chi-square test

A normally disturbed random number is generated using randn function in Python. The KS test and Chi-square test is performed to check if the generated numbers belong to a Gaussian (zero mean, unit ...
0
votes
0answers
48 views

power of paired Kolmogorow-Smirnov test

Is the following conclusion correct? Assume I have two data samples, with $n$ and $m$ the sizes of first and second samples respectively. Next, I perform Kolmogorov-Smirnov test with some significance ...
0
votes
0answers
27 views

2D-KS test vs Mann–Whitney U test

Probably this is an easy thing, but I want to know what is the difference between 2D-KS test and Mann–Whitney U test and when to use which one? What I have understood that Mann–Whitney U test is a non-...
0
votes
0answers
13 views

Comparing similarity of samples under time-dependant noise (KS-test for dependant samples)

I'm measuring response times of a process under different inputs and want to check if the input correlates with the response time. The problem is that the differences I'm expecting are small while ...
3
votes
2answers
46 views

Testing for uniformity of p-values with multi-modal samples

I'm working with data that is multi-modal, I need to be able to check if the individual samples are statistically distinct or not, so I'm running KS-test against pairs of samples. But I've noticed ...
0
votes
0answers
25 views

Simulating p-value statistics for Liliefors test (Python statsmodels)

Python statsmodels has an implementation of Lilliefors' test for goodness of fit (i.e. if the parameters of the distribution were obtained from fitting the data and not per-determined as in the ...
0
votes
2answers
80 views

Kolmogorov-Smirov two sample test, ties — will adding random noise fix the problem?

There are a lot of questions on this site about warning for "ties" in the Kolmogorov-Smirnov test. Here are a few of those questions. Is there an alternative to the Kolmogorov-Smirnov test ...
0
votes
0answers
10 views

Determine if a distribution of ranks is significantly skewed towards low values

I have N vectors of varying length. The values are samples of ranks that have been normalized to be between zero and one. I would like to determine the M vectors (M < N), for which the distribution ...
3
votes
1answer
68 views

bootstrap KS 2 sample test

I have two datasets $S_1$ and $S_2$. I can run KS 2 samples test on these datasets to obtain the value of the KS 2 samples test. Is there a correct way to bootstrap the KS 2 sample test using the ...
0
votes
0answers
26 views

How to construct Kolmogorov Smirnov test to check which distribution fits to given data in R

So, if for example I generate random sample of 1000 from exponential distribution and then simulate ks.test. for many times I get a normally distributed data, here is the code: ...
1
vote
1answer
53 views

Feature selection by doing pairwise KS test between different features in a dataset

I am trying to build a supervised learning model (binary class) and I wanted to check whether the features belonging to the respective classes come from the same distribution or not. Because the ones ...
5
votes
2answers
85 views

Can I use the Kolmogorov-Smirnov test with estimated parameters?

If I estimate the parameters of a distribution $\theta$ using MLE. Can I use the Kolmogorov Smirnov test to check the goodness of the fitted model?
36
votes
4answers
2k views

Intuitive explanation of Kolmogorov Smirnov Test

What is the cleanest, easiest way to explain someone the concept of Kolmogorov Smirnov Test? What does it intuitively mean? It's a concept that I have difficulty in articulating - especially when ...
1
vote
0answers
12 views

Fitting a range of distribution and test for goodness of fit - choose based on p-value or chi-squared values?

I have data for which I want to study the best distribution that fits this data. I am following this blog post to do my experiments. Basically the following things are happening: fit a number of ...
1
vote
2answers
46 views

Why do I get strange results from the Kolmogorov–Smirnov two sample test?

I'm trying to understand the output of the Kolmogorov-Smirnov two sample test. I have two columns, test1 and test2. I'm having some difficulty in understanding the interpretation of the ...
0
votes
0answers
16 views

What statistical test to compare stratification power of a variable?

I've got a big database with many (10000s) numerical variables and a categorical variable. The categorical variable stratifies samples into 2 groups, A and B. I want to find the numerical variable ...
2
votes
0answers
22 views

Testing similarity of time series

I am looking for a metric and the associated statistical test to compare two time series or to determine whether a short series has the same parameters as the long one. The series are likely modeled ...
0
votes
0answers
7 views

Goodness of fit test as a random variable

I have two datasets coming from two different distributions and I want to apply goodness of fit on these two datasets to check if they are coming from the same distribution. For the sake of argument, ...
3
votes
1answer
55 views

Can I conduct Kolmogorov-Smirnov test on censored data?

Normally, Kolmogorov-Smirnov is conducted on full, uncensored data with test statistics. $$ sup_x |F(x)-F^*(x)| $$ Or equivalently, $$ sup_x|S(x)-S^*(x)| $$ ,where $F(x)$,$S(x)$ is proposed ...
0
votes
0answers
17 views

Distance between two multivariate kernel density estimates

I tried using the ks2samp to compare two multivariate kernel density estimates. Is it the right way to compare two multivariate densities?
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
29 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
11 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
202 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
21 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
30 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 ...

1
2 3 4 5
11