Let's say we're designing a system, and within it we have some resistor \$R\$ with a voltage difference \$V\$ across its terminals. Then it dissipates power \$P = V^2 / R \$.
Of course the resistor has a certain tolerance, so its value lies between \$R - \Delta R\$ and \$R + \Delta R\$.
The voltage has also a certain "tolerance" (maximum ripple over a regulated nominal voltage), so its value lies between \$V - \Delta V\$ and \$V + \Delta V\$.
When deciding what power rating to pick for the resistor, I believe it makes sense to put ourselves in the worst possible situation, so the highest possible dissipated power would be \$ P_{max} = (V + \Delta V)^2 / (R - \Delta R) \$.
If we assume we precisely know the values for \$ \Delta R\$ and \$ \Delta V\$, how much bigger than \$ P_{max}\$ should the resistor rating be? We already are in the worst possible scenario, should we give ourselves some more error-space anyway?
Also, is there a more robust method to compute power rating than the one I mentioned?