Suppose that $x \sim U(0, 255)$ and and $y \sim U(0, 255)$, and that $x$ and $y$ are independent.
What is the distribution of $x - y$?
If I were to draw 1,000 samples from this distribution, how many times should I expect to see each possible value?
NB. These are all discrete random variables, in case that wasn't clear...
Update:
I've written a computer program to work out the expected count for each difference value. However, when I ask the computer to sum them all, it doesn't add up to 1,000. Clearly I've done something wrong somewhere, but I'm not sure precisely what. I'm probably just being dumb; if somebody could walk me through this slowly, it would be helpful.
The reason I'm doing this is that I want to do a chi-squared test to see if the data I'm getting actually does follow the expected distribution. Clearly this doesn't work if you calculate your expectations wrong. (!)
In addition, I think I may have over-simplified the program description. What my program actually does is obtain $x_1 \ldots x_{1000}$, and then compute $d_n = x_{n+1} - x_n$. Would that mean that the $d$ values are not statistically independent? If so, presumably a chi-squared test won't work at all. (I suppose I could throw away all the even-numbered $d_n$ so I'm left with non-overlapping pairs...)