As voting in California approached, the contest between Bernie Sanders and Hillary Clinton appeared to be tightening significantly. There were some weird differences in the polls, as we noted last week, but three polls conducted at the end of May or in early June showed the race within two points -- after Clinton had led by nearly 10 points in the Real Clear Politics average early last month.

On Tuesday, Clinton won by nearly 13 points.

So what happened? Why did a race that looked so close end up so ... not? Unfortunately, we don't have exit poll data from California, so we're left to make some assumptions about what happened based on the data we do have.

One thing we know is that Bernie Sanders's support was heavily dependent on younger voters. We also know that younger voters turn out less heavily than do older ones.

We created this chart of turnout by age in California last year, and it's instructive now.

There are a lot of reasons for this that are explored in that other post. But a candidate that's dependent on younger voters starts with that disadvantage.

In the Field Poll released last week, Sanders had a 60-point advantage among those under 30 and a 27-point advantage among those aged 30 to 39. Among those 50 and older, Clinton had a nearly 2-to-1 advantage. Those voters turn out more heavily.

One way in which we know they turned out more heavily on Tuesday was in the absentee vote. Paul Mitchell of the data firm Political Data found that two-thirds of absentee and early voters in the state were aged 55 or older. That's voters in total, so a large number of those votes came from older Republicans. But there's still a wide split between the 68 percent of those ballots that came from those 55 and over and the 10 percent that came from those under 36 years old.

A Los Angeles Times/USC survey that came out over the weekend showed Bernie Sanders with a one-point lead among all Democrats. But among Democrats who were likely to vote, Clinton led by 10. That shift, in itself, may explain a lot of what happened.

When we're considering turnout is when we get into questions of whether or not the Associated Press's announcement that Clinton had clinched the nomination on Monday night affected turnout. It's possible, but it seems unlikely. I reached out to Bryan Blum, political director for the California Labor Federation, before polls closed on Tuesday to see if he thought that the announcement would change the outcome. "I doubt it will effect it very much," Blum said. "People want to make their voice heard in presidential elections. And both the Clinton and Sanders campaigns have been running very active campaigns here."

Besides, we have other evidence of where the polls were wrong that is worth pointing out.

The most important demographic split over the course of the Democratic contest has been on race. Hillary Clinton's victory is heavily attributable to the fact that Bernie Sanders consistently lost the Hispanic vote by a large margin (21 points on average in states for which we have exit polling) and the black vote by a larger one (57 points on average). But that Field Poll suggested that Clinton had a much narrower lead with both groups -- 4 percentage points among Hispanics and 21 among black voters. Even the late SurveyUSA poll, which showed Clinton with an 18-point lead overall, showed Clinton only up 6 points with that group.

Without exit poll data for California, it's hard to evaluate that. But we can point out two correlations. In counties that were more heavily white, Sanders did much better. In counties that were more heavily Latino, Clinton did.

This is the population on the whole, so it's a rough metric. But the link is clear. If we average the results for each candidate in each county depending on whether or not the population was above or below the median on the density of whites, Hispanics and black residents, there's a clear pattern. What's more, Clinton did about as well in more-heavily Hispanic counties as she did in more-heavily black ones.

This is probably part of the reason why Clinton overperformed in Los Angeles and the Bay Area. In L.A. County, Field had her up 9; she won by 16. In the Bay Area, Field had her losing by 6 points; in San Francisco, Santa Clara and Alameda counties (home to San Francisco, San Jose and Oakland, respectively), she averaged a 14-point margin of victory.

We can't say with certainty why late polls indicated Sanders running much closer to Clinton than the results show. A lot of things likely played a role, including turnout among supporters of both candidates. But if you needed a reminder that polls and polling averages are not perfectly predictive, you just got another one.