Contrary to popular understanding, there's no direct relationship between displacement/velocity and lower and upper floors. Furthermore, earthquakes have two types of waves: S and P.
S waves are more dangerous than P waves due to the higher amplitude. They also produce vertical and horizontal motions on the ground.