This is a form of ideomotor reaction, a sort of involuntary cuing done without conscious awareness of which the one doing it may be completely oblivious, even when actively trying to avoid it.
This effect was named for a horse owned and trained by one Wilhelm von Osten, dubbed der Kluge Hans, or in English, Clever Hans, who was indeed clever, in a much different way than was initially thought.
Hans had convinced even scientists, who at first had validated him, that he was every bit as intelligent as a human being, or at least near-human in intellect, apparently able to demonstrate understanding of peoples’ names, perform simple arithmetical computations by tapping the answer with his hoof, tell time, and otherwise know the answers to questions posed to him by attendees of his performances, which began in the early 1890s until 1904 when his secret was discovered by investigator Oskar Pfungst.
The Clever Hans effect involves subtle cuing by posture and facial expression by way of the aforementioned ideomotor action, as well as a remarkable talent often mistaken for psychic ability in humans — hypersensory perception or HSP.
When a control measure was implemented, in this case the exclusion of those persons who knew the answers to questions asked, Hans was incapable of providing a convincing response and would not know when to start or stop tapping his hoof.
His seeming human-like intelligence simply went away until those absent from the test were once again present.
Hans’ trainer, completely sincere in his initial belief, was taken aback by the animal’s failure to perform when controls were introduced. He didn’t even notice the changes in his posture and facial expression that were signaling Hans, so subtle were they.
In the late 1920s Duke University parapsychologist J.B. Rhine looked into the matter of another, similar case, that of a mare in Richmond Virginia dubbed Lady Wonder by her owner.
Rhine was absolutely convince that Lady Wonder was telepathic, and her performance, signaled by her owner by cracking his whip, involved making predictions and otherwise answer questions by pushing over toy childrens’ blocks with her hoof to spell out the answer.
The case was solved by magician Milbourne Christopher, who had identified her seeming paranormal ability as being the the result of the Clever Hans effect, not psychic powers, since she was unable to perform, often turning over the blocks at random, when her owner was not there to signal her, or when the trainer was unaware of the answer to a question.
This case illustrates perfectly why it is necessary to have a trained magician in attendance of a paranormal experiment, as James Randi has so often, and sometimes in vain, noted.
Something similar happened in a series of animal communication studies done during the 1970s, with the Nim Chimpsky incident (sort of an inside joke by the researchers referring to language theorist Noam Chomsky):
In this case, a male chimp subject named Nim, had at first convinced his handlers and researchers that he possessed sign-language abilities of extremely unusual nature, and had seemingly demonstrated the capacity to use complex sentences and create his own jokes.
He was, however, merely, if one will excuse the pun, “aping” the signs made by his handlers in exchange for a reward. In those instances when the signs were intelligible, he was talking, and if not, that he was making a joke.
There is of course, often a lot of shoehorning, selective thinking and confirmation bias going on during the studies of this sort, when those persons involved will frequently dismiss and ignore the wrong gestures and take note of and remember the correct ones.
It happened in this series of studies that the test-subjects would perform a series of random gestures until their handlers gave them a reward.
I suspect that this may have been the case in studies of a female gorilla named Koko, who in a similar situation seemed to invent her own signs and reportedly show an IQ of about the human equivalent of 60.
This is something that has time and again beset early animal communication research.
Note that, as mentioned above, even being aware of the Clever Hans effect and trying to prevent it brings no certainty of actually doing so.