dirac

dirac, function

def pure dirac(n: number): ranvar

Returns a ranvar with all probability mass concentrated at n.

Examples

r = dirac(2)

show table "Dirac" with
  mean(r) as "Mean"
  variance(r) as "Variance"

This produces the following table:

Mean Variance
2 0

Errors

n cannot be fractional.

User Contributed Notes
0 notes + add a note