Of the roughly 7,400 people sitting in Philadelphia's jails right now, more than half of them aren't there because they've been found guilty of a crime.

They've been accused of one and are waiting for trial. Many of them just can't afford to pay bail.

That's what happened to Joshua Glenn.

When he was 16 years old, Glenn was arrested for allegedly shooting another guy in the arm — a crime he says he didn't commit.

Glenn was accused of attempted murder, aggravated assault and a slew of other charges, but he didn't have the $2,000 it would have taken to bail himself out. After his preliminary arraignment, he was allowed to make one phone call to his mom.

"I just called her to say hi. I knew I wasn't getting out of jail," Glenn said. "I knew they didn't have the money. I mean, I did have friends, too, but you gotta keep in mind — you're 16, we're all kids, how many kids you know got $2,000?"

So Glenn sat in jail, waiting. 

In Philadelphia, the average inmate spends 95 days or about 3 months in jail.  That's four times higher than the national average. For those held pretrial on cash bail, the wait is about five months. 

Glenn waited 18 months.

A year and a half after he was arrested, prosecutors dropped Glenn's charges because there wasn't enough evidence to convict him, according to court records.

But by then, "I missed a lot of crucial times as a young person in my life just through school," he said. "You miss your prom, you miss your graduation - all for something I had nothing to do with."

Philadelphia's criminal justice system is hoping to prevent this from happening.

In the spring, the city announced a more than $6 million initiative to help it cut the population in its overcrowded jails by one-third over three years. One goal is to decrease how many people are just waiting for trial by 20 percent.

george moseeDeputy District Attorney George Mosee speaks about the $3.5 million MacArthur Safety and Justice Challenge Grant that will support Philadelphia's effort to reduce its prison population. (Emma Lee/WHYY)

"This is something that we are very committed to because we want to do all that we can to make sure that we employ our limited resources to target the offenders that pose the greatest public safety threat to our community," said Deputy District Attorney George Mosee at a press conference at the Criminal Justice Center back in April. 

So how do the courts figure out which defendants "pose the greatest public safety threat" and should be locked up and which should go free?

In the era of Big Data, Philadelphia is joining cities and states around the country in turning to computer algorithms called "risk assessment tools" that predict future criminal behavior. 

However, these tools have sparked a debate about whether big data really does lead to better decisions or just reinforces big bias.

Using big data to predict future criminal behavior

So how does it work?

Richard Berk, an applied statistician at the Univeristy of Pennsylvania, specializes in building risk assessment tools using a technique called "machine learning." 

Berk compares it to going to a bar with friends.

"You're having a beer or two and somebody comes up to you and starts talking to you," he said. "You have to decide whether to encourage this conversation or discourage this conversation — how do you decide?

"You have years of experience, you draw on that experience and you say, 'Well, this guy's a jerk. I'm not going to talk with him.' Or, 'Gee, this guy's kind of nice, kind of interesting. I'm going to encourage the conversation.' Computers do the same thing."

Berk gives computers "training data" about thousands of previous cases to help them "learn" how to understand new situations.

"In the case of the bar scene, should I encourage this conversation or should I not? In the case of criminal justice, should I release this person or should I incarcerate?"

By April, everyone who's arrested in Philadelphia and goes before a bail commissioner will be run through Berk's risk assessment tool. They'll get a score putting them into one of three categories: low, medium or high risk.

Combined with other reforms, like creating alternatives to cash bail, that score will guide commissioners in deciding whether to set bail and how high to set it based on how likely the defendant is to skip court appearances or commit another crime.

Low-risk defendants could be released, while those with higher scores might be let out with an ankle monitor to make sure they show up for court. Those posing the highest risk could still be held on high bails or no bail at all.

Right now, Philadelphia's jails are about 1,000 inmates over capacity. 

The city estimates this plan could free up more than 1,600 beds. Given it costs about $100 a day to incarcerate someone in Philadelphia, that could save roughly $30 million in taxpayer dollars.

Does big data lead to better decisions or big bias?

Proponents say making data-informed decisions will help eliminate bias in the system.

But not everyone agrees.

Paul Hetznecker is a criminal defense attorney who's been at it for nearly 30 years. He supports all of the reforms the city is planning to make except for this one.

That's because Hetznecker thinks the data that go into these risk assessment tools are biased.

