Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

If you have a 100x100 grid of values and you want to report the standard deviation of an area that takes up a 20x20 portion of the grid, this is not problem. But what is the correct way to calculate the standard deviation of the 20x20 area if all the values in the 100x100 grid are themselves averages and therefore also have an associated (common) standard deviation?

I haven't dealt with such a spatial statistics problem for a while and I think I have forgotten some terminology...

share|improve this question
    
Yes I don't know what you are talking about. What is the random quantity that you are computing the stanard deviation for? I don't even see what it is in the case of the 20x20 portion of the gtid where you claim there is no difficulty computing the standard deviation. –  Michael Chernick Sep 28 '12 at 2:43
1  
As a general policy, when you've forgotten (or don't know) terminology, I find it best to explain your question in terms that are as simple as possible. With many of my clients, my first goal is to get them to explain their question in simple, substantive terms. Then I can (often) figure out the statistics. –  Peter Flom Sep 28 '12 at 10:22
add comment

1 Answer

The fact that it is spacial data doesn't matter. But to correctly calculate the standard deviation of a collection of values which are, themselves, averages, you also need two other numbers for each of those values: the number of measurements which were averaged to produce each (average) value, and the standard deviation of those measurements.

So each point on the grid must have, not just one, but three numbers associated with it: the mean (the value which is the average of the measurements at that grid point), the number of measurements that were averaged to calculate that mean, and the standard deviation of those measurements. Thus, for a 20x20 grid (400 grid points) you'll have 400 averages, 400 standard deviations, and 400 sample counts.

If you have that, then you can exactly calculate the combined/composite mean and standard deviation for the whole set of 400 grid points. This web page describes how to do it, and why it works; it also includes source code in Perl and Python: http://www.burtonsys.com/climate/composite_standard_deviations.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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