Let $\bar{X_1},...,\bar{X_k}$ be independent mean vectors so that $\bar{X_i}\sim N_p(\mu,\frac{1}{N_i}I_p)$, then what is the distribution of $$\sum_{i=1}^{k} N_i(\bar{X_i}-\bar{\bar{X}})'(\bar{X_i}-\bar{\bar{X}}),$$ where $\bar{\bar{X}}=\frac{1}{N}\sum_{i=1}^k N_i\bar{X_i}$ and $N=\sum_{i=1}^k N_i$.
I initially tried with chi-square but since $(\bar{X_i}-\bar{\bar{X}})'s$ are not independent, it didn't work.