TITLE: Transformations that leave a binomial distribution invariant
QUESTION [5 upvotes]: The binomial distribution is written as
$$p(r|n,\theta )=\binom{n}{r}\theta ^r(1-\theta )^{n-r}$$
where $n$ is a positive integer, $0\leq\theta\leq1$, and $r$ is an integer taking values from $0$ to $n$.
I'm trying to find changes of variable that leave this distribution invariant. To illustrate, a general change of variables from $n,r,\theta$ to $m,s,\psi$ would have the form
$$\begin{align*}m&=f(n,r,\theta)\\
s&=g(n,r,\theta)\\
\psi&=h(n,r,\theta)\end{align*}$$
for some functions $f,g,h$. Here we require that $m,s$ be non-negative integers with $s\leq m$ and that $\psi$ be a real number in the interval $0\leq\psi\leq1$. Moreover the transformation should be a bijection and $h$ should be continuous. Then I say that the binomial distribution is invariant with this change of variables if
$$\binom{n}{r}\theta^r(1-\theta)^{n-r}=\binom{m}{s}\psi^s(1-\psi)^{m-s}$$
An example would be the following change of variables
$$\begin{align*}m&=n\\
s&=n-r\\
\psi&=1-\theta\end{align*}$$
Substituting it is easy to verify that the invariance condition holds.
Are there any more such transformations that leave invariant the binomial distribution? Thanks.

REPLY [3 votes]: There will be many such functions if there is no constraint on the nature of the transformation. The function $f(p,q,\theta) = \binom{p+q}{q} \theta^p (1-\theta)^q :  \Bbb{N} \times \Bbb{N} \times [0,1] \to \Bbb{R}$ is not one-to-one, and any "transformation" that permutes each fiber (or maps each fiber into itself, as in Jack Schmidt's answer), is a solution of the problem.
Continuous invertible transformations are equivalent to non-negative integer solutions of $M(p,q) = M(r,s)$ where $M(p,q)=f(p,q,p/(p+q))$ is the maximum value of $f$ with respect to $\theta$.  The trivial solutions are the identity transformation $(r,s)=(p,q)$ and the involution that exchanges $\theta$ and $1 - \theta$ from $(r,s)=(q,p)$.  Finding or precluding non-trivial solutions is an interesting problem in number theory.  
That's for the case of non-negative integer parameters in the binomial coefficients, and a continuous solution in that case would provide a solution for more general parameters (extending it by the identity transformation).
[update: in the case where $n$ and $r$ (and thus $p,q,r,s$ in the notation of the previous paragraph) are allowed to be real, there are continuous solutions by identifying the graphs of $A(\theta) = f(p,q,\theta)$ and $B(\psi)=f(r,s,\psi)$ in the case where the maxima of these unimodal functions are equal, $M(p,q)=M(r,s)$. There will in fact be infinite-dimensional families of continuous invertible solutions of this type due to existence of arcs in $(p,q)$ parameter space on which $M(p,q)$ is constant. For each arc one has the freedom to choose a reparametrization (a homeomorphism) and a partition of the arc into pieces on which to use the $\theta$ or the $(1-\theta)$ variant, so the dimensionality of the space of "good" transformations is infinite, and possibly uncountable if continuity is required but not smoothness.]