normal

normal, function

def pure normal(mu: number, sigma: number): ranvar

Returns the normal distribution with mean mu and standard deviation sigma, discretized over integer buckets.

Examples

table T = with
  [| as Mu, as Sigma |]
  [| 0, 1 |]
  [| 5, 2 |]

T.R = normal(T.Mu, T.Sigma)

show table "Normal" with
  T.Mu
  T.Sigma
  mean(T.R) as "Mean"

This produces the following table:

Mu Sigma Mean
0 1 -0.000000076
5 2 5

Remarks

The returned ranvar is the integral of the continuous density over each integer interval $[n, n+1)$.

See also

User Contributed Notes
0 notes + add a note