Statistics Toolbox | ![]() ![]() |
Parameter estimates and confidence intervals for normal data
Syntax
Description
[muhat,sigmahat,muci,sigmaci] = normfit(X)
returns estimates muhat
and sigmahat
of the normal distribution parameters µ and , given the matrix of data X. muci and sigmaci are 95% confidence intervals and have two rows and as many columns as matrix X. The top row is the lower bound of the confidence interval and the bottom row is the upper bound.
[muhat,sigmahat,muci,sigmaci] = normfit(X,alpha)
gives estimates and 100(1-alpha)
% confidence intervals. For example, alpha = 0.01
gives 99% confidence intervals.
Example
In this example the data is a two-column random normal matrix. Both columns have µ = 10 and = 2. Note that the confidence intervals below contain the "true values."
r = normrnd(10,2,100,2);
[mu,sigma,muci,sigmaci] = normfit(r)
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
See Also
normcdf
, norminv
, normlike
, normpdf
, normplot
, normrnd
, normspec
, normstat
, betafit
, binofit
, expfit
, gamfit
, poissfit
, unifit
, weibfit
![]() | normcdf | norminv | ![]() |