Venn diagram for various information measures associated with correlated variables X and Y. The area contained by both circles is the joint entropy H(X,Y). The circle on the left (red and violet) is the individual entropy H(X), with the red being the conditional entropy H(XY). The circle on the right (blue and violet) is H(Y), with the blue being H(YX). The violet is the mutual information I(X;Y).
In probability theory and information theory, the mutual information (MI) or (formerly) transinformation of two random variables is a measure of the variables' mutual dependence. Not limited to realvalued random variables like the correlation coefficient, MI is more general and determines how similar the joint distribution p(X,Y) is to the products of factored marginal distribution p(X)p(Y). MI is the expected value of the pointwise mutual information (PMI). The most common unit of measurement of mutual information is the bit.
Contents

Definition of mutual information 1

Relation to other quantities 2

Variations of mutual information 3

Metric 3.1

Conditional mutual information 3.2

Multivariate mutual information 3.3

Normalized variants 3.4

Weighted variants 3.5

Adjusted mutual information 3.6

Absolute mutual information 3.7

Mutual information for discrete data 3.8

Applications of mutual information 4

See also 5

Notes 6

References 7
Definition of mutual information
Formally, the mutual information of two discrete random variables X and Y can be defined as:

I(X;Y) = \sum_{y \in Y} \sum_{x \in X} p(x,y) \log{ \left(\frac{p(x,y)}{p(x)\,p(y)} \right) }, \,\!
where p(x,y) is the joint probability distribution function of X and Y, and p(x) and p(y) are the marginal probability distribution functions of X and Y respectively.
In the case of continuous random variables, the summation is replaced by a definite double integral:

I(X;Y) = \int_Y \int_X p(x,y) \log{ \left(\frac{p(x,y)}{p(x)\,p(y)} \right) } \; dx \,dy,
where p(x,y) is now the joint probability density function of X and Y, and p(x) and p(y) are the marginal probability density functions of X and Y respectively.
If the log base 2 is used, the units of mutual information are the bit.
Intuitively, mutual information measures the information that X and Y share: it measures how much knowing one of these variables reduces uncertainty about the other. For example, if X and Y are independent, then knowing X does not give any information about Y and vice versa, so their mutual information is zero. At the other extreme, if X is a deterministic function of Y and Y is a deterministic function of X then all information conveyed by X is shared with Y: knowing X determines the value of Y and vice versa. As a result, in this case the mutual information is the same as the uncertainty contained in Y (or X) alone, namely the entropy of Y (or X). Moreover, this mutual information is the same as the entropy of X and as the entropy of Y. (A very special case of this is when X and Y are the same random variable.)
Mutual information is a measure of the inherent dependence expressed in the joint distribution of X and Y relative to the joint distribution of X and Y under the assumption of independence. Mutual information therefore measures dependence in the following sense: I(X; Y) = 0 if and only if X and Y are independent random variables. This is easy to see in one direction: if X and Y are independent, then p(x,y) = p(x) p(y), and therefore:

\log{ \left( \frac{p(x,y)}{p(x)\,p(y)} \right) } = \log 1 = 0. \,\!
Moreover, mutual information is nonnegative (i.e. I(X;Y) ≥ 0; see below) and symmetric (i.e. I(X;Y) = I(Y;X)).
Relation to other quantities
Mutual information can be equivalently expressed as

\begin{align} I(X;Y) & {} = H(X)  H(XY) \\ & {} = H(Y)  H(YX) \\ & {} = H(X) + H(Y)  H(X,Y) \\ & {} = H(X,Y)  H(XY)  H(YX) \end{align}
where \ H(X) and \ H(Y) are the marginal entropies, H(XY) and H(YX) are the conditional entropies, and H(X,Y) is the joint entropy of X and Y. Note the analogy to the union, difference, and intersection of two sets, as illustrated in the Venn diagram.
Using Jensen's inequality on the definition of mutual information we can show that I(X;Y) is nonnegative, consequently, \ H(X) \ge H(XY). Here we give the detailed deduction of I(X;Y) = H(Y)  H(YX):

