I read an article a while back from a physicist that stated that based on the laws of physics and atomic structures, ghosts cannot pass through solid objects. He suggested that ghosts would have to be made up of a material that does not exist. there were no known particles small enough to allow them to pass through walls. read more
Regardless of the cause, if ghosts are viewed as a result of stimulus in the brain (not the eyes), that would explain how they walk through walls, and appear above and below floors. Most scientists have an explanation that is much more mundane. read more
This means that a ghost must be made of matter, and not energy. Supposing it's made of energy could explain the fact that ghosts may pass through walls, but most certainly, they couldn't walk. And if a ghost could walk through walls, this means it could also pass through the floor. read more