Shapiro-Wilk Test vs Kolmogorov-Smirnov Test
Shapiro-Wilk Test vs Kolmogorov-Smirnov Test
Purpose: Tests whether a sample comes from a normal distribution.
Methodology: Compares the sample distribution to a reference normal distribution using a linear combination of order statistics.
Assumptions:
Observations are independent.
Data is continuous.
Outputs:
W-statistic: A measure of the difference between the sample and normal distributions.
P-value: The probability of obtaining the observed W-statistic or more extreme if the data is truly normal.
Advantages:
More sensitive to departures from normality than other tests.
Can detect non-linearities and skewness.
Disadvantages:
Not as powerful as the Kolmogorov-Smirnov test for extreme deviations from normality.
Computationally more demanding.
Purpose: Tests whether a sample comes from a specified distribution (not necessarily normal).
Methodology: Compares the cumulative distribution function (CDF) of the sample to the CDF of the specified distribution.
Assumptions:
Observations are independent.
Data is continuous.
Specified distribution is known.
Outputs:
D-statistic: The maximum distance between the sample CDF and the specified distribution CDF.
P-value: The probability of obtaining the observed D-statistic or more extreme if the data is truly from the specified distribution.
Advantages:
Can test for any specified distribution.
Powerful for detecting large deviations from the specified distribution.
Disadvantages:
Less sensitive to non-linearity and skewness than the Shapiro-Wilk test.
Less powerful for small deviations from the specified distribution.
Comparison
When to Use Each Test:
Shapiro-Wilk Test: Tests the suitability of sample data with a normal distribution.
Kolmogorov-Smirnov Test: Tests the suitability of sample data with a specific distribution.
Statistical Basis:
Shapiro-Wilk Test: Uses the W test statistic.
Kolmogorov-Smirnov Test: Uses the D test
statistic.
Sensitivity to Sample Size:
Shapiro-Wilk Test: More sensitive to small sample sizes (n < 50).
Kolmogorov-Smirnov Test: More suitable for
larger sample sizes.
Comments
Post a Comment