\begin{align} I(X;Y) & {} = \sum_{x,y} p(x,y) \log \frac{p(x,y)}{p(x)p(y)}\\ & {} = \sum_{x,y} p(x,y) \log \frac{p(x,y)}{p(x)}  \sum_{x,y} p(x,y) \log p(y) \\ & {} = \sum_{x,y} p(x)p(yx) \log p(yx)  \sum_{x,y} p(x,y) \log p(y) \\ & {} = \sum_x p(x) \left(\sum_y p(yx) \log p(yx)\right)  \sum_y \log p(y) \left(\sum_x p(x,y)\right) \\ & {} = \sum_x p(x) H(YX=x)  \sum_y \log p(y) p(y) \\ & {} = H(YX) + H(Y) \\ & {} = H(Y)  H(YX). \\ \end{align}
The proofs of the other identities above are similar.
Intuitively, if entropy H(Y) is regarded as a measure of uncertainty about a random variable, then H(YX) is a measure of what X does not say about Y. This is "the amount of uncertainty remaining about Y after X is known", and thus the right side of the first of these equalities can be read as "the amount of uncertainty in Y, minus the amount of uncertainty in Y which remains after X is known", which is equivalent to "the amount of uncertainty in Y which is removed by knowing X". This corroborates the intuitive meaning of mutual information as the amount of information (that is, reduction in uncertainty) that knowing either variable provides about the other.
Note that in the discrete case H(XX) = 0 and therefore H(X) = I(X;X). Thus I(X;X) ≥ I(X;Y), and one can formulate the basic principle that a variable contains at least as much information about itself as any other variable can provide.
Mutual information can also be expressed as a Kullback–Leibler divergence, of the product p(x) × p(y) of the marginal distributions of the two random variables X and Y, from p(x,y) the random variables' joint distribution:

I(X;Y) = D_{\mathrm{KL}}(p(x,y)\p(x)p(y)).
Furthermore, let p(xy) = p(x, y) / p(y). Then

\begin{align} I(X;Y) & {} = \sum_y p(y) \sum_x p(xy) \log_2 \frac{p(xy)}{p(x)} \\ & {} = \sum_y p(y) \; D_{\mathrm{KL}}(p(xy)\p(x)) \\ & {} = \mathbb{E}_Y\{D_{\mathrm{KL}}(p(xy)\p(x))\}. \end{align}
Note that here, the KullbackLeibler divergence involves integration with respect to the random variable X only, and the expression D_{\mathrm{KL}}(p(xy)\p(x)) is now a random variable in Y. Thus mutual information can also be understood as the expectation of the Kullback–Leibler divergence of the univariate distribution p(x) of X from the conditional distribution p(xy) of X given Y: the more different the distributions p(xy) and p(x) are on average, the greater the information gain.
Variations of mutual information
Several variations on mutual information have been proposed to suit various needs. Among these are normalized variants and generalizations to more than two variables.
Metric
Many applications require a metric, that is, a distance measure between pairs of points. The quantity

d(X,Y) = H(X,Y)  I(X;Y) = H(X) + H(Y)  2I(X;Y) = H(XY) + H(YX)
satisfies the properties of a metric (triangle inequality, nonnegativity, indiscernability and symmetry). This distance metric is also known as the Variation of information.
If X, Y are discrete random variables then all the entropy terms are nonnegative, so 0 \le d(X,Y) \le H(X,Y) and one can define a normalized distance

D(X,Y) = d(X,Y)/H(X,Y) \le 1.
The metric D is a universal metric, in that if any other distance measure places X and Y closeby, then the D will also judge them close.^{[1]}
Plugging in the definitions shows that

D(X,Y) = 1  I(X;Y)/H(X,Y).
In a settheoretic interpretation of information (see the figure for Conditional entropy), this is effectively the Jaccard distance between X and Y.
Finally,

D^\prime(X,Y)=1\frac{I(X;Y)}{\max(H(X),H(Y))}
is also a metric.
Conditional mutual information
Sometimes it is useful to express the mutual information of two random variables conditioned on a third.

I(X;YZ) = \mathbb E_Z \big(I(X;Y)Z\big) = \sum_{z\in Z} \sum_{y\in Y} \sum_{x\in X} p_Z(z) p_{X,YZ}(x,yz) \log \frac{p_{X,YZ}(x,yz)}{p_{XZ}(xz)p_{YZ}(yz)},
which can be simplified as

I(X;YZ) = \sum_{z\in Z} \sum_{y\in Y} \sum_{x\in X} p_{X,Y,Z}(x,y,z) \log \frac{p_Z(z)p_{X,Y,Z}(x,y,z)}{p_{X,Z}(x,z)p_{Y,Z}(y,z)}.
Conditioning on a third random variable may either increase or decrease the mutual information, but it is always true that

I(X;YZ) \ge 0
for discrete, jointly distributed random variables X, Y, Z. This result has been used as a basic building block for proving other inequalities in information theory.
Multivariate mutual information
Several generalizations of mutual information to more than two random variables have been proposed, such as total correlation and interaction information. If Shannon entropy is viewed as a signed measure in the context of information diagrams, as explained in the article Information theory and measure theory, then the only definition of multivariate mutual information that makes sense is as follows:

