Determination of the statistical properties of light from photoelectric measurements