Smirnov Cramer Von Mises Test
Updated 13 Jun 2003
Single sample Smirnov-Cramer-Von Mises goodness-of-fit hypothesis test.
H = MTEST(X,ALPHA) performs the particular case of Smirnov-Cramer-Von Mises test to determine whether the null hypothesis of composite normality CDF is a reasonable assumption regarding the population distribution of a random sample X with the desired significance level ALPHA. The Smirnov-Cramer-Von Mises test is based on interpolation procedure, so the significance level is restricted to
0.001 <= ALPHA <= 0.10.
H indicates the result of the hypothesis test according to the MATLAB rules of conditional statements:
H=1 => Do not reject the null hypothesis at significance level ALPHA.
H=0 => Reject the null hypothesis at significance level ALPHA.
Let S(x) be the empirical c.d.f. estimated from the sample vector X,
F(x) be the corresponding true normal population c.d.f., and CDF be a
normal c.d.f. with zero mean and unit standard deviation. The Smirnov-Cramer-Von Mises hypotheses and test statistic in this particular case are:
Null Hypothesis: F(x) is normal with zero mean and unit variance.
Alternative Hypothesis: F(x) is not normal with zero mean and unit variance.
Test Statistic: W^2 = integral from 0 to 1 of (S(x)-F(x))^2 dF(x)
The decision to reject the null hypothesis is taken when the test statistic exceeds the critical value.
X must be a row vector representing a random sample. ALPHA must be a scalar.
The function doesn't check the formats of X and ALPHA, as well as a number of the input and output parameters.
The asymptotic limit of the Smirnov-Cramer-Von Mises is reached when
W. T. Eadie, D. Drijard, F. E. James, M Roos and B. Sadoulet, "Statistical Methodsin Experimental Physics", North-Holland, Sec. Reprint, 1982.
G. Levin (2023). Smirnov Cramer Von Mises Test (https://www.mathworks.com/matlabcentral/fileexchange/3579-smirnov-cramer-von-mises-test), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.