I(X_1;X_1) = H(X_1)
and for n > 1,

I(X_1;\,...\,;X_n) = I(X_1;\,...\,;X_{n1})  I(X_1;\,...\,;X_{n1}X_n),
where (as above) we define

I(X_1;\,...\,;X_{n1}X_n) = \mathbb E_{X_n} \big(I(X_1;\,...\,;X_{n1})X_n\big).
(This definition of multivariate mutual information is identical to that of interaction information except for a change in sign when the number of random variables is odd.)
Applications
Applying information diagrams blindly to derive the above definition has been criticised, and indeed it has found rather limited practical application, since it is difficult to visualize or grasp the significance of this quantity for a large number of random variables. It can be zero, positive, or negative for any n \ge 3.
One highdimensional generalization scheme which maximizes the mutual information between the joint distribution and other target variables is found to be useful in feature selection.^{[2]}
Mutual information is also used in the area of signal processing as a measure of similarity between two signals. For example, FMI metric^{[3]} is an image fusion performance measure that makes use of mutual information in order to measure the amount of information that the fused image contains about the source images. The Matlab code for this metric can be found at.^{[4]}
Normalized variants
Normalized variants of the mutual information are provided by the coefficients of constraint,^{[5]} uncertainty coefficient ^{[6]} or proficiency:^{[7]}

C_{XY}=\frac{I(X;Y)}{H(Y)} ~~~~\mbox{and}~~~~ C_{YX}=\frac{I(X;Y)}{H(X)}.
The two coefficients are not necessarily equal. In some cases a symmetric measure may be desired, such as the following redundancy measure:

R= \frac{I(X;Y)}{H(X)+H(Y)}
which attains a minimum of zero when the variables are independent and a maximum value of

R_{\max }=\frac{\min (H(X),H(Y))}{H(X)+H(Y)}
when one variable becomes completely redundant with the knowledge of the other. See also Redundancy (information theory). Another symmetrical measure is the symmetric uncertainty (Witten & Frank 2005), given by

U(X,Y) = 2R = 2\frac{I(X;Y)}{H(X)+H(Y)}
which represents a weighted average of the two uncertainty coefficients.^{[6]}
If we consider mutual information as a special case of the total correlation or dual total correlation, the normalized version are respectively,

\frac{I(X;Y)}{\min\left[ H(X),H(Y)\right]} and \frac{I(X;Y)}{H(X,Y)} \; .
Finally there's a normalization ^{[8]} which derives from first thinking of mutual information as an analogue to covariance (thus Shannon entropy is analogous to variance). Then the normalized mutual information is calculated akin to the Pearson correlation coefficient,

\frac{I(X;Y)}{\sqrt{H(X)H(Y)}}\; .
Weighted variants
In the traditional formulation of the mutual information,

I(X;Y) = \sum_{y \in Y} \sum_{x \in X} p(x,y) \log \frac{p(x,y)}{p(x)\,p(y)},
each event or object specified by (x,y) is weighted by the corresponding probability p(x,y). This assumes that all objects or events are equivalent apart from their probability of occurrence. However, in some applications it may be the case that certain objects or events are more significant than others, or that certain patterns of association are more semantically important than others.
For example, the deterministic mapping \{(1,1),(2,2),(3,3)\} may be viewed as stronger than the deterministic mapping \{(1,3),(2,1),(3,2)\}, although these relationships would yield the same mutual information. This is because the mutual information is not sensitive at all to any inherent ordering in the variable values (Cronbach 1954, Coombs & Dawes 1970, Lockhead 1970), and is therefore not sensitive at all to the form of the relational mapping between the associated variables. If it is desired that the former relation — showing agreement on all variable values — be judged stronger than the later relation, then it is possible to use the following weighted mutual information (Guiasu 1977)

I(X;Y) = \sum_{y \in Y} \sum_{x \in X} w(x,y) p(x,y) \log \frac{p(x,y)}{p(x)\,p(y)},
which places a weight w(x,y) on the probability of each variable value cooccurrence, p(x,y). This allows that certain probabilities may carry more or less significance than others, thereby allowing the quantification of relevant holistic or prägnanz factors. In the above example, using larger relative weights for w(1,1), w(2,2), and w(3,3) would have the effect of assessing greater informativeness for the relation \{(1,1),(2,2),(3,3)\} than for the relation \{(1,3),(2,1),(3,2)\}, which may be desirable in some cases of pattern recognition, and the like. This weighted mutual information is a form of weighted KLDivergence, which is known to take negative values for some inputs,^{[9]} and there are examples where the weighted mutual information also takes negative values.^{[10]}
Adjusted mutual information
A probability distribution can be viewed as a partition of a set. One may then ask: if a set were partitioned randomly, what would the distribution of probabilities be? What would the expectation value of the mutual information be? The adjusted mutual information or AMI subtracts the expectation value of the MI, so that the AMI is zero when two different distributions are random, and one when two distributions are identical. The AMI is defined in analogy to the adjusted Rand index of two different partitions of a set.
Absolute mutual information
Using the ideas of Kolmogorov complexity, one can consider the mutual information of two sequences independent of any probability distribution:

