\[Ghi = \sqrt{\frac{1}{2}\sum(s_i/TS-v_i/TV)^2}\] where: \(s_i =\) the fraction of seats assigned to i-th party; \(v_i =\) the fraction of votes casted for i-th party.