A formula on multivariate Dirichlet distributions