Over one third are involved in something fatal or injurious to someone, themselves or another. A very small percentage leave office during their term because of their misdeeds.
Presidents can leave office for a number of reasons, including getting tired of being President, or hitting term limits. Some are voted out of office before term limits are up even though they ran. It turns out that violence and natural death account for a very large percentage of departures for reasons other than term limits. Relatively few were simply voted out of office even though they ran for re-election, and of those, relatively few (though I provide no estimate of this) were clearly voted out of office for misdeeds. One resigned for misdeeds.
Here are the numbers.
43 men have served as president of the united states. (I am not counting Trump who has been in office for one year.)
Four died in office of causes other than a violent attack, all of these prior to the mid 1940s, after which modern medicine advanced considerably. (Harrison, Taylor, Harding, and Roosevelt)
Four were killed by assassins, ranging across time but all before major upgrades in security starting in the 1960s. (Lincoln, Garfield, McKinley, and Kennedy)
One was shot and wounded, but lived. (Reagan)
Five were involved in serious violent attacks or incidents that in one way or another involved someone else getting shot or killed. This is a diverse list, including a plot against Nixon that ended up becoming an assassination attempt (with shooting) of a governor, and an attempt to kill the president (Roosevelt) that ended up causing the death of a bystander, etc. Franklen Roosevelt, Truman, Nixon, Jackson, and Ford were the targets in these instances.
Three presidents had violent attacks including the discharge of firearms perpetrated against them, but they were at no point in danger and no one else was hurt. (This is a mostly recent phenomenon — gun nuts too close to the White House mainly.)
A larger number of incidents occurred in which a plot to kill the president was discovered, and either fizzled by itself or was thwarted. However, it is probably safe to assume that not all known plots are publicly known, and the degree to which these plots may have been serious varies. Several fizzled on their own, so we should assume that there were also unknown unknown plots. Therefore, it is not really possible to count these.
So, all in all 17 fatal or seriously threatening situations occurred, but to 16 presidents (FDR suffered both a serious assassination attempt in which someone in his presence was killed, and died of natural causes in office).
Also not counted in this number is the shooting of Teddy Roosevelt, after he was President but while he was running for President again, and the shooting, attacks, or killing of any candidates for president (such as Wallace, shot, and Robert Kennedy, murdered).
To summarize, a president has a 37% chance of suffering natural or homicidal death, violent injury, a violent attack, or a bungled attempt at assassination involving the discharge of a firearm, while in office.
There is a 21% chance of death or violent attack likely but not always resulting in death, and a 30% chance of natural death or an attack in which a high probability of someone being killed or injured results.
The chance of a President leaving office on their own because of misdeeds is close to 2%. There is a slightly over 20% chance of a president being voted out of office after their first term. Of these, a much smaller percentage were clearly drummed out of office for unambiguous misdeeds that annoyed the electorate, perhaps about 5%.