I was following with Chapter 4 of famous 'Statistical Inference 2nd ed' textbook (Casella, Berger) and discovered that if X is a randomly normally distributed variable, and so is Y, and both of them are independent, therefore the distribution of the sum of equal length random vectors X + Y has the parameters mu_XY = mu_X + mu_Y and sd_XY = sd_X + sd_Y
Just for check that statement I performed a simulation in R with a following code:
> rnd_vec_X <- rnorm(10000, mean = 10, sd = 3) > rnd_vec_Y <- rnorm(10000, mean = 20, sd = 7) > rnd_vec_XY_sum <- rnd_vec_X + rnd_vec_Y > mean(rnd_vec_XY_sum)  30.05607 > sd(rnd_vec_XY_sum)  7.564628
Indeed, the mean of the sum of there independent random variables is ~30 (20 + 10), as predicted by theory. But why the standard deviation is so far from 10 (7 + 3)? I performed nearly twenty simulations with different seeds and different sample sizes... No luck. I guess something is wrong with my code or with my understanding of the topic. But what?