Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "stats/base/dists/geometric/entropy/docs/types/index.d"

Index

Functions

Functions

entropy

  • entropy(p: number): number
  • Returns the entropy of a geometric distribution.

    Notes

    • If p < 0 or p > 1, the function returns NaN.

    Parameters

    • p: number

      success probability

    Returns number

    entropy

    Example

    var v = entropy( 0.1 );
    // returns ~3.251

    Example

    var v = entropy( 0.5 );
    // returns ~1.386

    Example

    var v = entropy( 0.9 );
    // returns ~0.361

    Example

    var v = entropy( 1.1 );
    // returns NaN

    Example

    var v = entropy( NaN );
    // returns NaN