This is really the right way to calculate the average and variance for all pixels in your image.
It is possible that your deviation is more than average, since both are determined as follows:
mean = sum(x)/length(x)
variance = sum((x - mean(x)).^2)/(length(x) - 1);
, randn(N,1), N, , 0 1. , .
: , (.. , , 50% ,...). , , . , : . 50%, 50% ( ) 50 50 ( )? , , (.. , ).
edit:. RMS ( ) , , DC (.. ) RMS.
edit 2: : . , ( , ), ( ^ 2). (std MATLAB), , , , , ( , ).