$\text{ or }h_{n}=\sum_{x\in X}\left(p_{n}(x)\right)^{2}w_{x}$