It is possible to compute population size $M_g$ from sampling frame. The standard deviation of $g$-th stratum is$$S_g^2 =\frac{1}{M_g-1} \sum\limits_{k=1}^{M_g} \left(y_{gk}-\bar{Y}_g \right)^2= \frac{1}{M_g-1} \sum\limits_{k=1}^{M_g} y_{gk}^2 - \frac{M_g}{M_g-1}\bar{Y}_g^2$$
$\sum k=1...M_g (y_gk)^2$ and $Ym_g^2$ have to be estimeted to estimate $S_g^2$. Estimate of $\sum k=1...M_g (y_gk)^2$ is
$\sum h=1...H N_h/n_h \sum i=1...n_h (y_gi)^2*z_hi$, where
$z_hi=if(0, h_i notin \theta_g; 1, h_i in \theta_g)$
, $\theta_g$ is the index group of successfully surveyed units belonging to $g$-th stratum. Estimate of $(Y_g)^2$
is
$$\hat{\bar{Y}}_g^2=\left( \hat{\bar{Y}}_g \right)^2-\hat{Var} \left(\hat{\bar{Y}} \right)$$
$$\hat{\bar{Y}}_g =\frac{\hat{Y}_g}{M_g}= \frac{1}{M_g} \sum\limits_{h=1}^{H} \frac{N_h}{n_h} \sum\limits_{i=1}^{n_h} y_{hi} z_{hi}$$
So the estimate of $S_g^2$ is
$s_g^2=\1/(M_g-1) \sum h=1...H N_h/n_h \sum i=1...n_h (y_hi)^2 * z_hi -$
$-M_g/(M_g-1) (1/M_g \sum h=1...H N_h/n_h \sum i=1...n_h y_hi z_hi)^2
$
Two conditions have to realize to estimate $S_g^2: n_h>1, forall g$ and $\theta_g <> 0, forall g.$
Variance of $Y$ is
$$ Var\left( \hat{Y} \right) = \sum\limits_{g=1}^{G} M_g^2 \left( \frac{1}{m_g} - \frac{1}{M_g} \right) S_g^2 $$
Estimate of $Var(Y)$ is
$$\hat{Var}\left( \hat{Y} \right) = \sum\limits_{g=1}^{G} M_g^2 \left( \frac{1}{m_g} - \frac{1}{M_g} \right)s_g^2$$