In anthropology, psychology, and cognitive science, the term magical thinking is used to describe causal reasoning that accords unwarranted weight to correlation or coincidence. It often includes such ideas as the ability of the mind to affect the physical world (see the philosophical problem of mental causation). Associative thinking may be brought into play, as well as the power of magical symbols, synchronicity, metaphor and metonym.
In both theory and practice, magic does not conform to more modern views of causality. For this reason, the practice of magic, or belief in it, has been described as irrational. For theorists, answering the question of whether magical thinking is rational requires inquiry into the thinker’s thought process and intentions, and into the efficacy of his or her practice.
Prominent Victorian theorists identified "associative thinking", a notion of causality believed by practitioners of magic, as a characteristic form of irrationality. As with all forms of magical thinking, association-based and similarity-based notions of causality need not involve the practice of magic by a magician. For example, the doctrine of signatures held that similarity between plant parts and body parts indicated their efficacy in treating diseases of those body parts, and was a part of Western medicine. This association-based thinking is a vivid example of the general human application of the representativeness heuristic.
Edward Burnett Tylor coined the term "associative thinking", characterizing it as pre-logical, in which the "magician's folly" is in mistaking an ideal connection with a real one. The magician believes that thematically-linked items can influence one another by virtue of their similarity. For example, in E. E. Evans-Pritchard’s account, amongst the Azande one rubs crocodile teeth on banana plants to make them fruitful, because crocodile teeth are curved (like bananas) and grow back if they fall out. The Azande observe this similarity and want to impart this capacity of regeneration to their bananas. To them, the rubbing constitutes a means of transference.
Sir James Frazer later elaborated upon this principle by dividing magic into the categories of “contagious” and “homeopathic” magic, both of which are forms of "sympathetic" magic. The former is based upon the law of contagion or contact, in which two things that were once connected retain this link and have the ability to affect their 'related' objects, such as harming a person by harming a lock of his hair. Homeopathic magic operates upon the premise that "like affects like," or that one can impart characteristics of one similar object to another. Frazer believed that ‘primitive peoples’ think the entire world functions according to these mimetic or 'homeopathic' principles.
In How Natives Think (1925), Lucien Lévy-Bruhl describes a similar notion of mystical, "collective representations." He, too, claims that magical thinking is fundamentally different from Westerners'. He asserts that in these representations, 'primitive' people's "mental activity is too little differentiated for it to be possible to consider ideas or images of objects by themselves apart from the emotions and passions which evoke those ideas or are evoked by them." Lévy-Bruhl explains that natives commit the post hoc, ergo propter hoc logical fallacy, in which people observe that x is followed by y, therefore y has been caused by x. He believes that this fallacy is institutionalized in native culture and is committed regularly and repeatedly.
These theories of associative thinking among non-Westerners that assert that magic is less than rational and that native people's notions of causality are inferior were contested by Claude Lévy-Strauss, The Savage Mind (1966), who found magical procedures relatively effective in exerting control over the environment. This outlook has generated alternative theories of magical thinking, such as the symbolic and psychological approaches, and softened the contrast between "educated" and "primitive" thinking: "Magical thinking is no less characteristic of our own mundane intellectual activity than it is of Zande curing practices."
Bronisław Malinowski, Magic, Science and Religion (1954) discusses another type of magical thinking, in which words and sounds are thought to have the ability to directly affect the world. This type of wish fulfilment thinking can result in the avoidance of talking about certain subjects ("speak of the devil and he'll appear"), the use of euphemisms instead of certain words, or the belief that to know the "true name" of something gives one power over it, or that certain chants, prayers, or mystical phrases will bring about physical changes in the world. More generally, it is magical thinking to take a symbol to be its referent or an analogy to represent an identity.
Sigmund Freud believed that magical thinking was produced by cognitive developmental factors. He described practitioners of magic as projecting their mental states onto the world around them, similar to a common phase in child development. From toddlerhood to early school age, children will often link the outside world with their internal consciousness, e.g. "It is raining because I am sad."
Another theory of magical thinking is the symbolic approach. Leading thinkers of this category, including Stanley J. Tambiah, believe that magic is meant to be expressive, rather than instrumental. As opposed to the direct, mimetic thinking of Frazer, Tambiah asserts that magic utilizes abstract analogies to express a desired state, along the lines of metonymy or metaphor.
An important question raised by this interpretation is how mere symbols could have material effects. One possible answer lies in John L. Austin’s concept of “performativity,” in which the act of saying something makes it true, such as in an inaugural or marital rite. Other theories propose that magic is effective because symbols are able to change internal psycho-physical states. They claim that the act of expressing a certain anxiety or desire is reparative in itself.
These theories can seem limited in that they do not account for the various explicitly instrumental magical practices. Many magical cultures have produced extensive rationalizations for magic’s potential lack of efficacy; this indicates that magical routines are invoked to bring about physical results. As stated by Gilbert Lewis, “if magicians performed spells for explicitly symbolic or metaphorical purposes, then we wouldn’t consider them magic at all…” 
Some scholars believe that magic is effective psychologically (see Psychological theories of magic). They cite the placebo effect, psychosomatic disease, etc., as prime examples of how our mental functions exert power over our bodies. Similarly, Robert Horton suggests that engaging in magical practices surrounding healing can relieve anxiety, which could have a significant positive physical impact. In the absence of advanced health care, such impacts could play a relatively major role, thereby helping to explain the persistence and popularity of such practices.
According to theories of anxiety relief and control, people turn to magical beliefs when there exists a sense of uncertainty and potential danger and little to do about it. Magic is used to restore a sense of control. In support of this theory, research indicates that superstitious behavior is invoked more often in high stress situations, especially by people with a greater desire for control.
One reason (but certainly not the only reason) for the persistence of magic rituals is that the ritual activates vigilance-precaution systems. In other words, the rituals prompt their own use by creating a feeling of insecurity and then proposing themselves as precautions. Boyer and Liénard propose that in obsessive-compulsive rituals — a possible clinical model for magical thinking — focus shifts to the lowest level of gestures, resulting in goal demotion. For example, an obsessive-compulsive cleaning ritual may overemphasize the order, direction, and number of wipes used to clean the surface. The goal becomes less important than the actions used to achieve the goal, with the implication that magic rituals can persist without efficacy because the intent is lost within the act.
Ariel Glucklich tries to understand magic from a subjective perspective, attempting to comprehend magic on a phenomenological, experientially-based level. Glucklich seeks to describe the attitude that magical practitioners feel which he calls "magical consciousness" or the "magical experience." He explains that it is based upon “the awareness of the interrelatedness of all things in the world by means of simple but refined sense perception,” Within this mindset of interrelatedness, magic is curative in the restoration of man’s equilibrium with nature.
Another phenomenological model is Gilbert Lewis’s, which is that "habit is unthinking." He believes that those practicing magic do not think of an explanatory theory behind their actions any more than the average person tries to grasp the pharmaceutical workings of aspirin. When the average person takes an aspirin, he does not know how the medicine chemically functions. He takes the pill with the premise that there is proof of efficacy. Similarly, many who avail themselves of magic do so without feeling the need to understand a causal theory behind it. Indeed, most people who use magic do so as a practical tool rather than as a philosophical question.
Robert Horton maintains that the difference between Western and non-Western people’s thinking is predominantly "idiomatic." He asserts that both cultures employ the same practical common-sense, and both science and magic are ways in which people delve into theory, into what occurs beyond that basic logic. When modern farmers desire, for example, to ensure plant growth, they would turn to scientific theory and might purchase fertilizer or consult a gardener. However, non-western cultures possess the idiom of magic or spiritual figures and would therefore turn to magical practices or an expert in that idiom. Horton sees both western and native cultures as possessing the same logic and common-sense, but simply different ontological idioms, which may contribute to seemingly illogical practices on either part. He explains, "the layman’s grounds for accepting the models propounded by the scientist is often no different from the young African villager's ground for accepting the models propounded by one of his elders."
Along similar lines, Michael Brown argues that the Aguaruna of Peru see magic as merely a type of technology, no more supernatural than their physical tools. He argues that the Aguaruna utilize magic in a very scientific manner, for example, discarding magical stones which they have observed to be ineffective. It seems, that to Brown, too, magical thinking merely differs in idiom.
These theories tend to blur the lines between magic, science, and religion, asserting the similarities between magical, technical, and spiritual practices. Brown even notes that he is tempted to claim that ‘magic’ does not exist. But if one maintains that magic is its own distinct category, then one might ask what makes magical thinking different from our own.
One theory of substantive difference is that of the open versus closed society. Horton describes this as one of the key dissimilarities between traditional thought and Western science. He suggests that the scientific worldview is distinguished from a magical one by the scientific method and by skepticism, requiring the falsifiability of any scientific hypothesis. He notes that for native peoples “there is no developed awareness of alternatives to the established body of theoretical texts.” He notes that all further differences between traditional and Western thought can be understood as a result of this factor, for example, the fact that African thought both lacks impersonal theory, or objectivity, and clings to the past as opposed to looking towards the future. Because there are no alternatives in magically-thought based societies, a theory does not need to be objectively judged to be valid, and each moment that passes draws them further away from a once undiluted relationship with the spiritual and natural world.
However, Richard Feynman suggested, in his "Cargo Cult Science" speech, that even scientists may fall prey to a form of magical thinking. When experiments are poorly controlled and not repeated, or a reporting bias dominates, scientists may "fool themselves" into believing that insignificant results are significant. If enough flawed work is done in a field — Feynman singles out psychology in particular as sloppy — then further experiments may devolve into a set of unfounded rituals. In short, methods that are scientific may be used to generate results that merely seem scientific.
At the other end of the spectrum from Feynman, science fiction author and futurist Sir Arthur C. Clarke famously observed that "[a]ny sufficiently advanced technology is indistinguishable from magic" (see Clarke's three laws).