Like the Bigfoot and UFO phenomenon, there is certainly something out there that could be characterized as ghosts or spirits.
However, in LDS doctrine, these can't possibly be deceased people. Ghosts as the world call's them, are simply demons, the hosts of Satan, looking to deceive man.
These demons have spent since the time of Adam watching the earth and its mortal residents. Some could easily impersonate a dead person, since they might have observed/tempted that person throughout much of their life.
Elder Bruce R. McConkie agrees in his book "Mormon Doctrine," that ghost appearances are probably of devils, not former mortal residents of earth. These devils have never had a body.
When any person dies, they do not linger around us. They go straight to the spirit world, a separate dimension from us. The spirit world is divided into a paradise for the righteous and a hell for the wicked.
Some righteous people might temporarily and for a good purpose be able to show up in an earthly person's dream or vision, but the plan of salvation would be flawed to let either good or evil people linger around earth after their death.
Worse yet is if they could haunt a place for years or come back whenever they felt like it, but they can't.
What do these devils have to gain by impersonating deceased persons? By so doing, they can draw people away from divine sources and make them think that séances and spirit contacting can lead to revelation. They may even tell people some true things, but their true objective is to lead us away from God.
Why pray to God for guidance, if you can contact the dead and take their more exacting and enticing advice?
The Bible calls contacting the dead "spiritualism" and that it is an offense to God (Leviticus 19:31 and 1 Samuel 28). It is a form of sorcery and has no basis in the gospel.
The dead cannot be contacted by any means from this earth. They are separate from the world. Rare and brief dreams/visions by worthy family members are the only cases where the dead would return and then only briefly and one-time.
If some people would spend as much effort trying to gain true revelation as they do contact the so-called dead, they would likely exalt themselves.
And, the only ones who can really contact the dead are other dead people. Church members and believers in the spirit do missionary work the majority of the time there. The good are busy with that, while others are too busy repenting or being in torment to return to earth, even if they could, which they can't.
As a sidelight, no one except God or inspired persons can read a person's thoughts (D&C 6:16). Devils can't read our thoughts. They can put thoughts or temptations in our minds, though.