Mutual Information in LaTeX (I(X; Y))
- LaTeX command
I(X; Y)- Package
- No package needed: built into LaTeX
- Mode
- Text and math mode
Where it is used
Mutual information between X and Y: how much knowing one random variable reduces uncertainty about the other.
Mutual information is I(X; Y) = H(X) - H(X \mid Y) = D_{\text{KL}}(p(x,y) \| p(x)p(y)), and it is zero exactly when X and Y are independent. The semicolon is conventional and separates the two arguments, which may themselves be lists, as in I(X_1, X_2; Y); a comma would be ambiguous. TeX treats ; as punctuation and adds a thin space after it automatically. Conditional mutual information is written I(X; Y \mid Z). It underlies the information bottleneck, InfoNCE contrastive losses, and feature selection.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Mutual Information: $I(X; Y)$
\[ I(X; Y) = H(X) - H(X \mid Y) \]
\end{document}Related symbols
- Log Likelihood
\log p(x | \theta) - Entropy
H(X) - Probability Distribution
p(x) - Cross Entropy
H(p, q) - Conditional Probability
p(y | x) - Bias Vector
\mathbf{b}
Frequently asked questions
- How do I write Mutual Information in LaTeX?
- Type I(X; Y) in math mode, for example $I(X; Y) = H(X) - H(X \mid Y)$. It works in plain LaTeX without loading any package.
- Which package do I need for I(X; Y)?
- None. I(X; Y) is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use I(X; Y) in text mode, or only in math mode?
- Both. I(X; Y) compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
Pinakamahusay na AI LaTeX Editor, Alternatibo sa Overleaf
Tinutulungan ng Octree ang mga researcher mula sa 15+ na unibersidad na sumulat ng research papers nang mas mabilis gamit ang AI
- Gumawa ng magagandang TikZ diagrams gamit ang AI
- Mag-upload ng larawan at i-convert ito sa LaTeX nang walang problema
- Makakuha ng instant na tulong sa pagsulat at pag-format ng research papers