Suppose we have the follow \( k \) group random sample with group size \( n_j \) is known:

\( X_{i,j}, ~~ i = 1, 2, \ldots, n_j, ~~ j = 1, 2, \ldots, k \)

We also have the assumption that they are independent, with a homogeneous variance inside a group:

\( Var[X_{i,j}] = \sigma_j^2, ~~ i = 1, 2, \ldots, n_j, ~~ j = 1, 2, \ldots, k \)

Now we consider the following proposed grand weighted mean estimator:

\( \sum_{j=1}^k \frac {w_j} {n_j} \sum_{i=1}^{n_j} X_{i,j} \)

where the constants \( w_j \) are known.

Then the variance will be

\( Var\left[ \sum_{j=1}^k \frac {w_j} {n_j} \sum_{i=1}^{n_j} X_{i,j} \right] \)

\( = \sum_{j=1}^k \frac {w_j^2} {n_j^2} Var\left[ \sum_{i=1}^{n_j} X_{i,j} \right] \)

\( = \sum_{j=1}^k \frac {w_j^2} {n_j^2} (n_j \sigma_j^2) \)

\( = \sum_{j=1}^k \frac {w_j^2 \sigma_j^2} {n_j} \)

Therefore the theorectical standard deviation (standard error of the estimator) will be

\( \sqrt{\sum_{j=1}^k \frac {w_j^2 \sigma_j^2} {n_j}} \)

Suppose the now you have already collect the data. Then you can use your method to estimate \( \sigma_j^2 \) by \( \hat{\sigma}_j^2 \)

and we can estimate the standard error by the plug-in version:

\( \sqrt{\sum_{j=1}^k \frac {w_j^2 \hat{\sigma}_j^2} {n_j}} \)