1
$\begingroup$

In my R code below, I'm wondering why $sd$ of N and K are larger than U?

Aren't we just manipulating the $means$ of these normal distributions, so why $sd$ changes as well?

set.seed(0)
n <- 1e5
U <- rnorm( n )         # sd = 1.00
N <- rnorm( n , U )     # sd = 1.41
M <- rnorm( n , U )     # sd = 1.41
K <- rnorm( n , N - M ) # sd = 1.73

sapply(list(U, N, M, K), sd)   # get the `sd`s
$\endgroup$
1
  • $\begingroup$ Note that the SDs for N and M are each $\sqrt 2$, and for K is $\sqrt 3$. $\endgroup$
    – EdM
    Commented Jan 25, 2019 at 17:27

1 Answer 1

3
$\begingroup$

$N$ containts the realisations of 10000 random variables, each with a different mean. Therefore, the observed deviations from the average are higher. Same goes for $M,K$.

If you calculate sd(N-U), you should get something close to 1.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.