# Understanding weighting class estimator

What I understand is that in this scenario,

the data is partitioned into Z weighting classes on the basis of variables observed for respondents and nonrespondents. $$n_z$$ represents the sample size, $$r_z$$ represents respondents in weighting class Z

The estimate of response probability $$\phi _z = r_z/n_z$$ , the estimate of weights for responding units $$w_i = r(\pi_i\phi_i)^-1/\sum_{z=1}^{r}(\pi_z\phi_z)^-1$$

If this is my test dataset

  Age       n         r            mean      Sd
20-29     23        19           219       32
30-39     37        29           222       37
40-49     30        17           245       43
50-59     15        6            270       41


How are the weights $$w_i$$ calculated ? I know $$\phi_z = {19/23, 29/37, 17/30, 6/15}$$ I am struggling a bit to understand how the weights are estimated here specifically the $$\pi_i$$ component.

Sorry if this is a moon shot but this reflects the gap in my understanding of these concepts. Any help or suggestion is appreciated.