-
Notifications
You must be signed in to change notification settings - Fork 10
Cramér von Mises test
Maurice HT Ling edited this page Aug 13, 2021
·
1 revision
Purpose: To test whether 2 distributions are equal.
Null hypothesis: Observed distribution = Expected distribution
Alternate hypothesis: Observed distribution ≠ Expected distribution
Code:
>>> from scipy import stats
>>> observed = [16, 18, 16, 14, 12, 12]
>>> expected = [16, 16, 16, 16, 16, 8]
>>> result = stats.cramervonmises_2samp(observed, expected)
>>> print("statistic = %.2f" % result.statistic)
statistic = 0.16
>>> print("p-value = %.2f" % result.pvalue)
p-value = 0.41
Reference:
- Cramér H. 1928. On the Composition of Elementary Errors. Scandinavian Actuarial Journal 1928(1), 13–74.
- Anderson TW. 1962. On the distribution of the two-sample Cramer-von-Mises criterion. The Annals of Mathematical Statistics 33(3): 1148–1159.
Copyright (c) 2008-2024, Maurice HT Ling
Refereed Publications and Technical Reports
Abstracts and Other Un-Refereed Works
Autobiographic Verses (Poems that I wrote) and My Sayings