"If you're in a poor neighborhood, and racist police have been arresting generations of individuals, how do you take that into account in terms of the risk assessment?" he asked.

Hetznecker fully agrees the current system of leaving it up to bail commissioners who may have biases of their own is flawed, but he doesn't see how it fixes anything to switch to a system full of data tainted by what he sees as years of biased police tactics.

His other concern is that predicting a defendant's future dangerousness undermines the presumption of innocence.

"The problem with that is that it ends up impacting the long-term the view of that person within the system because now they've been pre-judged," Hetznecker said. "If you've determined they're a risk to society, you might as well say they're guilty for who they are and not the crime they committed."

He also contends that making these decisions based on factors such as race and zip code is unconstitutional, although the legal implications of risk assessment tools have not been tested in court.

The First Judicial District, which is implementing the tool and oversees Philadelphia's pretrial system, declined to comment. 

According to Berk, court officials have asked him to leave out data about race and zip code from Philadelphia's risk assessment tool.

He understands why, but insists that factors like where defendants live do have an impact on how risky it is to release them before trial.

"There's very little crime where I live in Philadelphia," he said. "Maybe there's a lot of crime where you live in Philadelphia. Those are real factors that are associated with crime. If you don't allow us to use those, we're going to be forecasting less accurately. We may be more fair — that's arguable."

Berk says not including zip code and racial data would ensure fairness, but make predictions less accurate. It would likely be just as inaccurate for white suspects as black ones, but will likely lead to locking up more people who deserve to be released until trial. He also predicts it will lead to releasing more people who should not be.

"How many aggravated assaults, how many homicides, how many rapes are you prepared to trade for an instrument that's race neutral?"

That's the dilemma officials involved in Philadelphia's reform effort have to sort out.

'People need help'

Keir Bradford-Grey is part of that conversation as president of the Defender Association of Philadelphia.  She says the way pretrial decisions are made does need to be improved, but she's also concerned about bias and that the tool will err on the side of keeping some people in jail while they're presumed innocent.

That could come with consequences, too: a recent study from the University of Pennsylvania found those incarcerated pretrial because they could not afford bail were more likely to commit new crimes. 

"We want to make sure that what's in these risk assessments are something that we can measure and balance, so that it doesn't create an overly biased situation for some," she said. "And we want to also make sure risk assessments aren't the sole piece of information that is used to determine bail."

Bradford-Grey wants bail commissioners to take into account more information about defendants' lives: whether they have families and ties to their communities and whether they have addictions or other problems that need to be addressed. 

That's something Josha Glenn is also urging city officials to do. Now 28 years old, Glenn is the co-founder of the Youth Art & Self-Empowerment Project, which works with teenagers who have been charged as adults and is part of a campaign to reform Philadelphia's bail system

Last August, one of Glenn's co-workers, Romeeka Williams was arrested on a DUI. 

romeeka williamsRomeeka Williams sat in jail for about 3 weeks last summer because she couldn’t afford the $50,000 bail for a drunk driving offense. (Emma Lee/WHYY)

The month before, a man charged into her grandmother's house with an AK-47 and shot Williams in the thigh. She had recently been diagnosed with depression and was being emotionally and physically abused by her children's father.

She went to a bar with her aunt to blow off steam and before she left, popped a handful of percosets she was taking for the pain of her gunshot wound.

While driving home, Williams fell asleep at the wheel and hit a few parked cars.

At her preliminary arraignment, the bail commissioner pulled her rap sheet and saw Williams had served 18 months for an aggravated assault charge when she was a teenager. He set her bail for $50,000.

Williams was shocked: $50,000 bail for a misdemeanor charge?

"I just started crying because I thought about my two kids," she said. "I'm thinking I'm about to lose my house. I'm going to lose everything."

Williams was luckier than Glenn. She only spent three and a half weeks in jail. The judge in her previous case heard what was going on and released her on time served. Williams got home just in time to avoid being evicted from her home.

She acknowledges she would likely be considered "high risk" because of her record, but Williams wishes the bail commissioner knew more about the problems she was coping with when she decided to drink and drive, and about the good choices she had been making for the previous five years. 

"He should look at that and see that, 'Oh she's on a good path. Oh, she's living by herself. Oh, she has two children,'" she said. "People make mistakes and people need help."