Statistics on MCMC chains