Your heating and Air Conditioning system has been designed to deliver and recirculate conditioned air to most of the living areas in your home. The ductwork that was originally installed should have been sized and adjusted to provide a reasonably stable averaging of temperature throughout the building structure.
The Ideal location of the thermostat would be to position it in an area that can consistently sample this averaged air without being adversely affected by other factors that could generate uncontrolled heat gain or heat loss.
If the thermostat was in line with direct sunlight, the heating cycle would shut down prematurely and the home would end up cooler than the desired setting. On a cooling cycle the home would also end up cooler than setpoint.
While a table lamp could have the same impact as the sunlight, a supply air duct that is too close will cause the heating or air conditioning cycle to shut down prematurely(short cycle).
Temperature changes within the wall cavity directly behind the thermostat caused by plumbing or ducting can sometimes be overcome by sealing the hole where the wires come through to the back of the thermostat.
In most homes a hallway or central space that is close to a return air duct provides the ideal location for the thermostat to sample stable and average air.
Hot or cold rooms caused by stratification may require duct modifications or the introduction of longer run cycles. (More on this in a future post).