Hypothesis Testing

Goodness-of-fit tests such as Chi-square, Kolmogorov-Smirnov, Shapiro-Wilk, and t-test

Note

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

To convert a MuPAD notebook file to a MATLAB live script file, see convertMuPADNotebook. MATLAB live scripts support most MuPAD functionality, although there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

MuPAD Functions

stats::csGOFTClassical chi-square goodness-of-fit test
stats::equiprobableCellsDivide the real line into equiprobable intervals
stats::ksGOFTThe Kolmogorov-Smirnov goodness-of-fit test
stats::swGOFTThe Shapiro-Wilk goodness-of-fit test for normality
stats::tTestT-test for a mean

Examples and How To

Perform chi-square Test

For the classical chi-square goodness-of-fit test, MuPAD provides the stats::csGOFT function.

Perform Kolmogorov-Smirnov Test

For the Kolmogorov-Smirnov goodness-of-fit test, MuPAD provides the stats::ksGOFT function.

Perform Shapiro-Wilk Test

The Shapiro-Wilk goodness-of-fit test asserts the hypothesis that the data has a normal distribution.

Perform t-Test

The t-Test compares the actual mean value of a data sample with the specified value m.

Concepts

Principles of Hypothesis Testing

Hypothesis (goodness-of-fit) testing is a common method that uses statistical evidence from a sample to draw a conclusion about a population.