MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
Hypothesis (goodness-of-fit) testing is a common method that uses statistical evidence from a sample to draw a conclusion about a population. In hypothesis testing, you assert a particular statement (a null hypothesis) and try to find evidence to support or reject that statement. A null hypothesis is an assumption about a population that you would like to test. It is “null” in the sense that it often represents a status-quo belief, such as the absence of a characteristic or the lack of an effect. You can formalize it by asserting that a population parameter, or a combination of population parameters, has a certain value. MuPAD® enables you to test the following null hypotheses:
The data has the distribution function
f is a cumulative distribution function (CDF),
you can use the classical chi-square goodness-of-fit test or the Kolmogorov-Smirnov
f is probability density function (PDF),
a discrete probability function (PF), or an arbitrary distribution
function, use the classical chi-square goodness-of-fit test.
The data has a normal distribution function with a particular mean and a particular variance. For cumulative distribution functions, use the classical chi-square goodness-of-fit test or the Kolmogorov-Smirnov test. For other distribution functions, use the classical chi-square goodness-of-fit test.
The data has a normal distribution function (with unknown mean and variance). Use the Shapiro-Wilk goodness-of-fit test for this hypothesis.
The mean of the data is larger than some particular value. Use the t-Test for this hypothesis.
The main result returned by the hypothesis tests is the p-value
PValue). The p-value of a test indicates the probability,
under the null hypothesis, of obtaining a value of the test statistic
as extreme or more extreme than the value computed from the sample.
If the p-value is larger than the significance level (stated and agreed
upon before the test), the null hypothesis passes the test. A typical
value of a significance level is 0.05. P-values below a significance
level provide strong evidence for rejecting the null hypothesis.