Probability of A in LaTeX (P(A))
- LaTeX command
P(A)- Package
- No package needed: built into LaTeX
- Mode
- Text and math mode
Where it is used
Probability of event A, written with an ordinary italic capital P.
Introductory texts write P(A) for the chance that A occurs, with 0 \le P(A) \le 1 and the complement rule P(A^c) = 1 - P(A). The plain italic P is fine when nothing else in the document uses that letter; otherwise \Pr(A), a predefined upright operator, or \mathbb{P}(A) avoid the clash. For large arguments, let the parentheses grow: P\left(\bigcup_i A_i\right). Typing Pr(A) without a backslash gives italic P and r as two variables multiplied. Conditional probability puts \mid inside the parentheses, P(A \mid B), rather than a bare vertical bar.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Probability of A: $P(A)$
\[ P(A^c) = 1 - P(A) \]
\end{document}Related symbols
- Expectation
\mathbb{E}[X] - Probability
\mathbb{P} - Expectation (E)
E[X] - Variance
\text{Var}(X) - Covariance
\text{Cov}(X,Y) - Sigma
\sigma
Frequently asked questions
- How do I write Probability of A in LaTeX?
- Type P(A) in math mode, for example $P(A^c) = 1 - P(A)$. It works in plain LaTeX without loading any package.
- Which package do I need for P(A)?
- None. P(A) is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use P(A) in text mode, or only in math mode?
- Both. P(A) 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로 원활하게 변환
- 논문 작성 및 서식에 대한 즉각적인 지원 받기