On Friday, October 24th, during the busy lunch hour in the school cafeteria of Marysville-Pilchuck High School, in Marysville, Washington, Jaylen Fryberg opened fire on his classmates, killing one student and wounding four others, three of whom later died from their injuries. Then he killed himself.

Just a week earlier, Fryberg had been crowned prince of the school's homecoming court—he was a community volunteer, student athlete, and all-around “good kid.” But within hours of the shooting, that picture had changed. Quickly, media outlets analyzed his tweets, Facebook page, Instagram account, and his text and Facebook messages. He was “full of angst” and “anguished.” One media report concluded that “he just wasn’t in the right state of mind.” Another went further: he was a “depressed sociopath.” Many writers pointed out that the Maysville school district had recently received a large federal grant to improve mental-health services for students. “We used to have a much greater social safety net,” the district supervisor Jerry Jenkins told the Seattle Times. “Yes, he was popular, but there came a time when something changed. If people are educated to look for those, these are things they can do intervene,” Carolyn Reinach Wolf, a mental-health lawyer with a specialty in school shootings, said. The suggestion underlying much of the coverage was that improvements in the mental-health system could have prevented the violence.

When mass shooters strike, speculations about their mental health—sometimes borne out, sometimes not—are never far behind. It seems intuitive that someone who could do something terrible must be, in some sense, insane. But is that actually true? Are gun violence and mental illness really so tightly intertwined?

Jeffrey Swanson, a medical sociologist and professor of psychiatry at Duke University, first became interested in the perceived intersection of violence and mental illness while working at the University of Texas Medical Branch at Galveston in the mid-eighties. It was his first job out of graduate school, and he had been asked to estimate how many people in Texas met the criteria for needing mental-health services. As he pored over different data sets, he sensed that there could be some connection between mental health and violence. But he also realized that there was no good statewide data on the connection. “Nobody knew anything about the real connection between violent behavior and psychiatric disorders,” he told me. And so he decided to spend his career in pursuit of that link.

In general, we seem to believe that violent behavior is connected to mental illness. And if the behavior is sensationally violent—as in mass shootings—the perpetrator must certainly have been sick. As recently as 2013, almost forty-six per cent of respondents to a national survey said that people with mental illness were more dangerous than other people. According to two recent Gallup polls, from 2011 and 2013, more people believe that mass shootings result from a failure of the mental-health system than from easy access to guns. Eighty per cent of the population believes that mental illness is at least partially to blame for such incidents.

That belief has shaped our politics. The 1968 Gun Control Act prohibited anyone who had ever been committed to a mental hospital or had been “adjudicated as a mental defective” from purchasing firearms. That prohibition was reaffirmed, in 1993, by the Brady Handgun Violence Prevention Act. It has only become more strictly enforced in the intervening years, with the passing of the National Instant Criminal Background Check System Improvement Act, in 2008, as well as by statewide initiatives. In 2013, New York passed the Safe Act, which mandated that mental-health professionals file reports on patients “likely to engage in conduct that would result in harm to self or others”; those patients, who now number more than thirty-four thousand, have had their guns seized and have been prevented from buying new ones.

Are those policies based on sound science? To understand that question, one has to start with the complexities of the term “mental illness.” The technical definition includes any condition that appears in the Diagnostic and Statistical Manual of Mental Disorders, but the D.S.M. has changed with the culture; until the nineteen-eighties, homosexuality was listed in some form in the manual. Diagnostic criteria, too, may vary from state to state, hospital to hospital, and doctor to doctor. A diagnosis may change over time, too. Someone can be ill and then, later, be given a clean bill of health: mental illness is, in many cases, not a lifelong diagnosis, especially if it is being medicated. Conversely, someone may be ill but never diagnosed. What happens if the act of violence is the first diagnosable act? Any policy based on mental illness would have failed to prevent it.

When Swanson first analyzed the ostensible connection between violence and mental illness, looking at more than ten thousand individuals (both mentally ill and healthy) during the course of one year, he found that serious mental illness alone was a risk factor for violence—from minor incidents, like shoving, to armed assault—in only four per cent of cases. That is, if you took all of the incidents of violence reported among the people in the survey, mental illness alone could explain only four per cent of the incidents. When Swanson broke the samples down by demographics, he found that the occurrence of violence was more closely associated with whether someone was male, poor, and abusing either alcohol or drugs—and that those three factors alone could predict violent behavior with or without any sign of mental illness. If someone fit all three of those categories, the likelihood of them committing a violent act was high, even if they weren’t also mentally ill. If someone fit none, then mental illness was highly unlikely to be predictive of violence. “That study debunked two myths,” Swanson said. “One: people with mental illness are all dangerous. Well, the vast majority are not. And the other myth: that there’s no connection at all. There is one. It’s quite small, but it’s not completely nonexistent.”

In 2002, Swanson repeated his study over the course of the year, tracking eight hundred people in four states who were being treated for either psychosis or a major mood disorder (the most severe forms of mental illness). The number who committed a violent act that year, he found, was thirteen per cent. But the likelihood was dependent on whether they were unemployed, poor, living in disadvantaged communities, using drugs or alcohol, and had suffered from “violent victimization” during a part of their lives. The association was a cumulative one: take away all of these factors and the risk fell to two per cent, which is the same risk as found in the general population. Add one, and the risk remained low. Add two, and the risk doubled, at the least. Add three, and the risk of violence rose to thirty per cent.

Other people have since taken up Swanson’s work. A subsequent study of over a thousand discharged psychiatric inpatients, known as the MacArthur Violence Risk Assessment Study, found that, a year after their release, patients were only more likely than the average person to be violent if they were also abusing alcohol or drugs. Absent substance abuse, they were no more likely to act violently than were a set of randomly selected neighbors. Two years ago, an analysis of the National Epidemiologic Survey on Alcohol and Related Conditions (which contained data on more than thirty-two thousand individuals) found that just under three per cent of people suffering from severe mental illness had acted violently in the last year, as compared to just under one per cent of the general population. Those who also abused alcohol or drugs were at an elevated, ten-per-cent risk.