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?
✗ Incorrect
The KS test compares the cumulative distributions of two samples or a sample and a reference distribution.
Which scipy function performs the KS test for one sample?
✗ Incorrect
scipy.stats.kstest compares one sample against a reference distribution.
What does a KS test statistic measure?
✗ Incorrect
The KS statistic is the largest vertical distance between two cumulative distribution functions.
If the KS test p-value is 0.01, what does it mean?
✗ Incorrect
A small p-value (like 0.01) suggests strong evidence against the null hypothesis that distributions are the same.
Which test compares two samples directly using KS test?
✗ Incorrect
scipy.stats.ks_2samp compares two independent samples using the KS test.
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.