The simplest way which is incidentally fool proof is to spin the egg on a hard surface (a tray for example) and then quickly stop it spinning by briefly placing your finger on the top and quickly removing it. A raw egg will start turning again slightly whereas a hardboiled egg will remain still. This is because the yolk spins but isn't stopped completely when you briefly place your finger on the shell and will start the shell spinning again when you release it.
Also a raw egg has more inertia due to it's liquid interior than a boiled egg so roll them down a slope and the hard boiled egg will accelerate quicker than the raw egg and reach the bottom of the slope first! make sure they have a soft landing otherwise the foolproof method of breaking the shell will give you a definative result!
Floating eggs and the like are a bit hit and miss.
It's the appliance of science!
HF