| Statistics Toolbox | Search  Help Desk |
| normfit | Examples See Also |
Parameter estimates and confidence intervals for normal data.
Syntax
[muhat,sigmahat,muci,sigmaci] = normfit(X) [muhat,sigmahat,muci,sigmaci] = normfit(X,alpha)
Description
[muhat,sigmahat,muci,sigmaci] = normfit(X) returns estimates,muhat and sigmahat, of the parameters, µ and
, of the normal distribution given the matrix of data, X. muci and sigmaci are 95% confidence intervals. muci and sigmaci have two rows and as many columns as the data 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) percent 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.0527sigma =1.9072 2.1256muci =9.7652 9.628810.5258 10.4766sigmaci =1.6745 1.86632.2155 2.4693
See Also
betafit, binofit, expfit, gamfit, poissfit, unifit, weibfit