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!