A \left-\right subformula is treated as an Inner atom and this adds some space before and after the subformula, in certain circumstances. One can get the desired behavior by
\usepackage{amsmath}
\newcommand{\ps}[2]{\operatorname{P}_{#1}
\mathopen{}\left(#2\right)\mathclose{}}
so the spacing inserted will disappear (TeX doesn't insert space between an opening atom and an inner one, nor between an inner atom and a closing one).
It's better to define "P" with \operatorname than with \mbox.
As Philippe Goutet remarks, if superscripts or subscripts need to be attached to the closing parenthesis, the definition should be
\newcommand{\ps}[2]{\operatorname{P}_{#1}
\mathopen{}\mathclose{\left(#2\right)}}
$\ps{X}{\dfrac{1}{y}}^2$to work correctly (the exponent2will be too low with your solution), you can by using\mathopen{}\mathclose{\left(#2\right)}. – Philippe Goutet May 29 '11 at 08:46\ps{X}{\dfrac{1}{y}\aftergroup^\aftergroup2}:)– egreg May 29 '11 at 17:29\aftergrouptrickery, you can use it to redefine\leftand\rightto produce open and close atoms (see http://tex.stackexchange.com/questions/2607/spacing-around-left-and-right). Here, it's really a shame that your macro\psdoesn't work correctly if there's an exponent afterwards when the fix is so simple. – Philippe Goutet May 29 '11 at 21:51