Fixed code to generate lower quartile