From some simulations I ran, it appears that, if $X$ is a random normal variable with zero mean, and $Y$ is a variable that is uncorrelated to $X$, then, if you sample $N$ values of both variables:
$S = \sum_{i=1}^N X_i Y_i$
and you repeat this several times, the mean of $S$ converges to $0$.
See below some R
code:
N = 1000
Nr = 10000
# Y = constant
m1 <- replicate(n = Nr,{
X = rnorm(n = N, mean = 0, sd = 1)
Y = rep(3.6, N)
sum(X*Y)
})
hist(m1)
print(mean(m1))
plot(1:Nr,cumsum(m1)/(1:Nr),type="l")
# Y = random normal
m2 <- replicate(n = Nr,{
X = rnorm(n = N, mean = 0, sd = 1)
Y = rnorm(n = N, mean = 2, sd = 2.5)
sum(X*Y)
})
hist(m2)
print(mean(m2))
plot(1:Nr,cumsum(m2)/(1:Nr),type="l")
# Y = uniform
m3 <- replicate(n = Nr,{
X = rnorm(n = N, mean = 0, sd = 1)
Y = runif(n = N, min = -3, max = -0.3)
sum(X*Y)
})
hist(m3)
print(mean(m3))
plot(1:Nr,cumsum(m3)/(1:Nr),type="l")
# Y = linear function of X
m4 <- replicate(n = Nr,{
X = rnorm(n = N, mean = 0, sd = 1)
Y = -1 + X / 3
sum(X*Y)
})
hist(m4)
print(mean(m4))
plot(1:Nr,cumsum(m4)/(1:Nr),type="l")
Is this expected?
Is there some theorem about it? (Or is it obvious?)
How would you write it? Is $E[\sum_{i=1}^N X_i Y_i] = 0$ a valid notation?
If you could please help or point me to some literature/post describing it, it would be great.
Thanks!