I_K(X;Y) = K(X)  K(XY).
To establish that this quantity is symmetric up to a logarithmic factor (I_K(X;Y) \approx I_K(Y;X)) requires the chain rule for Kolmogorov complexity (Li 1997). Approximations of this quantity via compression can be used to define a distance measure to perform a hierarchical clustering of sequences without having any domain knowledge of the sequences (Cilibrasi 2005).
Mutual information for discrete data
When X and Y are limited to be in a discrete number of states, observation data is summarized in a contingency table, with row variable X (or i) and column variable Y (or j). Mutual information is one of the measures of association or correlation between the row and column variables. Other measures of association include Pearson's chisquared test statistics, Gtest statistics, etc. In fact, mutual information is equal to Gtest statistics divided by 2N where N is the sample size.
In the special case where the number of states for both row and column variables is 2 (i,j=1,2), the degrees of freedom of the Pearson's chisquared test is 1. Out of the four terms in the summation:

\sum_{i,j } p_{ij} \log \frac{p_{ij}}{p_i p_j }
only one is independent. It is the reason that mutual information function has an exact relationship with the correlation function p_{X=1, Y=1}p_{X=1}p_{Y=1} for binary sequences .^{[11]}
Applications of mutual information
In many applications, one wants to maximize mutual information (thus increasing dependencies), which is often equivalent to minimizing conditional entropy. Examples include:

In search engine technology, mutual information between phrases and contexts is used as a feature for kmeans clustering to discover semantic clusters (concepts).^{[12]}

In telecommunications, the channel capacity is equal to the mutual information, maximized over all input distributions.

Discriminative training procedures for hidden Markov models have been proposed based on the maximum mutual information (MMI) criterion.

RNA secondary structure prediction from a multiple sequence alignment.

Phylogenetic profiling prediction from pairwise present and disappearance of functionally link genes.

Mutual information has been used as a criterion for feature selection and feature transformations in machine learning. It can be used to characterize both the relevance and redundancy of variables, such as the minimum redundancy feature selection.

Mutual information is used in determining the similarity of two different clusterings of a dataset. As such, it provides some advantages over the traditional Rand index.

Mutual information of words is often used as a significance function for the computation of collocations in corpus linguistics. This has the added complexity that no wordinstance is an instance to two different words; rather, one counts instances where 2 words occur adjacent or in close proximity; this slightly complicates the calculation, since the expected probability of one word occurring within N words of another, goes up with N.

Mutual information is used in medical imaging for image registration. Given a reference image (for example, a brain scan), and a second image which needs to be put into the same coordinate system as the reference image, this image is deformed until the mutual information between it and the reference image is maximized.

Detection of phase synchronization in time series analysis

In the infomax method for neuralnet and other machine learning, including the infomaxbased Independent component analysis algorithm

Average mutual information in delay embedding theorem is used for determining the embedding delay parameter.

Mutual information between genes in expression microarray data is used by the ARACNE algorithm for reconstruction of gene networks.

In statistical mechanics, Loschmidt's paradox may be expressed in terms of mutual information.^{[13]}^{[14]} Loschmidt noted that it must be impossible to determine a physical law which lacks time reversal symmetry (e.g. the second law of thermodynamics) only from physical laws which have this symmetry. He pointed out that the Htheorem of Boltzmann made the assumption that the velocities of particles in a gas were permanently uncorrelated, which removed the time symmetry inherent in the Htheorem. It can be shown that if a system is described by a probability density in phase space, then Liouville's theorem implies that the joint information (negative of the joint entropy) of the distribution remains constant in time. The joint information is equal to the mutual information plus the sum of all the marginal information (negative of the marginal entropies) for each particle coordinate. Boltzmann's assumption amounts to ignoring the mutual information in the calculation of entropy, which yields the thermodynamic entropy (divided by Boltzmann's constant).

The mutual information is used to learn the structure of Bayesian networks/dynamic Bayesian networks, which explain the causal relationship between random variables, as exemplified by the GlobalMIT toolkit [3]: learning the globally optimal dynamic Bayesian network with the Mutual Information Test criterion.

