Probability and Information Theory

  • In many scenarios, it is more practical to use a simple but uncertain rule rather than a complex but certain one, even if the true rule is deterministic and our modeling system has the fidelity to accommodate a complex rule ("most birds fly" versus "birds fly, except for very young birds, sick or injured birds, flightless birds..." etc.).
  • There are two kinds of probability:
    • Frequentist: if we repeated an experiment infinitely many times, then proportion of the repetitions would result in that outcome.
    • Bayesian: the probability represents the degree of belief (i.e. there is a 40% chance that the patient is sick).
  • A random variable is a variable that can take on different values randomly. It must be coupled with a probability distribution that specifies how likely each of the states are. Random variables are either discrete or continuous.
  • A probability distribution over discrete variables may be described using a probability mass function (PMF). A PMF for a random variable x is denoted . Sometimes we define a variable first, then use notation to specify which distribution it follows later: .
  • PMFs can act on many variables at the same time. Such a function is known as a joint probability distribution. denotes the probability that and simultaneously.
  • When working with continuous random variables, we use a probability density function (PDF). A PDF does not give the probability of a specific state directly. Instead, the probability of landing inside an infinitesimal region with volume is given by . We often denote that follows the uniform distribution on by writing .
  • Sometimes we know the probability distribution over a set of variables, and we want to know the probability distribution over just a subset of them. This is known as the marginal probability distribution. For example, if we know , we can find by summing up for all values of .

  • For continuous variables, we use integration instead of summation.
  • In many cases, we are interested in the probability of some event, given that some other event has happened. This is called a conditional probability. We denote the conditional probability that given as .
  • Conditional probability explained visually.
  • Why do we divide by in the formula for conditional probability?
  • Conditional probability explained with Venn diagrams.
  • Any joint probability distribution over many random variables may be decomposed into conditional distributions over only one variable.
  • Two random variables and are independent if their probability distribution can be expressed as the product of two factors, one involving only and one involving only . In other words, .
  • Two random variables and are conditionally independent given a random variable if the conditional probability distribution over and factorizes in this way for every value of : .
  • Examples of conditional independence.
  • The expected value of some function with respect to a probability distribution is the average value that takes on when is drawn from . Expectations are linear.
  • The variance gives a measure of how much the values of a function of a random variable vary as we sample different values of from its probability distribution. When the variance is low, the values of cluster near their expected value. The square root of the variance is known as the standard deviation. The covariance gives some sense of how much two values are linearly related to each other, as well as the scale of these variables. High absolute values of the covariance mean that the values change very much and are both far from their respective means at the same time. If the sign of the covariance is positive, then both variables tend to take on relatively high values simultaneously. If the sign of the covariance is negative, then one variable tends to take on a relatively high value at the times that the other takes on a relatively low value and vice versa.
  • Covariance explained visually with overlapping rectangles.
  • The covariance matrix is always symmetric. The entries along the diagonal are always variances.
  • Note that two variables can be dependent and still have 0 covariance as explained in this post.
  • Common probability distributions:
    • Bernoulli: this is a distribution over a single binary random variable. It is controlled by a single parameter , which lies in the range and gives the probability of the random variable being equal to 1.
    • Multinoulli: this is a distribution over a single discrete variable with different states.
    • Gaussian (normal): this applet lets you visualize a normal distribution. Normal distributions are a sensible choice for many applications because many distributions we wish to model are truly close to being normal distributions. Also, the central limit theorem shows that the sum of many independent random variables is approximately normally distributed, as visualized in the following blog post.
    • Multivariate normal distribution: this is a generalization of the normal distribution to . It involves the Mahalanobis distance in the exponent, which is a way to construct a coordinate system for making measurements by examining the largest axes of variation in the underlying data. See the following forum post for a more detailed explanation.
    • Dirac distribution: this is a distribution that places all of the mass around a single point.
    • Exponential distribution: this is a distribution with a sharp point at . A closely related probability distribution is the Laplace distribution, which allows us to place a sharp peak of probability mass at an arbitrary point.
  • The central limit theorem explained on Khan Academy. It states that the sum of many independent random variables is approximately normally distributed.
  • Distributions can be combined to form a mixture distribution. On each trial, the choice of which component distribution generates the sample is determined by sampling a component identity from a multinoulli distribution. This model involves a latent variable that we will call that we cannot observe directly. One powerful type of mixture model is the Gaussian mixture model, in which the components are Gaussians. Each component has a separate mean and covariance. A Gaussian mixture model is a universal approximator of densities, in the sense that any smooth density can be approximated with any specific, non-zero amount of error by a Gaussian mixture model with enough components.
  • Two useful functions that often arise in a machine learning context are:
    • Sigmoid
    • Softplus
  • Bayes' rule states that . A geometric interpretation of the rule can be found here.
  • Information theory is a branch of applied mathematics that revolves around quantifying how much information is present in a signal. The basic idea is that learning that an unlikely event has occurred is more informative than learning that a likely event has occurred (i.e. a message that says "the sun rose this morning" is almost useless, whereas "there was a solar eclipse this morning" is very informative). In general:
    • Likely events should have low information content.
    • Less likely events should have higher information content.
    • Independent events should have additive information.
  • The self-information of an event is . Note that is the natural logarithm (base ). See the graph of below. Note how events that are more likely having smaller values for :

  • In the function above, we refer to the units as nats: one nat is the amount of information gained by observing an event of probability .
  • The amount of uncertainty in an entire probability distribution is referred to as the Shannon entropy, which is the expected value of . It is usually denoted . It gives a lower bound on the number of bits needed on average to encode symbols drawn from a distribution . Distributions that are nearly deterministic (where the outcome is nearly certain) have low entropy and vice-versa.
  • If we have two separate probability distributions and over the same random variable , we can measure how different these two distributions are using the Kullback-Leibler divergence (KL divergence). It is the extra amount of information needed to send a message containing symbols drawn from , when we use a code that was designed to minimize the length of messages drawn from . In other words, it says how many bits of information we expect to lose by using the distribution instead of . KL divergence is explained in great detail in the following article, which discusses how to optimize the parameters of an approximating distribution so that it closely resembles the observed distribution.
  • Note that KL divergence is not symmetric, i.e. .
  • The cross-entropy of two distributions and is . It is similar to KL divergence: minimizing the cross-entropy with respect to is equivalent to minimizing the KL divergence because does not participate in the omitted term.
  • When we represent the factorization of a probability distribution with a graph, we call it a structured probabilistic model or a graphical model. These factorizations can greatly reduce the number of parameters needed to describe a distribution. A detailed tutorial on PGMs can be found here. There are two types of graphical models:
    • Bayesian (directed)
    • Markov (undirected)

results matching ""

    No results matching ""