Is $aX^2$ uniform if $X$ is uniform in $\mathbb{Z}_p$. I have a uniform random variable which takes integers values from $\{0,\dots, p-1\}$ and $p$ is prime.  Is $aX^2$ also uniform when considered in $\mathbb{Z}_p$ where $a$ is a constant. If so how would you prove it? 
In general is there an easy way to understand which functions of uniform random variables are uniform over $\mathbb{Z}_p$ but wouldn't be over the integers?  As an example, the sum of two uniform random variables appears to be uniform over $\mathbb{Z}_p$ but isn't over the integers.
 A: Let $p = 3$ and $a = 1$, then $0^2 \equiv_p 0$, $1^2 \equiv_p 1$, $2^2 \equiv_p 1$, so $P(X^2 = 2) = 0$.
Also, see Wikipedia:

Modulo an odd prime number $p$ there are $(p + 1)/2$ residues (including $0$) and $(p − 1)/2$ nonresidues.


As for other functions, for $X$ uniform in $\mathbb{Z}_p$, $f : \mathbb{Z}_p \to \mathbb{Z}_p$ is uniform if and only if $f$ is a permutation (or equivalently is bijective, or injective or surjective).
Proof. 
$f$ is a permutation $\Rightarrow$ $f(X)$ is uniform.
For all $k$ we have $$P(f(X) = k) = P(X = f^{-1}(k)) = \frac{1}{p}.$$
$f(X)$ is uniform $\Rightarrow$ $f(X)$ is a permutation. We know that for all $k$
$$P(f(X) = k) = \frac{1}{p}.$$
However, this implies
$$P(X \in \{x \mid f(x) = k\}) = \frac{1}{p}$$
and using
$$P(X \in A) = \frac{\#A}{p}$$
we arrive at $$\#\{x \mid f(x) = k\} = 1$$ for every $k$, thus $f$ has to be a permutation.
Edit: (As requested, moved from comment.)
This setting looks very similar to distribution of marbles among buckets. For single argument function you have $p$ marbles and $p$ buckets, so to get the uniform distribution you have to put one in each (the only thing you can do is to shuffle them, and that is why $f : \mathbb{Z}_p \to \mathbb{Z}_p$ is a permutation). 
If you have function with $2$ arguments $g : \mathbb{Z}_p \times \mathbb{Z}_p \to \mathbb{Z}_p$ (like addition or multiplication) and two independent variables, you can interpret it as $p^2$ marbles to redistribute into $p$ buckets. For addition it works, because rotating buckets by any number does not change anything (in fact $f(n)=(n+2013) \bmod p$ is a permutation of $\mathbb{Z}_p$). For plain multiplication it would not work because of zero. Of course, there are many different functions available, e.g. $\pi_1(x,y) = x$.
You could say that for $g : \mathbb{Z}_p \times \mathbb{Z}_p \to \mathbb{Z}_p$ to produce uniform distribution from independent and uniform $X$ and $Y$, it must factor into $g = \pi_1 \circ \tilde{g}$, where $\tilde{g}$ is a permutation of $\mathbb{Z}_p \times \mathbb{Z}_p$. If you were to look closely (e.g. try to interpret it in terms of marbles), this fact is trivial, i.e. it says nothing more than $\#\{(x,y) \mid g(x,y) = k\} = p$.
I hope this helps ;-)
