To get the effect of automatically adding {} around every = inside \Pr
,
use \scriptstyle
to eliminate the space around =
and the relsize
package to scale back up.
\documentclass{article}
\usepackage{relsize, mathtools}
\renewcommand\Pr[1]{\text{P({\larger[2]$\scriptstyle#1$})}}
\begin{document}
\[\text P(A{=}a) = \text P(B{=}b {\mid} C{=}c)\]
\[\Pr{A=a} = \Pr{B=b \mid C=c}\]
\end{document}

This method will remove space around = as well as <, ≤, +, etc inside \Pr
. One operator from which you might not want space removed is the conditional probability pipe \mid
.
To remove space from all operators except \mid
:
\documentclass{article}
\usepackage{relsize, mathtools}
\renewcommand\Pr[1]{\begingroup
\renewcommand\mid{\;|\;}
\text{P({\larger[2]$\scriptstyle#1$})}
\endgroup}
\begin{document}
\[\Pr{A=a} = \Pr{B=b \mid C=c}\]
\[\scriptstyle \Pr{A=a} = \Pr{B=b \mid C=c}\]
\end{document}

As depicted, this forces space around \mid
even in \scriptstyle
environments, where operators typically do not have space.
To remove space from \mid
in \scriptstyle
or \scriptscriptstyle
\Pr
only:
\documentclass{article}
\usepackage{relsize, mathtools}
\renewcommand\Pr[1]{\begingroup
\renewcommand\mid{\mathchoice{\;|\;}{\;|\;}{\;|\;}{|}}
\mathchoice
{\text{P({\larger[2]$\scriptstyle#1$})}}
{\text{P({\larger[2]$\scriptstyle#1$})}}
{\text{P({\larger[4]$\scriptscriptstyle#1$})}}
{\text{P({\larger[2]$\scriptscriptstyle#1$})}}
\endgroup}
\begin{document}
\[\Pr{A=a} = \Pr{B=b \mid C=c}\]
\[\scriptstyle \Pr{A=a} = \Pr{B=b \mid C=c}\]
\end{document}

\[ \Pr(A{=}a) = \Pr(B{=}b \mid C{=}c) \]
p{-}1
,k{+}1
(as opposed to expressing a calculation e.g.b=a+1
, when I leave the spacing unaffected).