0
0
SciPydata~5 mins

Kolmogorov-Smirnov test in SciPy - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the Kolmogorov-Smirnov test used for?
It is a statistical test used to compare a sample distribution with a reference probability distribution, or to compare two sample distributions, to check if they differ significantly.
Click to reveal answer
beginner
What does the KS test statistic represent?
The KS test statistic is the maximum distance between the cumulative distribution functions (CDFs) of the two distributions being compared.
Click to reveal answer
beginner
In scipy, which function is used to perform the Kolmogorov-Smirnov test for one sample against a distribution?
The function is scipy.stats.kstest(). It compares a sample against a given distribution.
Click to reveal answer
beginner
What does a small p-value in the KS test indicate?
A small p-value means there is strong evidence that the sample distribution is different from the reference distribution.
Click to reveal answer
beginner
How do you interpret the KS test result when comparing two samples?
If the p-value is large, it suggests the two samples come from the same distribution; if small, they likely come from different distributions.
Click to reveal answer
What does the Kolmogorov-Smirnov test compare?
ATwo distributions or a sample against a distribution
BMeans of two samples
CVariances of two samples
DCorrelation between two variables
Which scipy function performs the KS test for one sample?
Ascipy.stats.ttest_1samp
Bscipy.stats.chisquare
Cscipy.stats.kstest
Dscipy.stats.ks_2samp
What does a KS test statistic measure?
ADifference in means
BMaximum difference between CDFs
CSum of squared errors
DCorrelation coefficient
If the KS test p-value is 0.01, what does it mean?
ADistributions are likely different
BDistributions are likely the same
CTest is inconclusive
DSample size is too small
Which test compares two samples directly using KS test?
Ascipy.stats.mannwhitneyu
Bscipy.stats.kstest
Cscipy.stats.ttest_ind
Dscipy.stats.ks_2samp
Explain how the Kolmogorov-Smirnov test works and what it measures.
Think about how you compare two shapes of data distributions.
You got /3 concepts.
    Describe how to use scipy to perform a KS test on a sample against a normal distribution.
    Remember the function name and what arguments it needs.
    You got /4 concepts.