scalation.analytics

Probability

object Probability extends Error

The Probability object provides methods for operating on univariate and bivariate probability distributions of discrete random variables 'X' and 'Y'. A probability distribution is specified by its probabilty mass functions (pmf) stored either as a "probabilty vector" for a univariate distribution or a "probability matrix" for a bivariate distribution.

joint probability matrix: pxy(i, j) = P(X = x_i, Y = y_j) marginal probability vector: px(i) = P(X = x_i) conditional probability matrix: px_y(i, j) = P(X = x_i|Y = y_j)

In addition to computing joint, marginal and conditional probabilities, methods for computing entropy and mutual information are also provided. Entropy provides a measure of disorder or randomness. If there is little randomness, entropy will close to 0, while when randomness is high, entropy will be close to, e.g., log2 (px.dim). Mutual information provides a robust measure of dependency between random variables (constrast with correletion).

See also

scalation.stat.StatVector

Linear Supertypes
Error, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Probability
  2. Error
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def condProbX_Y(pxy: MatrixD): MatrixD

    Given a joint probability matrix 'pxy', compute the "conditional probability" for random variable 'X' given random variable 'Y', i.

    Given a joint probability matrix 'pxy', compute the "conditional probability" for random variable 'X' given random variable 'Y', i.e, P(X = x_i|Y = y_j).

    pxy

    the joint probability matrix

  9. def condProbY_X(pxy: MatrixD): MatrixD

    Given a joint probability matrix 'pxy', compute the "conditional probability" for random variable 'Y' given random variable 'X', i.

    Given a joint probability matrix 'pxy', compute the "conditional probability" for random variable 'Y' given random variable 'X', i.e, P(Y = y_j|X = x_i).

    pxy

    the joint probability matrix

  10. def entropy(pxy: MatrixD, px_y: MatrixD): Double

    Given a joint probability matrix 'pxy' and a conditional probability matrix 'py_x', compute the "conditional entropy" of random variable 'X' given random variable 'Y'.

    Given a joint probability matrix 'pxy' and a conditional probability matrix 'py_x', compute the "conditional entropy" of random variable 'X' given random variable 'Y'.

    pxy

    the joint probability matrix

    px_y

    the conditional probability matrix

  11. def entropy(pxy: MatrixD): Double

    Given a joint probability matrix 'pxy', compute the "joint entropy" of random variables 'X' and 'Y'.

    Given a joint probability matrix 'pxy', compute the "joint entropy" of random variables 'X' and 'Y'.

    pxy

    the joint probability matrix

  12. def entropy(px: VectorD): Double

    Given a probability vector 'px', compute the "entropy" of random variable 'X'.

    Given a probability vector 'px', compute the "entropy" of random variable 'X'.

    px

    the probability vector

    See also

    http://en.wikipedia.org/wiki/Entropy_%28information_theory%29

  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def flaw(method: String, message: String): Unit

    Show the flaw by printing the error message.

    Show the flaw by printing the error message.

    method

    the method where the error occurred

    message

    the error message

    Definition Classes
    Error
  17. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  18. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. def isProbability(pxy: MatrixD): Boolean

    Determine whether the matrix 'pxy' is a legitimate joint "probability matrix".

    Determine whether the matrix 'pxy' is a legitimate joint "probability matrix". The elements of the matrix must be non-negative and add to one.

    pxy

    the probability matrix

  21. def isProbability(px: VectorD): Boolean

    Determine whether the vector 'px' is a legitimate "probability vector".

    Determine whether the vector 'px' is a legitimate "probability vector". The elements of the vector must be non-negative and add to one.

    px

    the probability vector

  22. def jointProbXY(px: VectorD, py: VectorD): MatrixD

    Given two independent random variables 'X' and 'Y', compute their "joint probability", which is the outer product of their probability vectors 'px' and 'py', i.

    Given two independent random variables 'X' and 'Y', compute their "joint probability", which is the outer product of their probability vectors 'px' and 'py', i.e., P(X = x_i, Y = y_j).

  23. def margProbX(pxy: MatrixD): VectorD

    Given a joint probability matrix 'pxy', compute the "marginal probability" for random variable 'X', i.

    Given a joint probability matrix 'pxy', compute the "marginal probability" for random variable 'X', i.e, P(X = x_i).

    pxy

    the probability matrix

  24. def margProbY(pxy: MatrixD): VectorD

    Given a joint probability matrix 'pxy', compute the "marginal probability" for random variable 'Y', i.

    Given a joint probability matrix 'pxy', compute the "marginal probability" for random variable 'Y', i.e, P(Y = y_j).

    pxy

    the probability matrix

  25. def muInfo(pxy: MatrixD): Double

    Given a joint probability matrix 'pxy', compute the mutual information for random variables 'X' and 'Y'.

    Given a joint probability matrix 'pxy', compute the mutual information for random variables 'X' and 'Y'.

    pxy

    the probability matrix

  26. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  30. def toString(): String

    Definition Classes
    AnyRef → Any
  31. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Error

Inherited from AnyRef

Inherited from Any

Ungrouped