# Tagged Questions

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.

8 views

### Comparing 2 sets of distributions

I have a data set where I have 2 groups of samples, each with 5 samples within each group. Each sample has a distribution of particle sizes within it (500 or more items in each distribution). How do I ...
32 views

### Detecting relationships between two sets of circular data

I have a set of points $(x_i,y_i)$ where each x & y value is circular & can take on a value from -pi to pi. (The topology of the data is a torus, but I am not sure how relevant that is to the ...
32 views

### Python Scipy - How to test the goodness of fit only for a part of an exponential probability density function?

I have a dataset that contains the distance (in cm) between the emission point and the interaction point of about 50 000 fluorescence X-rays. When I plot its histogram, I should expect an exponential ...
5 views

### Comparing two CDF with normalized Kolmogorov-Smirnov

The Kolmogorov-Smirnov (KS) test is a well-known metric if you want to compare two CDF. It computes the maximum difference between the two. The main concern I have ...
104 views

### Understanding Kolmogorov-Smirnov test in R

I'm trying to understand the output of the Kolmogorov-Smirnov test function (two samples, two sided). Here is a simple test. ...
24 views

### Which nonparametric test should I use

I am currently doing an experiment to test whether there is a significant difference between test results of a control group of steel bars of good shape and another group of corroded steel bars. I do ...
11 views

### Two-sample Kolmogorovâ€“Smirnov test with unequal samples [duplicate]

I did a simulation and the outcome's size was almost 30k. The other sample I want to compare them has only 50. Can I still do the test or should I radnomly pick 50 from the first and do it?
73 views

### Kolmogorov-Smirnov test applying in R

I tried to use the Kolmogorov-Smirnov test to test whether a sample is exponentially distributed. With the try and error method I tried a couple of rates. This is a small simple example of what I do: ...
51 views

### how to measure similarity of two datasets (matrices) of different length

There are related questions being asked already but my problem is i can't find a good method of measuring similarity between two datasets that are represented by various lengths of matrices. For ...
9 views

### Check distributions - Hierarchy

We are analysing imaging data of synapses in brains of multiple animals of different genotypes (groups). I have variable number of synapses in each animal. I am measuring the volume of each synapse....
22 views

### Two Sample Discrete K-S Test

Recently I got a review for a paper that asked me to show that two probability distributions match. They hinted that I should perform Two Sample K-S test. I know there is a discrete R package dgof to ...
20 views

### two samples comparison with cyclic variables

How to check if two samples are from the same distribution, when the variable is cyclic? A simple answer for non-cyclic variable is the Kolmogorov-Smirnov test. What is the equivalent for cyclic ...
54 views

### Can I compare goodness of fit using the Kolmogrov-Smirnov test, if the distributions have a different number of parameters?

It seems that lognormal and Burr distributions are the best to fit my data. Can I compare their goodness of fit using a Kolmogorov-Smirnov test? The lognormal has 2 parameters whereas Burr has 3. To ...
39 views

### Estimate new values from a sample

I'm looking for a way to demonstrate how many individuals (N) are required to reach a known (Y) value. More specifically: I have N DBH (diameter breast height) measurements. N is a sample from a ...
101 views

### Kolmogorovâ€“Smirnov test vs. t-test

I'm having some difficulty in understanding the interpretation of the 2 sample KS test, and how it is different from a regular t test between 2 groups. Lets say I have males and females doing some ...
52 views

### Pool data from two different points of time with different attendants

I have two samples (each nurses) one from 2008 and the other drawn 2013. Both got the same questionaire to fill out. Now I would like to pool the data but do not know if I just can do it. My idea was ...
3 views

### “Less Than”/“Greater Than” k-Sample Anderson-Darling

I want to compare two ECDFs using the Anderson-Darling test. Specifically, I think one ECDF is less than the other akin to a one-tailed test. I know that you can do this with the Kolmogorov-Smirnov (...
19 views

### How to compare binned CDFs?

We want to compare binned CDFs from sampled data. Each CDF is 101 numbers representing percentiles, i.e., $P(x<a_k)=k/100$ where $k=0..100$. The sample size is 1-3k (unknown at comparison time ...
10 views

### Compare between median/IQR and reference mean/SD

I have a small set of non-normally distributed measurement data (Kolmogorov-Smirnov rejected similarity to a normal distribution) and a reference value from a large population (n=120) of healthy ...
15 views

### Comparing count groups/hisotgrams with different bins

I'm looking at clustering techinques for which I have a ground truth. From the ground truth I can extract the cardinality (size) of clusters and I would like to test how well different methods can ...
21 views

### Seemingly random results from kstest2 function in MATLAB

I'm trying to understand the kstest2 function in MATLAB so I can use it to check if output samples from two models are from the same distribution. The first thing I did was run a test to make sure ...
15 views

### Method to justify claim that two samples come from the same distribution

I know of ways to test "whether" two data sets come from the same distribution, in the sense that I can treat the hypothesis that they are from the same distribution as the null hypothesis. However, ...
48 views

### Interpreting Kolmogorov Smirnoff Test

I have two sets of data and I want to determine whether they come from similar distributions or not so I am using the Kolmogorov-Smirnoff Test. So I understand that if I get a p-value of less than 0....
26 views

### Variable that discriminates but performance metrics don't improve

I have a score adjusted by a logistic regression done with variables let's say X1 to X5. I'm not including a variable X6 to be chosen. Now, if I let the algorithm (stepAIC from R) choose among all of ...
31 views

### How do you do power analysis with a non-parametric approach?

How can we determine the sample size needed (aka do Power Analysis) for non-parametric approaches like the Mann Whitney U test or the Kolmogorov Smirnov Test?
9 views

### Test if the distribution of a discret sample came from a known distribution [duplicate]

Hello I have a sample and I want to test if it is drawn from a discrete distribution (Binomal for example), I read that the KS test is more used, but as you know, the KS test can only be used for ...
36 views

### Kolmogorov-Smirnov test between two distributions - R

I've two distributions computed on the same grid (that is, for each point of the grid I know the value of each CDF at that point). I want to check whether the two distributions are the same. I can't ...
304 views

### 2 Sample Kolmogorov-Smirnov vs. Anderson-Darling vs Cramer-von-Mises

I was wondering what are the criteria to use Kolmogorov-Smirnov, Cramer-von-Mises, and Anderson-Darling when comparing 2 ECDFS. I know the mathematics of how each differ, but if I have some ECDF data, ...
23 views

### Test for Divergence in Two Large Vectors Non-Normally Distributed

I have very large sets of biological data, ca. 5,000,000 points, which are the proportion of methylation throughout the genome. Data is therefore on 0-1 scale. I am looking at testing distribution ...
19 views

### Area Based Kolmogorov Smirnov

I have several sets to two ECDFs that I want to compare. I know I can use the Kolmogorov-Smirnov test (and I have) but one set of ECDF is returning statistically significant when I suspect the ECDFs ...
39 views

### KS test with estimating parameters in t-Student case

I have some doubt: practically my dataset, graphically speaking, seem generated from t-student o similar distribution. If I estimate Normal on the data, also graphically, the fit is no good and ...
43 views

### How to estimate ratio of variances?

Suppose we have two time series generated by \begin{align} x_t &= \sigma_t\,e_t \\ y_t &= c\,\sigma_t\, f_t \end{align} where $e_t$ and $f_t$ are IIDs with mean zero and unit variance. We don'...
60 views

### Two-sample Kolmogorovâ€“Smirnov test with weights

I have to compare two datasets. The first is real data, while the second is a simulation. I want to look just to one variable in the datasets, and testing if it is compatibile between data and ...
43 views

### Can K-S goodness-of-fit be used on estimated models? [duplicate]

For example, for a dataset generated from lognormal distribution, I estimate a normal distribution from that data (using maximaum-likelyhood or whatever methods). Then, can I perform K-S test to ...
212 views

### How to check for the distribution stability?

I need for verifying that the training set I'm using to build a model is equally distributed to the test set. The model is for prediction purposes and I think it is necessary the 2 samples are ...
204 views

### Comparing two (or more) discrete distributions

I would like to know what the most powerful way of comparing two (or more) discrete distributions is. I know that the Kolmogorov-Smirnov test could be used (if corrected for the discrete ecdfs), and/...
36 views

### Goodness of fit test for bivariate distribution?

I have a dataset which is x-y distributed, and I fitted a model for it. (see below, left and right) How can I test the goodness of fit for the model I fitted? ...
101 views

### Comparing two ECDFs using Kolmogorov-Smirnov test (alternative hypothesis)

I am taking measurements of a computer system performance over time and I'd like to understand if the performance is degrading or improving as time passes.. After doing some research, I picked the KS ...
320 views

### How to perform a Kolmogorovâ€“Smirnov test for a Poisson distribution in Stata?

I have a sample with count variables, i.e. overdispersed data. My data looks like it is distributed as either a negative binomial distribution or a Poisson distribution. I want to test these two ...
58 views

### Check if distribution is bell-shaped

I am not necessarily interested in testing normality, but at least ensure that: The mean is near 0 There is single mode Tails are thinning out as you go further from the mean Any ideas?
76 views

### Normality test with large data set

I think I am dealing with this issue http://www.r-bloggers.com/normality-tests-don%E2%80%99t-do-what-you-think-they-do/ I have large data set(10k data points) that slightly diverges from normal, and ...
40 views

### 2 sample KS test for time series data - portion vs. whole

I have time series data and I want to know whether preserving only a limited portion (say first 300 seconds) and discarding the rest would still leave me with a good estimate of the shape and spread ...
110 views

### Why would the Critical Values increase as you decrease the Level of Significance for the Kolmogorov-Smirnov Goodness of Fit Test?

This same exact (similar) question is posted on this thread: Why does the critical value varies inversely with the level of significance in hypothesis testing? However, that question and its answer (...
14 views

### Multiple sampling problem

I have a question about multiple sampling. I estimated parameters of lognormal distribution for some dataset. Then I generate 1000 samples of size 1000 from this dataset and test with Kolmogorov-...
69 views

### KS-Test in R comparing several distributions

I have the following situation: A plot consisting of 4 sub-plots(A-D), each have N trees on it with the diameter d. My aim was to test if the diameter distributions are the same in the 4 subplots and ...
98 views

### Two-sample Kolmogorov-Smirnov test with errors on data points

Short version I want to test if two samples, which follow a skewed distribution, can be distinguished from each other. A Kolmogorov-Smirnov statistic for two samples would be sufficient if there was ...
133 views

### Kolmogorov-Smirnov test with dependent data

Let's say, I have 100 students, each of them have 2 scores: reading score and writing score, so basically I will have 2 vectors with the length of each is 100. I want to test the distribution of ...
16 views

### Probability that sample distribution of nominal variables came from the population

I received a list of approximately 500 social security numbers that I noticed tended to start with a certain number. I plotted the distribution of the numbers over the population of several million it ...