Suppose I draw several times from an uniform distribution, $X\sim\mathcal{U}(0, 1]$. (I'll use $\mathrm{R}()$ to denote an independent drawing.) What is then the PDF of several draws, added and/or subtracted from each other? How do I calculate it?
For example:
$r = \sum_{i=1}^{5} \mathrm{R}() - \sum_{i=1}^5 \mathrm{R}()$
If I draw 15,000,000 samples, round them, and note their total number of occurrences, the plot I get looks like a normal distribution with $\mu = -2.5$. But “looks like” is not really satisfactory, because I am not even sure whether it really is a normal distribution I'm getting this way.
Can somebody help me to derive the type of distribution and its parameters of the formula above (or any other formula where several independent draws are added/subtracted)?
When you add two independent variables, you can calculate the distribution with the convolution of the two pdfs. If Z = X + Y,
$f_Z(z) = \int_{-\infty}^{\infty} f_X(z-x)f_Y(x) dx$
This question explains the density of two uniform random variables: density of sum of two uniform random variables $[0,1]$
For subtraction, use the pdf of -Y, which is $f_Y(-x)$.
If you repeat this convolution process, you can calculate the distribution for the sum of any number of iid Uniform random variables (e.g. for $U_1 + U_2 + U_3$ you find $Z = U_1 + U_2$ and then $Z + U_3$), but the formula will get more and more complicated.
This is what mathematica calculated for $\sum_{i=1}^5 U_i - \sum_{i=6}^{10} U_i$, where $U_i$ are iid Uniform[0,1]:
Calculating the coefficients of the polynomials for these distributions would probably be an interesting combinatorics problem. So in theory you could calculate an exact formula for your distribution and draw from this, but it may be unwieldy if you are adding and subtracting too many times.
On the other hand, the reason this distribution looks sort of normal is because you are adding iid random variables, which by the Central Limit Theorem will result in something that can be better approximated by a normal distribution the more iid random variables you add together. For the distribution you described, the mean is 0 and the variance is 10/12, since each of the 10 independent variables has a variance of 1/12. So a Normal[0,10/12] distribution may be a decent approximation.