Calculate quartiles and interquartile range