Data smoothing in temperature measurements from MLX90614 BCC IR sensor
In any measurement application the VERY FIRST thing you should to do is to calibrate the hardware and characterize it's noise floor and data variance by doing measurements on a known device.
Start with measuring something that's guaranteed to be at a constant and known temperature and take histograms. These SHOULD have a more or less a gaussian shape with the mean matching the temperature of the device under test and the standard deviation being the capability of your measurement setup. If that's not the case or if the standard deviation is larger than you need it to be, you need to start debugging the hardware.
You histograms do not make a lot of sense. Typically you would expect a gaussian shape with a continuous distribution around the mean. The large gaps you have in your histograms indicate that there is something not working as it should .