# \Pr

Used for the probability of an event

https://texform.dev/latex/commands/Pr

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Functions and operators](https://texform.dev/latex/topics/functions) |
| Packages | base, physics |
| Allowed mode | math |
| Tags |  |
| Commonality | high |
| Kind | prefix |

## Syntax

### base

Argument specification: ``

Used for the probability of an event

### physics

Argument specification: `d<(,)><[,]><{,}>`

Used for probability notation, often as \Pr A or \Pr(A).

## Examples

```latex
\Pr
```

[Open in Playground](https://play.texform.dev/?input=%5CPr)

```latex
\Pr(X = x)
```

[Open in Playground](https://play.texform.dev/?input=%5CPr%28X+%3D+x%29)

```latex
\Pr_{x \sim P}
```

[Open in Playground](https://play.texform.dev/?input=%5CPr_%7Bx+%5Csim+P%7D)

```latex
\Pr A
```

[Open in Playground](https://play.texform.dev/?input=%5CPr+A)

```latex
\Pr(A)
```

[Open in Playground](https://play.texform.dev/?input=%5CPr%28A%29)

## Package variants

| Package | Argument specification | Allowed mode | Description |
| --- | --- | --- | --- |
| base |  | math | Used for the probability of an event |
| physics | d<(,)><[,]><{,}> | math | Used for probability notation, often as \Pr A or \Pr(A). |

## Renderer support

| Package | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- |
| base | full | full | full |
| physics | full | full | full |

## Usage frequency

0.17% of formulas in the measured corpus contain this entry, rank 92 of 263 entries with frequency data.

## In TeXForm

TeXForm parses this entry as prefix syntax; the package determines its argument specification.

### [physics/physics-operator-fence-expand](https://texform.dev/rules/physics/physics-operator-fence-expand)

Expand the physics auto-sized argument of exp, det, and Pr into an explicit fence.

Level: faithful. Fidelity: reading.

```latex
\exp{#1}
```

→

```latex
\exp\left\{#1\right\}
```

```latex
\exp{\frac{x}{y}}
```

→

```latex
\exp\left\{\frac{x}{y}\right\}
```

## Equivalent forms

```latex
\operatorname*{Pr}
```

exact. Using amsmath

## See also

- [\\acos](https://texform.dev/latex/commands/acos)
- [\\acot](https://texform.dev/latex/commands/acot)
- [\\acsc](https://texform.dev/latex/commands/acsc)
- [\\arccos](https://texform.dev/latex/commands/arccos)
- [\\arccot](https://texform.dev/latex/commands/arccot)
- [\\arccsc](https://texform.dev/latex/commands/arccsc)
- [\\arcsec](https://texform.dev/latex/commands/arcsec)
- [\\arcsin](https://texform.dev/latex/commands/arcsin)
- [\\arctan](https://texform.dev/latex/commands/arctan)
- [\\asec](https://texform.dev/latex/commands/asec)
- [\\asin](https://texform.dev/latex/commands/asin)
- [\\atan](https://texform.dev/latex/commands/atan)
- [\\cos](https://texform.dev/latex/commands/cos)
- [\\cosh](https://texform.dev/latex/commands/cosh)
- [\\cot](https://texform.dev/latex/commands/cot)
- [\\coth](https://texform.dev/latex/commands/coth)
- [\\csc](https://texform.dev/latex/commands/csc)
- [\\csch](https://texform.dev/latex/commands/csch)
- [\\det](https://texform.dev/latex/commands/det)
- [\\erf](https://texform.dev/latex/commands/erf)
- [\\exp](https://texform.dev/latex/commands/exp)
- [\\gcd](https://texform.dev/latex/commands/gcd)
- [\\inf](https://texform.dev/latex/commands/inf)
- [\\injlim](https://texform.dev/latex/commands/injlim)
- [\\lim](https://texform.dev/latex/commands/lim)
- [\\liminf](https://texform.dev/latex/commands/liminf)
- [\\limsup](https://texform.dev/latex/commands/limsup)
- [\\ln](https://texform.dev/latex/commands/ln)
- [\\log](https://texform.dev/latex/commands/log)
- [\\max](https://texform.dev/latex/commands/max)
- [\\min](https://texform.dev/latex/commands/min)
- [\\projlim](https://texform.dev/latex/commands/projlim)
- [\\sec](https://texform.dev/latex/commands/sec)
- [\\sech](https://texform.dev/latex/commands/sech)
- [\\sin](https://texform.dev/latex/commands/sin)
- [\\sinh](https://texform.dev/latex/commands/sinh)
- [\\sup](https://texform.dev/latex/commands/sup)
- [\\tan](https://texform.dev/latex/commands/tan)
- [\\tanh](https://texform.dev/latex/commands/tanh)
- [\\tr](https://texform.dev/latex/commands/tr)
- [\\Tr](https://texform.dev/latex/commands/Tr)
- [\\trace](https://texform.dev/latex/commands/trace)
- [\\Trace](https://texform.dev/latex/commands/Trace)

## Test cases

### base

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \Pr | Positive: baseline | Pass | Pass | Pass |

### physics

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \Pr | Positive: baseline | Pass | Pass | Pass |
| \Pr (a) | Positive: vary:d[0] | Pass | Pass | Pass |
