Testing gravity with cosmology: efficient simulations, novel statistics and analytical approaches