I don't know mathematica, but it seems that you have calculated the mean of a vector with mean=0. Since the mean is close to 0 but not exactly 0 (due to a finite element vector), in you case negative, then the sqrt is an imaginary number.
You should, instead, generate N vectors :
S1 = rand(), S2=rand() ... SN=rand()
sum them toghether
S = S1+S2+..+SN
Verify that the standard deviation of S is the same (or, better, is close to):
sqrt(stdev(S1^2) + stdev(S2^2) +..+ s(SN^2))
Scilab code:
// generates 6 vectors of different amplitudes //
r1=17*(0.5-rand(1000,1));
r2=31*(0.5-rand(1000,1));
r3=14*(0.5-rand(1000,1));
r4=46*(0.5-rand(1000,1));
r5=9*(0.5-rand(1000,1));
r6=44*(0.5-rand(1000,1));
// Resultant signal //
r = r1 + r2 + r3 +r4 + r5 + r6;
// RMS amplitude of the resultant signal
a=stdev(r)
// RMS amplitude estimate from single amplitudes
b=sqrt(stdev(r1.^2) + stdev(r2.^2) + stdev(r3.^2) + stdev(r4.^2) + stdev(r5.^2) + stdev(r6.^2))
I'll get, for example, a=21.3 and b=20.5