TL;DR
Clustering is often cited as a source of overdispersion in count data. However, I seem to arrive at the conclusion that clustering actually reduces the dispersion.
Could someone confirm this or show me where I am wrong?
Model
Here's an excerpt from "Generalized Linear Models" by McCullagh and Nelder:
It is my understanding that $\pi_i$ here is considered a set of fixed parameters along with $k$ and $m$ (i.e. this is not a hierarchical model), where $E(\pi_i)$ and $\mathrm{var}(\pi_i)$ refer to the sample mean and variance of the set of fixed numbers $\{\pi_1,\ldots,\pi_{m/k}\}$.
My results
Under the above assumptions, the variance I arrive at is
$$\mathrm{var}(Y)=m(\pi(1-\pi)-\mathrm{var}(\pi_i)),$$
which is smaller than the variance of $\mathrm{Binom}(m,\pi)$.
This also makes intuitive sense, since variance of the binomial distribution is a concave function of the mean, and so spreading out the $\pi_i$'s reduces the variance.
Finally, I made a quick simulation in R that further confirms it:
> set.seed(2016+10+21)
> m <- 100
> k <- 5
> p <- runif(m/k)
> p_m <- mean(p)
> p_v <- mean((p-p_m)^2)
> # Simulated variance
> mean(replicate(1000, var(replicate(50, sum(rbinom(m/k, k, p))))))
[1] 17.69588
> # My formula for clustered variance
> m*(p_m*(1-p_m)-p_v)
[1] 17.59746
> # Non-clustered variance
> m*(p_m*(1-p_m))
[1] 24.84612
So, could someone confirm this or show me where I am wrong?