# stats_dens_normal

(PECL stats >= 1.0.0)

stats_dens_normalProbability density function of the normal distribution

### 说明

stats_dens_normal(float `\$x`, float `\$ave`, float `\$stdev`): float

Returns the probability density at `x`, where the random variable follows the normal distribution of which the mean is `ave` and the standard deviation is `stdev`.

### 参数

`x`

The value at which the probability density is calculated

`ave`

The mean of the distribution

`stdev`

The standard deviation of the distribution

### 返回值

The probability density at `x` or `false` for failure.

`If you don't have the stats package and can't install it, I have found this to work:<?phpif (!function_exists('stats_dens_normal')) { function stats_dens_normal(float \$x, float \$ave, float \$stdev): float { \$A = \$stdev * sqrt(2 * M_PI); \$B = -pow(\$x - \$ave, 2); \$C = 2 * pow(\$stdev, 2); return (1 / \$A) * pow(M_E, \$B / \$C); }}?>`
`I'm not certain that I've figured this one out correctly but it should return the value of a (Gaussian) normal distribution of the given properties at the given location.\$x - the X-Value to request\$ave - the 'expected value' (i.e. location of the peak) for the distribution. For most uses this will just be 0.\$stdev - the standard deviation of the distribution. For most uses this will be 1.`
`This functions will be the equivalent for "DISTR.NORM.N" on excel, like an other user said it's for Gaussian normal distribution.\$x as value to analyze\$ave as average \$stdev as deviation`