Let $a,b,c,d$ be independent normally distributed random variables. I'm aware that the following distributions:
$$c a + d b$$
$$(c+d)a$$
both have the same standard deviation ($=\sqrt{2}$ if $a,b,c,d$ have unit variance).
I'm interested in the statistics generated by the following process: Let $a,b$ represent vectors containing a large number of samples, while $c,d$ each represent a single sample. Then what is the expected standard deviation of the two distributions above? Using the MATLAB code below, I get mean standard deviations of approximately $1.25$ and $1.125$, respectively.
N=100;
for m=1:100000
a = randn(N,1);
b = randn(N,1);
c = randn(1);
d = randn(1);
x(m)=std(c*a+d*b);
y(m)=std((c+d)*a);
end
mean(x)
mean(y)
If possible, I'd like to characterize the distribution of standard deviations fully, but a way of deriving the mean would be helpful too.
My apologies if this question is too easy (I hope so!).
Rcode, but it's still unclear what you're trying to do, because it seems to be evaluating standard deviations of components of vectors, not variances at all.) – whuber Mar 15 '13 at 18:40std(c*a)can be expressed as the inner product ofrep(c,100)withaand the inner product ofrep(c^2,100)witha^2; quite possibly the latter could be dispensed with by considering the square of the former. Under some interpretations of your question, the latter isn't needed at all. – whuber Mar 15 '13 at 18:57