Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Standard deviation of aggregated data

  1. Jun 14, 2008 #1
    This might be embarrasingly easy or impossible; I've been a computer programmer for too long since my statistics classes to tell for sure :blushing:

    I have a set of records with the following data for each record: interval, mean speed, standard deviation of speed, number of observations. Exempli gratia:

    Code (Text):
    1, 77.2, 1.75, 10
    2, 75.9, 2.05, 12
    Now, if I want to aggregate the data to get mean speed and standard deviation over two or more intervals (1 and 2 above), calculating the weighted mean is no problem but how - if possible - do I calculate the standard deviation for the aggregated intervals?
     
  2. jcsd
  3. Jun 14, 2008 #2

    mathman

    User Avatar
    Science Advisor
    Gold Member

    Given the std. dev. and mean, you can easily get the second moment. Combine the second moments by the same procedure you used for the means. Finally calculate the std. dev. from the weighted mean and weighted second moment.
     
  4. Jun 14, 2008 #3
    Right, of course. As I said, embarrasingly simple - thanks!
     
  5. Jul 5, 2011 #4
    I recently encountered a similar problem at work.

    However, for me the problem is that some of the intervals used for measuring average speed are different lengths of time. I believe the problem is the same?

    Since we consider the data to be a sample, we want the unbiased estimator for the standard deviation which takes on the following form given on wikipedia website (i derived it alone to make sure).


    http://en.wikipedia.org/wiki/Mean_square_weighted_deviation

    Cheers.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?