It is not possible to directly measure the temperature at the centre of the Earth and four thousand degrees is nothing more than our most well-established piece of guesswork to date. Most modern calculations rely on the fact that we believe the inner core to be made up of iron and nickel that is just about at melting point. It is under a lot of pressure, which prevents it from melting, even at such high temperatures. There is also a lot of evidence regarding how the outer core of the Earth convects and that helps to establish the temperature. However, recently British scientists have suggested that the temperature of the Earth's core may in fact be as high as the surface of the Sun, so the question is still open.
Answered by: Sally Riordan, M.A., Management Consultant, London