How to calculate sample proportion