Just to join the responses of me and JD:
The 4% rule is based on JD´s formula h2 - h1 = 221.1T (logP1 -logP2)
as you can see the pressure difference between true height h2 and h1
is proportional to T which is the temperature in Kelvin (normally meanvalues for the layer are used).
For "normal" aviation atmosphere (~200-300 degrees K) a change of ten degrees (Celsius or Kelvin) will change the absolute temperature (T) with about:
(mean value 250 used) 10/250 = 4%
Happy landings