Main Content

Hypothesis Tests

t-test, F-test, chi-square goodness-of-fit test, and more

Statistics and Machine Learning Toolbox™ provides parametric and nonparametric hypothesis tests to help you determine if your sample data comes from a population with particular characteristics.

Distribution tests, such as Anderson-Darling and one-sample Kolmogorov-Smirnov, test whether sample data comes from a population with a particular distribution. Test whether two sets of sample data have the same distribution using tests such as two-sample Kolmogorov-Smirnov.

Location tests, such asz-test and one-samplet-test, test whether sample data comes from a population with a particular mean or median. Test two or more sets of sample data for the same location value using a two-samplet-test or multiple comparison test.

Dispersion tests, such as Chi-square variance, test whether sample data comes from a population with a particular variance. Compare the variances of two or more sample data sets using a two-sampleF-test or multiple-sample test.

Determine additional features of sample data by cross-tabulating, conducting a run test for randomness, and determine the sample size and power for a hypothesis test.

Functions

expand all

adt Anderson-Darling test
chi2gof Chi-square goodness-of-fit test
crosstab Cross-tabulation
dwtest Durbin-Watson test with residual inputs
fishertest Fisher’s exact test
jbtest Jarque-Bera test
kstest One-sample Kolmogorov-Smirnov test
kstest2 Two-sample Kolmogorov-Smirnov test
lillietest Lilliefors test
runstest Run test for randomness
friedman Friedman’s test
kruskalwallis Kruskal-Wallis test
multcompare Multiple comparison test
ranksum Wilcoxon rank sum test
sampsizepwr Sample size and power of test
signrank Wilcoxon signed rank test
signtest Sign test
ttest One-sample and paired-samplet-test
ttest2 Two-samplet-test
ztest z-test
ansaribradley Ansari-Bradley test
barttest Bartlett’s test
sampsizepwr Sample size and power of test
vartest Chi-square variance test
vartest2 Two-sampleF-test for equal variances
vartestn Multiple-sample tests for equal variances
meanEffectSize One-sample or two-sample effect size computations
gardnerAltmanPlot Gardner-Altman plot for two-sample effect size

Detect Drift

detectdrift Detect drifts between baseline and target data using permutation testing

Access Test Results

DriftDiagnostics Diagnostics information of batch drift detection

Examine Test Results

summary Summary table forDriftDiagnosticsobject
ecdf Compute empirical cumulative distribution function (ecdf) for baseline and target data specified for drift detection
histcounts 计算直方图本variabl指定es in baseline and target data for drift detection
plotDriftStatus Visualizep-values and confidence intervals
plotEmpiricalCDF Visualize empirical cumulative distribution function (ecdf) of a variable specified for drift detection
plotHistogram Visualize histogram for a variable in drift detection
plotPermutationResults Plot histogram of permutation results for a variable

Topics