Verify normality, variance homogeneity, and distributional fit before applying parametric methods.
Kotlin Notebook
Try this guide as a Kotlin Notebook with Kandy visualizations — run the cells to see charts and explore the data interactively.
Parametric methods (t-tests, ANOVA, Pearson correlation) assume specific properties of the data. This guide covers the three most common assumptions and the kstats functions for each.
Test whether observed category counts match expected proportions.
// Defect counts across 5 product categoriesval observedDefects = intArrayOf(12, 18, 25, 15, 30)// Test against uniform expectation (null = equal probability per category)val uniform = chiSquaredTest(observedDefects)uniform.pValue// Test against specific expected countsval expectedCounts = doubleArrayOf(20.0, 20.0, 20.0, 20.0, 20.0)val specific = chiSquaredTest(observedDefects, expectedCounts)specific.pValue