0
$\begingroup$

I got the following example data:

'Iteration_1': {'mean': 1980, 'min': 876, 'max': 3034, 'standard_deviation': 695 'median': 1883 'total_n': 20},

'Iteration_2': {'mean': 1808 'min': 1543 'max': 2074 'standard_deviation': 216 'median': 1805 'total_n': 6}

and the formulars for weighted standard deviation and weighted arithmetic mean from here .

$ s^* = \sqrt{ \frac{ \sum_{i=1}^N w_i (x_i - \bar{x}^*)^2 }{ \frac{(M-1)}{M} \sum_{i=1}^N w_i } }$

$\bar{x}^* = \frac{\sum_{i=1}^N w_i x_i}{\sum_{i=1}^N w_i}.$

My aim is to quantify the scattering of the standard deviation overall, hence the standard deviation of the standard deviations. Background: In the given iterations, the standard deviation is a distance in metre. I want to know the standard deviation of this distances.

Is it mathematically correct to calculate the weighted standard deviation for the standard deviations of the all iterations, weighted by total_n?

Example:

$\bar{x}^* = \frac{(20*695) + (6*216)}{(20+6)} = 584.46$

$s^* = \sqrt{\frac{20*(695-584)^2 + 6*(216-584)^2}{\frac{2-1}{2}* (20+6)}} = 285.41$

PS: I also found another formular for the weighted standard deviation, respectively the variance from wikipedia. I am confused which approach is mathematically correct and if I only have to take the squareroot of the weighted variance.

I really appreciate some help! Thanks in advance.

Edit:

Hopefully, to make it clearer. I have a non-deterministic calculation. I run this calculation 10 times with different parameters and for each parameter I run an additional 15 iterations. For each iteration the descriptive statistics (mean, standard deviation etc.) are calculated for the results of the computation (e.g. mean distance). My described data set is just an example for illustration.

So, for each parameter, I want to know the combined and weighted standard deviation, which is composed of all the standard deviations of the iterations for a single parameter. Since the number of values (total_n) per iteration may differ, this total_n must be included as a weighting.

@Whuber: I want some measure of the dispersion of their standard deviations.

Hopefully, it is more clear now, otherwise keep asking and I try my best to explain it again. I really appreciate your help!

$\endgroup$
2
  • $\begingroup$ Could you please explain what "the scattering of the standard deviation overall" might mean? $\endgroup$
    – whuber
    Commented Mar 1, 2021 at 21:36
  • $\begingroup$ It's still unclear whether you want to compute the SD of the combined data or if you want to compute (or estimate) some measure of the dispersion of their standard deviations. stats.stackexchange.com/questions/43159 shows how to combine variances, thereby addressing the first interpretation (because the SDs are just the square roots of the variances). It's hard to understand the second interpretation because you describe only two sets of data ("iterations"), which is not enough to compute a standard deviation. If, however, this is your intention, then please clarify the question. $\endgroup$
    – whuber
    Commented Mar 1, 2021 at 22:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.