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.
최고의 AI LaTeX 편집기, Overleaf 대안
Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움
- AI로 아름다운 TikZ 다이어그램 생성
- 이미지를 업로드하고 LaTeX로 원활하게 변환
- 논문 작성 및 서식에 대한 즉각적인 지원 받기