normpdf

From DavinciWiki
Jump to: navigation, search

Description

Probability density function for normal distribution (bell curve)

Arguments and Return Values

Arguments: One numeric array of any format for the values at which to evaluate the function, and two optional scalar (1x1x1) values specifying the mean and standard deviation of the distribution

Return Value: An array with the same organization as the containing the function evaluated at the input. The output format is double if the input is double, float otherwise.

This function is defined as normpdf(x, mean=μ, stdv=σ) = exp(-(x-μ)^2/(2*σ^2))/(σ√(2π))

This function returns the value of the normal probability density function (bell curve). To find cumulative probabilities, use normcdf.

Return format is double if input is double; float otherwise.

If no arguments are input, normpdf() prints its description, as shown below.

Usage

Syntax: normpdf(x, mean=μ, stdv=σ)

'x' - A numeric array of any format, specifying the values

'mean' - A scalar value specifying the mean of the distribution

'stdv' - A scalar value specifying the standard deviation of the distribution; must be positive

x is passed by value, but mean and stdv should be passed by reference, e.g. normpdf(110, mean=100, stdv=10)

If mean and/or stdv are omitted, the function will use the standard values of μ = 0 and σ = 1

Examples

dv> normpdf()

Normal distribution probability density function (bell curve)
normpdf(x, mean=mu, stdv=sigma)
 = exp((x - mu)^2/(-2*sigma^2))/(sigma*sqrt(2*pi))
If mean and/or stdv are omitted, defaults to standard values of mu=0 and stdv=1
Returns value of point on curve
Use normcdf to find cumulative probability
S. Marshall 02-22-2008

0
dv> normpdf(-1//0//1)
3x1x1 array of float, bsq format [12 bytes]
0.241971        0.398942        0.241971

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Major Sub-Functions

Related Functions

Recent Library Changes

Created On: 02-25-2008
Modified On: 02-25-2008

Personal tools