Popular cost function in Decision tree learning.
See also
Notes

^ Alexander Kraskov, Harald Stögbauer, Ralph G. Andrzejak, and Peter Grassberger, "Hierarchical Clustering Based on Mutual Information", (2003) ArXiv qbio/0311039

^ Christopher D. Manning, Prabhakar Raghavan, Hinrich Schütze (2008). An Introduction to Information Retrieval.

^ Haghighat, M. B. A.; Aghagolzadeh, A.; Seyedarabi, H. (2011). "A nonreference image fusion metric based on mutual information of image features". Computers & Electrical Engineering 37 (5): 744–756.

^ http://www.mathworks.com/matlabcentral/fileexchange/45926featuremutualinformationfmiimagefusionmetric

^ Coombs, C. H., Dawes, R. M. & Tversky, A. (1970). Mathematical Psychology: An Elementary Introduction. Englewood Cliffs, New Jersey: PrenticeHall.

^ ^{a} ^{b} Press, WH; Teukolsky, SA; Vetterling, WT; Flannery, BP (2007). "Section 14.7.3. Conditional Entropy and Mutual Information". Numerical Recipes: The Art of Scientific Computing (3rd ed.). New York: Cambridge University Press.

^ White, Jim; Steingold, Sam; Fournelle, Connie. "Performance Metrics for GroupDetection Algorithms" (PDF).

^ Strehl, Alexander; Ghosh, Joydeep (2002), "Cluster Ensembles  A Knowledge Reuse Framework for Combining Multiple Partitions" (PDF), The Journal of Machine Learning Research 3 (Dec): 583–617

^ Kvålseth, T. O. (1991). "The relative useful information measure: some comments". Information sciences 56 (1): 35–38.

^ Pocock, A. (2012). Feature Selection Via Joint Likelihood (PDF) (Thesis).

^ Wentian Li (1990). "Mutual information functions versus correlation functions". J. Stat. Phys. 60 (56): 823–837.

^ [4] Parsing a Natural Language Using Mutual Information Statistics by David M. Magerman and Mitchell P. Marcus

^ Hugh Everett Theory of the Universal Wavefunction, Thesis, Princeton University, (1956, 1973), pp 1–140 (page 30)

^
References

Cilibrasi, R.; Paul Vitányi (2005). "Clustering by compression" (

Cronbach L. J. (1954). On the nonrational application of information measures in psychology, in Henry Quastler, ed., Information Theory in Psychology: Problems and Methods, Free Press, Glencoe, Illinois, pp. 14–30.

Church, Kenneth Ward; Hanks, Patrick (1989). "Word association norms, mutual information, and lexicography". Proceedings of the 27th Annual Meeting of the Association for Computational Linguistics.

Guiasu, Silviu (1977). Information Theory with Applications. McGrawHill, New York.

Li, Ming; Paul Vitányi (February 1997). An introduction to Kolmogorov complexity and its applications. New York:

Lockhead, G. R. (1970). "Identification and the form of multidimensional discrimination space". Journal of Experimental Psychology 85 (1): 1–10.

David J. C. MacKay. Information Theory, Inference, and Learning Algorithms Cambridge: Cambridge University Press, 2003. ISBN 0521642981 (available free online)

Haghighat, M. B. A.; Aghagolzadeh, A.; Seyedarabi, H. (2011). "A nonreference image fusion metric based on mutual information of image features". Computers & Electrical Engineering 37 (5): 744–756.

Athanasios Papoulis. Probability, Random Variables, and Stochastic Processes, second edition. New York: McGrawHill, 1984. (See Chapter 15.)

Witten, Ian H. & Frank, Eibe. Data Mining: Practical Machine Learning Tools and Techniques. Morgan Kaufmann, Amsterdam.

Peng, H.C., Long, F., and Ding, C. (2005). "Feature selection based on mutual information: criteria of maxdependency, maxrelevance, and minredundancy". IEEE Transactions on Pattern Analysis and Machine Intelligence 27 (8): 1226–1238.

Andre S. Ribeiro, Stuart A. Kauffman, Jason LloydPrice, Bjorn Samuelsson, and Joshua Socolar (2008). "Mutual Information in Random Boolean models of regulatory networks". Physical Review E 77 (1).

Wells, W.M. III; Viola, P., Atsumi, H., Nakajima, S., Kikinis, R. (1996). "Multimodal volume registration by maximization of mutual information" (
This article was sourced from Creative Commons AttributionShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, EGovernment Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a nonprofit organization.