Products & Services Industries Academia Support User Community Company

Learn more about Statistics Toolbox   

normpdf - Normal probability density function

Syntax

Y = normpdf(X,mu,sigma)

Description

Y = normpdf(X,mu,sigma) computes the pdf at each of the values in X using the normal distribution with mean mu and standard deviation sigma. X, mu, and sigma can be vectors, matrices, or multidimensional arrays that all have the same size. A scalar input is expanded to a constant array with the same dimensions as the other inputs. The parameters in sigma must be positive.

The normal pdf is

The likelihood function is the pdf viewed as a function of the parameters. Maximum likelihood estimators (MLEs) are the values of the parameters that maximize the likelihood function for a fixed value of x.

The standard normal distribution has µ = 0 and σ = 1.

If x is standard normal, then xσ + µ is also normal with mean µ and standard deviation σ. Conversely, if y is normal with mean µ and standard deviation σ, then x = (y-µ) / σ is standard normal.

Examples

mu = [0:0.1:2];
[y i] = max(normpdf(1.5,mu,1));
MLE = mu(i)
MLE =
  1.5000

See Also

pdf, normcdf, norminv, normstat, normfit, normlike, normrnd

Normal Distribution

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS