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
0
votes
1answer
17 views

Test of difference: 2 KS tests or one?

I have two unrelated groups and am looking to perform a test for difference. Before I can do that, I need to perform a Kolmogorov–Smirnov (KS) test for normal distribution so I can decide whether to ...
0
votes
0answers
7 views

How to compare different levels of discrete variable?

I have a discrete variable that $P(X_{n, m}) \sim {\displaystyle \operatorname{Pois}(\lambda)}$ where $n$ and $m$ are the minimum and maximum values that it can takes respectively. I want to analyse ...
1
vote
2answers
36 views

Issue with Kolmogorov - Smirnov test implementation in Matlab?

I observed a strange behavior of the 2 sample Kolmogorov - Smirnov test in Matlab and I'm not sure if I missing the obvious or if there is indeed an issue with implementation of the test? Below is a ...
0
votes
0answers
25 views

Can I use K-S statistic to determine best fit even when the null hypothesis is rejected?

I'm comparing data from two different models, I also have the real data. I want to demonstrate that one model fits the real data distribution better than the other model. Unfortunately none of the ...
2
votes
1answer
32 views

Comparisons of distributions: How to deal with discrepancies between visual impression and statistical tests (K-S, ranksum)?

I'm having some doubts how to properly compare my data (because of visual discrepancies), represented as histograms. Here's an minimal and representative example, illustrating the data: I measure BMI ...
1
vote
2answers
44 views

How to match the distribution of one dataset when subsampling from another?

I have two datasets that measure the same variable under different conditions. The first dataset (d1) is much larger (9,000 observations) than the second dataset (d2; 900 observations). A histogram of ...
0
votes
0answers
18 views

Test goodness of fit of a multivariate distribution via testing GOF of linear combinations of components

I am modeling a continuous bivariate distribution of a random vector $(X_1,X_2)$ using a copula. I would like to assess how well I am doing. Given a data sample, I could probably do a bivariate ...
0
votes
0answers
16 views

Calculating the sample cumulative distribution function for a Kolmogrov-Simulation test to examine the goodness of fit with given data [duplicate]

I have sample data for 'Times between successive crashes of a computer system' which is for a 6 month period and the data is given in hours. The data in brief is : 1,10,20,30,40,52..... I need to use ...
0
votes
0answers
11 views

Comparing CDFs, Kolmogorov-Smirnov, Max/Average?

I'm in the process of building a python group of classes that will calculate many CDFs for a large number of samples. I then want to compare the CDFs of all the samples to see if any two samples could ...
0
votes
0answers
19 views

Kolmogorov-Smirnov (KS) test two-sample eCDFs and Dmax

I am running the two sample KS test to see whether two models are similar or not. Now the KS test does give me the answer to my question. But I have a question regarding the eCDFs and Dmax computed by ...
0
votes
1answer
39 views

How to interpret KS statistic and p-value form scipy.ks_2samp?

I just performed a KS 2 sample test on my distributions, and I obtained the following results: CASE 1: statistic=0.06956521739130435, pvalue=0.9451291140844246; CASE 2: statistic=0.07692307692307693, ...
0
votes
0answers
12 views

Comparing Feature's Distribution in Logistic Regression

I was running Logistic Regression on some data. After some RFE, correlation testing and so on, I was expecting some features to play a determining factor. However, seeing at the coefficients given ...
0
votes
0answers
21 views

Quantifying if two datasets are from the same distribution, if I only have distances

Let's say that I have two datasets. The target dataset is 1K instances, the "predicted" dataset is 1M instances (but I could downsample). I can compute the distance between instances. How do ...
0
votes
0answers
18 views

Appropriate exponential goodness of fit test for unknown parameter

I have a set of univariate data (n=1000) that I believe to be exponentially distributed. I also have a separate, but inexact, prior estimation for the mean or parameter of the distribution I expect ...
1
vote
0answers
7 views

What statistical tests or procedures should I conduct for analyzing a repeated measures design experiment?

I have conducted a repeated measures design experiment on Paivio 1971's dual coding experiment, but my two conditions are Dual-Coding (visual + auditory) and Auditory on Animal Sounds. There are two ...
1
vote
1answer
45 views

Normality assumption: how deal with them? [duplicate]

I would like to ask whether there's a way to decide which test is the strongest in accomplishing the normality condition. Let's take this example, using a dataset I'm working on: ...
2
votes
1answer
88 views

Can I simulate a two-sample K-S test when I can't perform a one-sample test because a distribution parameter is unknown?

