### 20.4.7 Normal distributions

##### The probability density function for a normal distribution.

The density function of the normal distribution with mean µ and standard deviation σ at the point x is

normald(µ,σ,x)= |
1
√ |
2π
| σ
| e(x−µ)2/2. (4)

The normald (or loi_normal) command finds the value of this density function.

- normald (or loi_normal) command takes two optional arguments and one mandatory argument:
  - Optionally, µ and σ, the mean and standard deviation. (By default, µ=0 and σ=1, giving the standard normal distribution.)
  - x, a real number.
- normald(⟨µ,σ,⟩ x) returns the value of the normal density function with parameter µ and standard deviation σ at the value x, given in (4).

#### Examples

normald(2,1,3)

e |
− |
1
2
√ |
2 π

normald(2)

1
√ |
2 π
| e2

##### The cumulative distribution function for normal distribution.

The normal_cdf (or normald_cdf) command computes the cumulative distribution function for the normal distribution.

- normal_cdf (or normald_cdf) takes three optional arguments and one mandatory argument:
  - Optionally, µ and σ, the mean and standard deviation. (By default, µ=0 and σ=1, giving the standard normal distribution.)
  - x, a real number.
  - Optionally, y, a real number.
- normal_cdf(⟨µ,σ,⟩ x) returns Prob(X ≤ x) for the normal distribution with mean µ and standard deviation σ.
- normal_cdf(⟨µ,σ,⟩ x,y) returns Prob(x ≤ X ≤ y).

#### Examples

normal_cdf(1,2,1.96)

0.684386303484 |  |  |  |  |  |  |  |  |  |

normal_cdf(1,2.1,1.2)

0.537937144066 |  |  |  |  |  |  |  |  |  |

normal_cdf(1,2.1,1.2,9)

0.461993238584 |  |  |  |  |  |  |  |  |  |

##### The inverse distribution function for normal distribution.

The normal_icdf (or normald_icdf) command computes the inverse distribution for the normal distribution.

- normal_icdf (or normald_icdf) takes two optional arguments and one mandatory argument:
  - Optionally, µ and σ, the mean and standard deviation. (By default, µ=0 and σ=1, giving the standard normal distribution.)
  - h, a real number.
- normal_icdf(⟨µ,σ,⟩ h) returns the inverse distribution for the normal distribution with mean µ and standard deviation σ; namely, the value of x for which Prob(X ≤ x)=h.

#### Examples

normal_icdf(0.975)

1.95996398454 |  |  |  |  |  |  |  |  |  |

normal_icdf(1,2,0.495)

0.974933060984 |  |  |  |  |  |  |  |  |  |

##### The upper tail cumulative function for normal distributions.

The UTPN (the Upper Tail Probability-Normal distribution) computes Prob(X > x) for a normal distribution.

- UTPN takes two optional arguments and one mandatory argument:
  - Optionally, µ and σ2, the mean variance deviation. (By default, µ=0 and σ2=1, giving the standard normal distribution.)

    Note that, unlike normald and normal_cdf, the UTPN takes the variance and not the standard deviation.

  - x, a real number.
- UTPN(⟨µ,σ2,⟩ x) returns Prob(X > x), for the normal distribution with mean µ and variance σ2.

#### Examples

UTPN(1.96)

0.0249978951482 |  |  |  |  |  |  |  |  |  |

UTPN(1,4,1.96)

0.315613696516 |  |  |  |  |  |  |  |  |  |