The idea that foreign terrorists pose a grave threat to Americans is sacrosanct to President Donald Trump's immigration ban, which he enacted on Friday.

Trump's executive order immediately barred about 220 million people from seven majority-Muslim nations from setting foot on US soil for the next few months. It also triggered nationwide and international protest, sowed confusion at airports, and attracted judicial challenges (and defeats), among other discord. Military and foreign policy experts, meanwhile, expressed concern the ban may actually worsen the threat of terrorism.

The president, his administration, and his supporters defended the executive order by underscoring how the measure aims to protect US citizens from foreign-born terrorism.

"We cannot gamble with American lives," Department of Homeland Security (DHS) secretary John Kelly said Tuesday during a televised press conference. "I will not gamble with American lives."

But how justified is that gamble, according to real-world data?

President Trump signs an executive order on January 27, 2017. Carlos Barria/Reuters

According to a September 2016 study by Alex Nowrasteh at the Cato Institute, a libertarian think tank, some 3,024 Americans died from 1975 through 2015 due to foreign-born terrorism. That number includes the 9/11 terrorist attacks (2,983 people) and averages nearly 74 Americans per year.

Since 9/11, however, foreign-born terrorists have killed roughly one American per year. Six Americans have died per year at the hands, guns, and bombs of Islamic terrorists (foreign and domestic).

"I once asked a guy at [the National Institutes of Health] how much we should spend on preventing a disease that kills 6 per year, and he looked at me like I was crazy," John Mueller, a foreign policy expert at the Ohio State University and co-author of the book "Chasing Ghosts: The Policing of Terrorism", told Business Insider in an email.

Here's how the lifetime odds of the most common — and feared — causes of death for Americans stack up against foreign killings (highlighted in red):

Americans are more likely to win a lottery jackpot

The chart above doesn't account for an American person's specific behaviors, age, sex, location, or other factors that can wildly change up the results — it's one big, fat average of the US population.

The data primarily come from a 2016 report by the National Safety Council and the National Center for Health Statistics' final 2013 report on causes of death in the US, which was released in February 2016 (and is the most current).

To include the Cato Institute's terrorism data — which doesn't include terrorism in other countries where Americans were victims — plus natural-disaster data shared by Tulane University, we calculated the lifetime odds of death by applying 2013 life expectancy and population in the US. Our analysis also assumes each cause of death won't change drastically in the near future. (A quick look at mortality data from other years suggests the magnitudes and rankings are relatively consistent.)

"Everybody is arguing whether or not it is a BAN. Call it what you want, it is about keeping bad people (with bad intentions) out of country!" Trump tweeted on Wednesday.

However, the reality flips Trump's rationale on its head.

Compared to the threat posed by refugee terrorists — which the president's executive order is allegedly designed to curtail — the data suggest the typical American is:

6 times more likely to die from a shark attack (one of the rarest forms of death on Earth)

more likely to die from a shark attack (one of the rarest forms of death on Earth) 29 times more likely to die from a regional asteroid strike

more likely to die from a regional asteroid strike 260 times more likely to be struck and killed by lightning

more likely to be struck and killed by lightning 4,700 times more likely to die in an airplane or spaceship accident

more likely to die in an airplane or spaceship accident 129,000 times more likely to die in a gun assault

more likely to die in a gun assault 407,000 times more likely to die in a motor vehicle incident

more likely to die in a motor vehicle incident 6.9 million times more likely to die from cancer or heart disease

Put another way, as frightening and disturbing as events like 9/11 are, an American's unfathomably remote chances of winning the Powerball lottery jackpot are many times greater than those of being killed by a refugee terrorist on any given year — and even higher compared to the odds of being killed by an illegal immigrant terrorist.

Syrian refugee children stand in front of their family caravan in Al Zaatari refugee camp in Jordan near the border with Syria, December 3, 2016. Muhammad Hamed/Reuters

Weighing the logic of all-out counter-terrorism efforts

It's worth pointing out that the US government's multi-billion-dollar-per-year homeland security efforts to thwart terrorism, certainly since 9/11, have ostensibly reduced American deaths and kept the odds low.

However, it's hard to say — the DHS does not publicly release data about the number of terror attack attempts per day and lives saved as a result of its efforts. The same is also true of counter-terrorist military operations.

But assume for a moment that one 9/11-like event killed 3,000 Americans per year, and indefinitely. While this would drastically raise the lifetime odds of death by a foreign terrorist, the typical American is still far more likely to die walking out the door, getting into a car, jumping into a pool, or simply standing up.

Mueller and his colleague Mark G. Stewart explored the costs and benefits of fighting terrorism for the Cato Institute in a September 2014 study. That report states:

"[T]he United States spends about $100 billion per year seeking to deter, disrupt, or protect against domestic terrorism. If each saved life is valued at $14 million, it would be necessary for the counterterrorism measures to prevent or protect against between 6,000 and 7,000 terrorism deaths in the country each year, or twice that if the lower figure of $7 million for a saved life is applied."

Assuming the 2010 terrorist attack plot on Times Square was successful (the car bomb didn't go off), Mueller told Business Insider, hitting that measure would require four such attacks per day on US soil.

"As has been suggested," Mueller and Stewart wrote in their study, "terrorists scarcely seem to be numerous, competent, and dedicated enough to carry out such a task."

Andy Kiersz contributed to this report.

This story has been updated with new details provided after its initial publication. A sentence that compared lottery odds to terrorist killing odds was also corrected and made more precise.