ドキュメンテーション

最新のリリースでは、このページがまだ翻訳されていません。 このページの最新版は英語でご覧になれます。

仮説検定

カイ二乗、Kolmogorov-Smirnov、Shapiro-Wilk、t 検定などの適合検定

メモ

MuPAD® Notebook は将来のリリースでは削除される予定です。代わりに MATLAB® ライブ スクリプトを使用してください。

MuPAD Notebook ファイルを MATLAB ライブ スクリプト ファイルに変換するには、convertMuPADNotebook を参照してください。MATLAB ライブ スクリプトは、多少の違いはありますが、MuPAD 機能の大半をサポートします。詳細は、MuPAD Notebook を MATLAB ライブ スクリプトに変換を参照してください。

MuPAD 関数

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

例および操作のヒント

Perform chi-square Test

For the classical chi-square goodness-of-fit test, MuPAD provides the stats::csGOFT function. This function enables you to test the data against an arbitrary function f. For example, you can define f by using any of the cumulative distribution functions, probability density functions, and discrete probability functions available in the MuPAD 統計 library. You also can define f by using your own distribution function. For example, create the data sequence x that contains a thousand random entries:

Perform Kolmogorov-Smirnov Test

For the Kolmogorov-Smirnov goodness-of-fit test, MuPAD provides the stats::ksGOFT function. This function enables you to test the data against any cumulative distribution available in the MuPAD 統計 library. The Kolmogorov-Smirnov test returns two p-values. The null hypothesis passes the test only if both values are larger than the significance level. For example, create the following data sequence x which contains a thousand entries:

Perform Shapiro-Wilk Test

The Shapiro-Wilk goodness-of-fit test asserts the hypothesis that the data has a normal distribution. For the Shapiro-Wilk goodness-of-fit test, MuPAD provides the stats::swGOFT function. For example, create the normally distributed data sequence x by using the stats::normalRandom function:

Perform t-Test

The t-Test compares the actual mean value of a data sample with the specified value m. The null hypothesis for this test states that the actual mean value is larger than m. For the t-Test, MuPAD provides the stats::tTest function. For example, create the normally distributed data sequence of 1000 entries by using the stats::normalRandom function:

概念

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. 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: