Provided is an optical sensor, including a light source configured to emit light; a photodetector array comprising a plurality of photodetectors positioned at different distances from the light source, each photodetector being configured to detect an optical signal returning from an object irradiated by the light emitted by the light source, and to measure a light intensity of the detected optical signal; and a processor configured to determine a correlation coefficient between variables based on the measured light intensity, and to determine a quality of the optical signal based on the determined correlation coefficient.