The statistician on Samuel Pepys's London and his love of wild swimming.