It's rare for a law enforcement officer to be convicted of homicide for shooting someone while on duty. According to a new NPR data analysis, 2,400 people have been killed this way in the last two and a half years; the vast majority of those cases were found to be justified, but NPR found 20 officers who faced charges. Of those, six have been convicted or pleaded guilty.

Many Americans have come to believe that the convictions are too rare. The acquittal earlier this month of Jeronimo Yanez in the shooting death of Philando Castile in Minnesota sparked protests, and an angry outburst on Facebook Live by Castile's mother, Valerie Castile.

"I don't know where they got the m************ jurors from, but that was some straight-up b*******!" she said, and mocked the defense's assertion that Yanez had been in fear of his life.

"You shouldn't be no police officer if you're going to handle yourself in that manner," Castile said.

When is fear reasonable?

During the trial, Yanez testified that he thought he was going to die, because he thought Philando Castile wasn't obeying his instructions, reaching for something in the car when Yanez told him not to.

He also said he had "strong suspicions" that Castile was one of two black robbery suspects he'd been looking out for.

"I think the question here is, when is fear reasonable," asks Ngozi Ndulue, senior director of criminal justice programs at the NAACP.

In cases involving police officers, juries are usually given instructions that refer to a 1989 Supreme Court ruling called Graham v. Connor, which says you can't judge a cop with "20/20 hindsight." In the Yanez case, for instance, the jurors were told that police officers are often forced to make split-second decisions — and those decisions should be evaluated based only on what the cop knew at that moment.

But Ndulue says those instructions can be used to excuse bias.

"There is more fear of African-Americans, and in particular African-American men, that is not justified, that's just based on who they are," Ndulue says. "So in these cases, a fear and an unreasonable fear can end up being someone's death sentence."

Ndulue says the current legal standard of Graham v. Connor make it "almost impossible" to convict a police officer.

Things are shifting

One prosecutor on a recent case that ended in acquittal told NPR that Graham v. Connor has "taken on a life of its own," allowing police too much leeway to perceive situations as more threatening than they really are.

But other experts say they don't blame Graham v. Connor for the low conviction rate. Geoffrey Alpert is a professor at the Department of Criminology and Criminal Justice at the University of South Carolina. He's had extensive experience following criminal prosecutions of police, both before and after Graham v. Connor set the "objective reasonableness" standard for judging lethal force. He says it's always been hard to convict cops.

"It's a social issue, not a legal issue," he says. "Jurors don't want to put cops in jail for making mistakes while they're doing their jobs."

In his experience, he says jurors are more open to civil penalties — cash payouts to the victims' families — than punishing police with jail time.

Still, some lawyers believe the ground is shifting in these cases. Andy Savage represents Michael Slager, the North Charleston, S.C., police officer who was caught on tape shooting to death a fleeing Walter Scott in 2015; he believes officers' defense teams face a greater challenge.

"The default position used to be, let's say 15, 20, 25 years ago, that the suspect must have done something that initiated the lethal force," he says. "Now, the default position is 'why did that police officer use lethal force?' And if it's a racial disparity between the officer and a suspect, it's even getting a closer look," he says.

Last year's trial of Michael Slager ended in a hung jury, and Savage believes that was in part because prosecutors "over-charged" him.

"Nine of the jurors contacted us," Savage says. "They thought there was an excessive use of force that did not amount to murder," he says. A few more jurors were willing to vote for manslaughter. He thinks the prosecution overplayed its hand.

"I think this case was one where there was a reaction," he says. "The solicitor, the district attorney... they're supposed to do what the law requires, not what the mob of public opinion requires."

Nevertheless, in May, Slager ended up making a deal with prosecutors to plead guilty to violating Scott's civil rights, and he awaits sentencing later this summer.

Growing expertise

Jeffrey Noble is a retired deputy police chief who's worked as a consultant and expert witness on several prosecutions of police officers, including that of Yanez. He thinks prosecutors are gradually building expertise in these cases.

"This whole idea of prosecuting police officers is new. It's not new in the sense of the law, the law has always allowed for it, and it's happened from time to time, but the extent it's happening now [is new.]" Noble says. As prosecutors learn which strategies work, he says "there probably will be more convictions."

Copyright 2017 NPR. To see more, visit http://www.npr.org/.