Probability of A in LaTeX (P(A))

P(A)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.

P(Ac)=1−P(A)P(A^c) = 1 - P(A)
\documentclass{article}
\begin{document}
Probability of A: $P(A)$

\[ P(A^c) = 1 - P(A) \]
\end{document}

Related symbols

All 確率・統計 →

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.
Math poweredAIでLaTeXを書く

最高のAI LaTeXエディタ、Overleaf代替

Octreeは15以上の大学の研究者がAIを使って論文をより速く書くのを支援

  • AIで美しいTikZダイアグラムを生成
  • 画像をアップロードしてシームレスにLaTeXに変換
  • 論文の執筆とフォーマットに即座にサポートを取得