In science, an ad hoc hypothesis is an assumption made in response to facts that are inconsistent with a theory in order to prevent the theory from being falsified. By extension, an ad hoc hypothesis is any assumption made to save a claim from being refuted. What are often called ad hoc hypotheses might better be referred to simply as rationalizations.
One of the more important ways of testing a scientific theory is to deduce observations that should occur under specified conditions if the theory is correct. An experiment may create those conditions and if the predicted observations occur, the theory is said to be confirmed. Experiments that confirm a theory should be replicable. If the predicted observations do not occur and it is determined that the theory cannot be correct if they do not, then the theory is falsified. Likewise, if experiments fail to replicate confirmations and it is determined that the theory cannot be correct if replication doesn't occur, then the theory is said to be falsified. If a new fact is discovered that is inconsistent with the theory, the fact must be accommodated. The theory might be tweaked or it may be preserved by hypothesizing another fact that would make the first fact consistent with the theory. Or, the fact might prove the theory false.
When Alfred Wegener proposed his theory of continental drift in 1912 against the prevailing theory that the Earth was formed by cooling from a molten state and contractions, he could not explain how continents move. It was suggested that gravity was the force behind the movement of continents, though there was no scientific evidence for this notion. In fact, scientists could and did show that gravity was too weak a force to account for the movement of continents. Alexis du Toit, a defender of Wegener’s theory, argued for radioactive melting of the ocean floor at continental borders as the mechanism by which continents might move. “This ad hoc hypothesis added no increment of plausibility to Wegener’s speculation,” wrote Stephen Jay Gould (Ever Since Darwin. W.W. Norton & Company.1979, p. 163).
George Dillman claims that he and his top students can knock out people by manipulating some sort of subtle energy called qi (chi or ch'i, pronounced chee). When 8th degree black belt Leon Jay failed to move Luigi Garlaschelli with qi, Dillman offered the following ad hoc hypotheses. 1. Garlaschelli is a total non-believer and you must believe you can be knocked out by qi for the power to work. 2. Garlaschelli might have had one big toe pointing upward and the other pointing downward. If so, the power won't work. 3. Maybe Garlaschelli wasn’t knocked out because his tongue was "in the wrong position."
While Dillman's hypotheses seem like obvious rationalizations, they have the merit of being empirically testable to a degree. Qi remains undetectable by science's most refined measuring instruments, but we can at least test the toe and tongue position claims. If the no-touch knockout doesn't work even when the toes and tongues are aligned the way Dillman wants them, we'll at least know that these hypotheses are false. On the other hand, if Jay or Dillman knocked over Garlaschelli without touching him when his toe and tongue were aligned, we'd have evidence in favor of the qi hypothesis.
Physicist John Taylor explained that the reason the children he was studying for their psychokinetic powers could bend forks and spoons with their minds only when nobody was looking was because of "the shyness effect." The children weren't shy; paranormal phenomena are. Taylor hypothesized that paranormal phenomena have an aversion to scrutiny.
When a psychic dowser was unable to distinguish bottles of regular water from those he claimed he had energized with healing properties, he hypothesized that his magic water had energized all the bottles of water in the room. You can view this rationalization on Nova's "Secrets of the Psychics" with James Randi. The magic water hypothesis is reminiscent of the claim that several copies of the shroud of Turin exist because the original has the magic property of transferring its image to nearby cloths.
Ingo Swann, an advocate of remote viewing, claimed that he saw a 30,000 ft. mountain range on Jupiter on an astral voyage when there is no such thing. Swann, in a lovely ad hoc hypothesis, now claims that astral travel is so fast that he probably wasn't seeing Jupiter but another planet in another solar system! There really is a big mountain out there on some planet in some solar system in some galaxy.