Let's say I have a signal which I want to test for normality. I know that the mean from the theoretical distribution is zero, but it has an undetermined (unknown) variance. If I knew mean and variance ...
1
vote
1answer
62 views

Trade-off among statistical tests

I was reading up on the KS test and I got a doubt why is it not okay to check with this test when there is a statistically significant difference between the two samples: Sample 1, taken from t=1 to ...
1
vote
0answers
21 views

Whitney Mann U test vs Kolmogorov Smirnov for a highly skewed continuous variable

I would like to compare task time to completion distributions (measured in minutes) across two groups. The distributions are highly skewed (the means are 300 to 400 times larger than the medians) and ...
1
vote
0answers
23 views

How to test if the influence of changing a parameter is larger than the influence of random noise?

I have an algorithm under test that generates a vector of results, influenced by an underlying RNG. I want to test whether, when I change parameter a, the results change 'more' then when changing the ...
0
votes
1answer
47 views

Distribution of p-values from scipy ks-test

I wast trying to understand how kstest works using scipy. I generated chi2 random variables and then checked if the values follow the chi2 distribution. The codes are shown below. ...
3
votes
1answer
25 views

Probability of sample distribution being different from population distribution

I have a population distribution I know is exponential, with mean $\mu_1$. I also have a sample of the population (of size $n$) that appears to be exponential with mean $\mu_2$. I have all the $n$ ...
1
vote
1answer
61 views

Kolmogorov-Smirnov test returning a p-value of 1

I have two datasets data1 and data2 with different sample sizes: over 50,000 and around 8,000, respectively. These data consist ...
0
votes
1answer
26 views

Is the set of distribution $\{ X | \max_t |f_X(t) - f_Y(t)| \leq \epsilon \}$ convex, where f is the cdf or inverse cdf?

I'm trying to figure out if the set is convex, where the maximum difference between cdf(or inverse cdf) of X and a reference distribution Y is smaller than $\epsilon$. 1. Let $f_X(t)$ denote the cdf ...
0
votes
0answers
56 views

Testing uniform distribution of a discrete function derived from a random number generator

(Forewarning: I'm a programmer, not a statistician, so I apologize in advance for any misuse of terminology!) I'm testing a known random number generator that implements the PCG algorithm. This RNG ...
0
votes
0answers
47 views

Is KS statstic (in classification) from ROC Curve same as K-S from cum Gain curve or PR Curve?

This is related to classification problems (specifically binary classification problems covered in scoring) where curves referenced below are used. I understand each of these curves for a classifier ...
0
votes
0answers
14 views

Comparison of medians in data with multimodal distributions

I'm comparing continuous data obtained at two different time periods with the distributions seen below. They appear fairly similar, but they're clearly non-normal. The ideal hypothesis is that the ...
0
votes
0answers
35 views

I wanna know how to compare the distribution similarity of two d-dimensional sample sets

I wanna know how to compare the distribution similarity of two d-dimensional sample sets, I know Kolmogorov-Smirnov, but this algorithm can only be used in one dimension, right? I also know the KL ...
0
votes
1answer
53 views

How to differentiate statistically between two numerical continuous datasets?

Sample from: Green - Gamma(45, 1); Red - Normal(375, 19) These two samples clearly come from two different distributions. Is it possible to verify that these two samples come from two different ...
0
votes
0answers
23 views

different results between the published paper and my code to calculate the p-value of Kolmogorov–Smirnov (K–S) test using R

I want to know if the following distributions fit the given data well or not. I used the Kolmogorov–Smirnov (K–S) statistic for the following two distributions but, i obtained different p-value of k-s ...
-1
votes
1answer
65 views

Kolmogorov-Smirnov two-sample test p-value evaluation

I'm using python's scpipy implementation of the Kolmogorov-Smirnov two-sample test (ks_2samp). Q1: Why are my p-values in the examples below so low, specifically on the first example? Q2: Can I ...
1
vote
0answers
48 views

Why are people using KS statistic to choose cutoff for binary predictions?

I've seen that people are sometimes using Kolmogorov-Smirnov statistic to determine a cutoff in a binary classification models, such as logistic regression. However, i do not fully understand why and ...
0
votes
0answers
24 views

Statistical power of the Lilliefors test: how to compare results for samples of different sizes?

The power of the Lilliefors test (LT) strongly depends on the sample size. I need to apply LT to a discrete distribution to find the minimum value m_min above which it is exponential. I need to do it ...
0
votes
0answers
27 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
1answer
42 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
41 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
10 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
25 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
43 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
183 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
35 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
72 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
67 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
15 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
55 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
35 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
31 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
45 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
23 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
2 3 4 5
11