1. normfit
进行参数的估计
[muhat,sigmahat] = normfit(data)
% returns an estimate of the mean μ in muhat,
% and an estimate of the standard deviation σ in sigmahat,
% of the normal distribution given the data in data.
[muhat,sigmahat,muci,sigmaci] = normfit(data)
% returns 95% confidence intervals for the parameter estimates on the mean and
standard deviation in the arrays muci and sigmaci,
% respectively. The first row of muci contains the
lower bounds of the confidence intervals for μ the
second row contains the upper bounds.
% The first row of sigmaci contains the lower bounds of the confidence intervals for σ,
% and the second row contains the upper bounds.
data = normrnd(10,2,100,2);
[mu,sigma,muci,sigmaci] = normfit(data)
mu =
10.1455 10.0527
sigma =
1.9072 2.1256
muci =
9.7652 9.6288
10.5258 10.4766
sigmaci =
1.6745 1.8663
2.2155 2.4693