Geoscience Reference
In-Depth Information
normplot(corg)
h e function normplot plots the data in corg with the + symbol superimposed
by a line joining the i rst and third quartiles of each column of corg , which
is a robust linear i t of the sample order statistics. h e line is extrapolated in
each direction beyond the quartiles. If the data in corg are indeed normally-
distributed, they will all fall on the line. In our example the data seem to
agree well with the line except for the tails of the normal distribution.
Visual inspection of these plots reveals that the empirical distribution is
similar to the theoretical distribution. It is, however, advisable to use a more
quantitative approach to test the hypothesis of similarity. h e ˇ 2 -test explores
the squared dif erences between the observed and expected frequencies.
h e quantity chi2calc is the sum of the squared dif erences divided by the
expected frequencies.
chi2calc = sum((n_obs - n_exp).^2 ./ n_exp)
chi2calc =
5.7602
h e critical chi2crit value can be calculated using chi2inv value. h e ˇ 2 -test
requires the number of degrees of freedom ʦ. In our example we test the
hypothesis that the data have a Gaussian distribution, i.e., we estimate the
two parameters ʼ and ˃. h e number of degrees of freedom is ʦ=8-(2+1)=5.
We can now test our hypothesis at a 5% signii cance level. h e function
chi2inv computes the inverse of the ˇ 2 CDF with parameters specii ed by ʦ
for the corresponding probabilities in p .
chi2crit = chi2inv(1-0.05,5)
chi2crit =
11.0705
Since the critical chi2crit value of 11.0705 is well above the measured
chi2calc value of 5.7602, we cannot reject the null hypothesis without
another cause. We can therefore conclude that our data follow a Gaussian
distribution. Alternatively, we can apply the function chi2gof(x) to the
sample. h e command
[h,p] = chi2gof(corg)
yields
h =
0
Search WWH ::




Custom Search