Normal distributions

### 8.4.7 Normal distributions

#### The probability density function for a normal distribution: normald loi_normal

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.

- Input:
  normald(2,1,3)
  Output:

  e |
  − |
  1
  2
  √ |
  2 π

- Input:
  normald(2)
  Output:

  1
  √ |
  2 π
  | e2

#### The cumulative distribution function for normal distributions: normal_cdf normald_cdf

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.

- Input:
  normal_cdf(1,2,1.96)
  Output:

  0.684386303484

- Input:
  normal_cdf(1,2.1,1.2)
  Output:

  0.537937144066

- Input:
  normal_cdf(1,2.1,1.2,9)
  Output:

  0.461993238584

#### The inverse distribution function for normal distributions: normal_icdf normald_icdf

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.

- Input:
  normal_icdf(0.975)
  Output:

  1.95996398454

- Input:
  normal_icdf(1,2,0.495)
  Output:

  0.974933060984

#### The upper tail cumulative function for normal distributions: UTPN

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: 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.

- Input:
  UTPN(1.96)
  Output:

  0.0249978951482

- Input:
  UTPN(1,4,1.96)
  Output:

  0.315613696516