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 poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf

يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي

  • أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
  • ارفع صورة وحولها إلى LaTeX بسلاسة
  • احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث