Switched around mean and median where necessary