dirac

dirac, function

def pure dirac(n: number): ranvar

Returns a ranvar with a zero probability everywhere, except on n where the probability is 1.

Example

table T = with
  [| as N |]
  [| -1 |]
  [|  0 |]
  [|  1 |]
  [|  2 |]

show table "" a1b4 with
  T.N
  dirac(T.N)

Errors

Fractional arguments are not supported

n cannot be a fractional number.

User Contributed Notes
0 notes + add a note