MATLAB to judge the normal distribution of the test _matlab

Source: Internet
Author: User
In the case of parameter estimation and hypothesis testing, it is usually assumed that the general obeys the normal distribution, although in many cases this assumption is reasonable, but it is necessary to examine the hypothesis when it is important to carry out a critical parameter estimation or hypothesis test, or when there is a greater suspicion of it,
There are many kinds of methods to conduct the general normal test, the following is a brief introduction to the procedures provided in the MATLAB statistical Toolbox.
1) Jarque-bera Inspection
By using the skewness G1 and kurtosis G2 of normal distribution, a distribution statistic (DOF n=2) containing g1,g2 is constructed, and for the significance level, when the distribution statistic is less than the distribution number, the H0 is accepted: The general obeys the normal distribution, otherwise the H0 is rejected, that is, the overall deviation is normal distribution. This test is suitable for large samples and should be used sparingly when the sample size is small. MATLAB command: H =jbtest (x), [H,P,JBSTAT,CV] =jbtest (X,alpha).
2) Kolmogorov-smirnov Inspection
By comparing the empirical distribution function of a sample with a given distribution function, the sample is inferred from the totality of the given distribution function. The empirical distribution function of the sample of volume n is written as FN (x), it can be obtained by the proportion of the data of the sample small to x, the given distribution function as g (x), the statistic of the structure is, that is, the maximum value of the difference between the two distribution functions, for the hypothetical H0: the general obeys the given distribution G (X), and given, Based on the limit distribution of the DN (distribution at N?¥), the statistics are determined on whether to accept the H0 quantity limit.
Because this test requires a given g (x), it is only standard normal test when used in the normal test, namely H0: The general obeys the standard distribution. MATLAB command: H =kstest (x).
3) Lilliefors Inspection
It will improve the Kolmogorov-smirnov test for general normal test, namely H0: The general obeys the normal distribution, which is estimated by the sample mean value and variance. MATLAB command:
H =lillietest (x), [H,p,lstat,cv]=lillietest (X,alpha).
4 There is another method: first of all, standardize the data: Z = Zscore (X), and then in the Kolmogorov-smirnov test of 2), check whether it is a standard normal distribution, similar to the improvement of Method 2.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.