 He moved to Duke in 2003 and he is now Chairman of the Mathematics Department there. His main research specialty is in long-time behavior of stochastic systems and stochastic behavior of fluids and so on. He's a great authority in this subject and he turned his attention, starting with an undergraduate project about four years ago to the probabilistic aspect of gerrymandering. And he's turned this into, well, what can I say, a second career. I mean, he's doing something that I think we all should all really respect is taking his mathematical expertise and applying it in a social realm that is sorely needed nowadays. So I want to introduce Jonathan Mattingly. Thank you very much for coming. Thanks, Ray. So I really want to thank Ray for this invitation above all because it's really nice to see him again. We don't see each other enough. And it's also nice to come back to PCMI. I was a graduate student here longer ago than I would like to remember. I had the bad luck. I was one of the few years it was in Princeton instead of in beautiful Utah. So I got to sweltering Princeton instead of up here in the mountains. So I've always been confused as a mathematician. I've always had secret lives where I did very applied things that just interested me and then I would start feeling uncomfortable because I hadn't proved a theorem in a while and then I'd prove a theorem and then I'd start feeling uncomfortable because I couldn't tell it to my parents and they didn't care except that I was happy because I find it's tough working on that theorem. So maybe this is kind of finally coming out of the closet to some people who haven't seen me parts of my secret lives before. And this one has grown to be much less secret than any of my other secret lives. So what I want to tell you a little bit about is some work that did start with an undergraduate thesis. Ray stole one of my punchlines but it might as well get it out there from the beginning. It was kind of trying to understand how to quantify gerrymandering. And there's a story about how that all got started and I'll tell you at the end. Kristi Vaughn was her name and she did an undergraduate thesis with me and then she went on and she's now a PhD student at Princeton in the Applied Mouth Program there. Look for her name. And in a way the subtitle is maybe what I would think the title is revealing the geopolitical structure through sampling. But I could have also maybe, does this work? Yes. I might have also called this how a nice mathematician like me ended up in court. And I, it's a true story and this did land me in court and I'll explain that in a minute. And I should say that I have a whole team, many of them undergrads and some of them graduate students, some of them post-docs and the main person who I've really increasingly done this work with is Greg Herschelog who's a kind of senior research scientist now at Duke. All right, so what is gerrymandering? Here's the definition. To manipulate district boundaries to favor one party partisan, that's partisan gerrymandering or class that's often racial gerrymandering, to change the outcome, to gerrymander the results. And this goes back to, this term at least goes back to a political cartoon in the Boston Gazette in March of 1812 to critique a set of districts that Eldridge Gary's party, not Eldridge Gary, not gerry, if we mispronounce it now, but we say Des Moines anyway so it doesn't really matter. But it comes from Eldridge Gary who's the governor and he was a signer of the Declaration of Independence so there's actually, follow him on Twitter, he's rather irritated that he's remembered for this and not all the other great things he did, he tweets about it regularly. I don't know who's running his Twitter account but he has a Twitter account so if you're bored, go follow Eldridge Gary on Twitter. This is really not working very well, let me see if I can turn this around, maybe I can get a little better connection, nope, did we go Technicolor up there? Yep, okay, we're back, all right, so partisan gerrymandering which is really to favor a political party versus to favor disadvantage of a particular racial group which is what historically has happened in at least the last 30, 40 years is really having a moment right now. There are estimates that the Democrats need 7 to 11 percent majority to win a majority in the U.S. House of Representatives due to gerrymandering. I should say it has a long history, it's not one party or another, at the moment Democrats are out of power in many ways so it's more affecting them but there are many cases where the Democrats gerrymandered situations so it's really a bipartisan question, I really want to say that. My take on this is very bipartisan, I try to come at this from a kind of a research point of view but informing political discourse nonetheless. There are three cases, one I should have updated not currently so Wisconsin, Maryland and North Carolina all were in front of the Supreme Court in various ways. They decided Gil which was the case versus Whitford which was the case in Wisconsin in some ways. They decided that they didn't have standing which is a political term which means, legal term which means that they didn't have the right to bring the case. If I see a car wreck and the car hits someone and then I decide to sue the car, the driver of the car, I don't have any cause, I wasn't the one hit with the car. The person who was hit with the car has to sue them and that's kind of what happened here. The Maryland one was sent back to actually go to trial and the North Carolina one which actually went to trial didn't make it to the Supreme Court quite yet. It was delayed due to some health issues of one of the judges but that was sent back to the North Carolina court to have an updated opinion so it wasn't decided. They did not decide on the merits of the case, they just decided update your opinion based on what we've already said and I should say that the North Carolina court's case is exactly the case that I went to court in. So I was an expert witness for common cause. There was a case common cause versus Rucho which is representing the state of North Carolina and the legal women voters versus Rucho and those two cases were brought together and I was an expert witness in the case in North Carolina and I actually was the first witness called, it was nerve wracking and I testified for almost three hours so you can ask me more details about that afterwards. There's also a case in Pennsylvania and that was decided that it was found the case of partisan gerrymandering and the Pennsylvania case was based on the Supreme Court on the Constitution of Pennsylvania and so there is no appeal to the Supreme Court. It's just, that's it. So the Wisconsin one was at the level of the state legislature, the North Carolina and Maryland one are the ones at the level of the House of Representatives and I should say that the North Carolina case, it was declared that it was a case of political gerrymandering and that was the first time there had ever been a federal case that declared a map, a set of redistricting a gerrymander politically and the work, that testimony, I mean what I'm going to explain to you here is the work that we did that went into our testimony in court. All right, so I'm going to explain to you what we showed the judges. And then last, I do pick up at the end here, this is, so just before I came here, this Wednesday in fact, the common cause had to submit a brief and they were discussing, they were asking us, you know, more questions about our work. It's all out there in the public but you can read about it. We have a blog which I'll point up to in a minute but it was relevant. So this is still ongoing. We're still waiting to see what's going to happen. All right. Wow, okay, there we go. Did it skip more than one? No, okay. So here are the cases laid out. So common cause versus retro, that's the North Carolina one. Gil versus Whitford, that's the one in Wisconsin. North Carolina and Covington, we also actually worked in that case a little bit and there's been a lot of places you can read about our work but there's a link down here at the bottom which is this quantifying gerrymandering website which I encourage you to go look at if you're interested in hearing more about this because we have a little blog post that are very digestible and I think a lot of them are readable at any level. All right, so, okay, so I'm going to probably have to give up on this. There we go. All right, so the story. It's a story about democracy at the end of the question, at the end of the day, right, it's a question about we all raise our hand to vote on something, somebody counts the votes and we make a decision and it's the method, it's the procedure that we use in our country to do that. And that procedure is somehow trying to read the will of the people by looking at a vote. So the basic idea is that every person gets to vote and each vote is counted hopefully only once. And the real question I want to ask is, is that enough? Thanks for laughing. If each vote is counted once and only once, is that enough to make it a fair election, all right? And let's go back to the definition of gerrymandering. Notice that there are two words in red there, to manipulate or to change the outcome. So there's some idea here that we knew what it should have been, right? We need some kind of null hypothesis. We need some normative idea of what we're considering a change against. And that was really the question that we started talking about, Christy Von and I, and that was what interested us. So let me show you a famous example. By famous I mean the normal thing, it was from Wikipedia. So if you look on the far, I'm borderline dyslexic, so I was about to say right or left and I had no idea if I was right or wrong. That side, if you look over here, you'll see a fictitious state, right? So it's a 10 by 5 grid and each of these boxes is a precinct, let's say, or let's say just a person, and they vote for the red or the blue party. And there's, what, two-fifths of the people in this state are voting for the blue party and three-fifths are voting for the red party, right? And now here's a bunch of districts. Let's say we decided we needed five districts to represent this state. And let's make up different districts. So here are three different districts, districtings. In this one, red wins three and blue wins two. Okay, that jives with the fractions, right? But in this next one, red wins everything. But in some ways, we might have said this one looked like a better districting than that one. And then this one, red only wins two, red only wins two, even though red has 60% of the votes, all right? So you see that I've never changed a vote. All I did was change how I drew the maps. And you start to worry a little bit about maybe that being maybe more important than how people voted as to the outcome. So this is a lot of story about North Carolina. That's where North Carolina is, for those of you who don't know. It's a diverse state. It's a purple state. It has lots of different areas. And here I have the 2012 districts that were used in the 2012 House of Representatives elections. They're colored, each color is a different district. There are 13 districts in the state of North Carolina that 13 representatives sent to the House of Representatives in Washington to be among the 435 representatives. And this redistricting was declared a racial gerrymander. And you might look in and say, well, of course it is. Look at these crazy districts, right? And here are some other crazy districts. Some of these are from Maryland. Some of these, I think, are from Illinois. So some of these are Democratic gerrymanders also. So the question is, is gerrymandering about oddly shaped districts? Does it have something to do with geometry? Is there something about the shape of weirdly shaped districts? Not necessarily, it's the right answer. So as a test, I mean, when somebody does this, they're setting you up, so play along. So here are three redistrictings. We're back in Sesame Street. Which of these is not like the other? One of these does not belong, if you're on your LSAT. So which one doesn't belong? The top one? The top one doesn't belong, right? Well, it turns out, if you're interested in using these for elections, the top two are the same and the bottom one is different. And that's part of the story I wanna tell you today. And I should tell you what these three maps were. The top one was the map that was declared a racial gerrymander. The bottom one was the, the middle one was the one they then replaced it with. That was then used in the 2012, 2016, excuse me, 2016 House of Representatives elections in North Carolina. And that was the map that was declared a political gerrymandering. And declared illegal based on that. And then it was that decision that was vacated by the Supreme Court two weeks ago, three weeks ago and sent back to have a new decision written. And if you're doing your math, right, we redo our redistricts. We remember how it works in the United States. We have a census on the powers of 10, right? On this years that end in zero. Then right after that, we reapportion the House of Representatives and we redraw districts based on that. So the 2012 was the first election after the reapportionment after the census in 2010. And now we're 2018 and every single map that we've used in an election in North Carolina has been declared illegal. Every once in a while I wonder if someone's gonna decide make the case that all the laws that have been passed in the last eight years in North Carolina should also be declared illegal since they were, anyway, for another, another conversation. So I think I wanna make the point from the last slide, let me just make that point, that if I'm right, if I convince you that the top two are the same, it doesn't have anything to do with the shape, strange shape districts, that's not the point. Well maybe it has to do with shocking results. And this is actually how I got interested in this. So here's a bunch of elections, some of them Democratic, some of them Republican. Let's look at the top one, North Carolina. So 31% voted, whoops, something's wrong there, the numbers got flipped. Oh no that's right, 50% voted Democrat and 48% voted Republican in the 2012 elections, 49%. But yet the Democrats won four seats only. The Republicans won nine. Yeah, something doesn't look right, I agree. Look at the Maryland case. Maryland, 63% voted Democrat, but 87, over 87% of the seats go to Democrats in Maryland. Right? And so that struck me as odd. I heard a speech, I heard a talk, and my student and I, Christie, who were interested and we were actually trying to do something different, we got interested in the question. And more to the point, if you look to dive into this one a little bit more, I don't know if you can read that very well, if you looked at the most Democratic district in North Carolina, it had 78% Democratic vote. And the least Republican had 63% Republican vote. Most Republican, thank you, most Republican, he's keeping my toes, the most Republican had 63% Republican vote. And they were saying, well that's clearly wrong. There's clearly been Democrats packed into this most Democratic district, but then my mathematician alarm bells went off. I said, well, how do you know that? I mean, could it just be where people live? Could that be very natural? How do I decide that? Right? Okay, maybe that's 78s too much, but maybe 70s just fine? I don't know, where do I, how do I figure that out, right? I mean, it's like you take a whole bunch of numbers between one and 100, pick five number, 10 numbers randomly between one and 100, and they take the maximum. Not surprisingly, the maximum is much bigger than the mean. Now we're near 50, right? It's much higher. It's called order statistics, go look it up. So, I really can't drift from this. All right, so, you know, kind of what, you know, is this some red flag that we should be worried about? You know, if not, what is the signature of something being gerrymandered? If it's not a wiggly, scraggly, districting, what is it? How can we get at that? So, the U.S., we live in a system which is not proportional representation, right? We have this idea of individual localized districts, which are well, which are, for good reasons also, right? This idea of local governance. And our states are not homogeneous at all. Here's North Carolina. This map is population density. So, Charlotte, Raleigh, Durham, Chapel Hill is the one to the far right. The middle one is Greensboro. The blip over to the left is Asheville. Down here is Wilmington. And they all have different political perspectives. It's not just urban versus rural. This is county by county, 100 counties. What pres, the presidential vote in 2016. So, this rural area right up at the top was very blue. And I live in that very bright blue boxes there. And I grew up in the slightly lighter blue box down at the edge. Yeah, go ahead. Yeah. Yeah, that's true. We'll come back to all this later. Actually, we should, I want to make sure I get to the end, but I really want to hear all your questions at the end because it's, all this does is raise questions. So, keep thinking about the questions. Let's see, here we go. So, how do we quantify gerrymandering? How do we do it in a way that actually takes into account, doesn't dismiss this natural, this inhomogeneity of our states? The fact that there's this geometry of our states. The fact that there's this population, this geopolitical geometry of the state. How do we take that into account? And, whoops. Yeah, well, when is a map fair? What is a map typical? Is that the same thing? Is that a mathematical sleight of hand I just pulled? So, what if we drew the maps, the districts randomly? Right? Rafe outed me as a stochastic dynamicist. So, you know, I do stochastic spatial processes often, stochastic PDs, stochastic homogenization at times even. So, you know, what if we drew the districts randomly? What if we drew them randomly without regard to party representation, right? Without regard to anything that was partisan. And what if we looked for the likely behavior, the typical behavior of an ensemble and we played that off against what happened in a certain map? Could we use that as a normative way to detect when something was a skew? A little bit of a pun intended. So, could we create a null hypothesis without any information about partisan, that was not influenced by partisan data? And that's really what we set out to do. There's a lot of groups, so we've been doing this for a while, there's a lot of groups who've kind of, who've done it for varying amounts of time. Joey Chen, Jonathan Rudin at Stanford in Michigan, Wendy Cho, a group centered with Ben Fightfield's thesis at Princeton, and Alan Fries and Wes Pegdon and Maria have a really nice theorem that ties into all this and Wes has actually testified in court also. So, in the short time, I'm really just gonna tell you the story that we did, but it's definitely, there's definitely resonance with things that various people have done in various directions. All right, so. And one thing that's important about our work is we really try to think about a set of kind of a principled method of drawing redistricting. That we can really, that all of our assumptions are clear and out in front, so that they can be discussed openly. All right, so, this is what we do. We say, let's draw a random redistricting and there was some guidance for this in North Carolina. There was a house bill that was passed through one chamber of our legislature, but not through the other one, so it never became law, but various versions of it have been introduced over time by both the Republicans and the Democrats. And it lays out the following criteria. Districts should be equal to within what, a tenth of a percent. Districts should be reasonably compact. It actually goes a little bit farther than that and has some wording about that. You wouldn't call it a definition, but it's not as far from, it's closer to a definition than what I wrote there. They have to be connected. Territory has to be contiguous. They have to comply with the Voting Rights Act, and so North Carolina was under section, was not under the main section, but the lesser section of the Voting Rights Act, but you wanted to protect yourself against lawsuits, and so what that means in North Carolina, about 22% of the safe population is African-American, so that means you need about two districts that the African-American population has a reasonable chance of affecting the outcome of the election. That's the current legal standard. I can say more about that if you want. And it also said explicitly, you should not take into account incumbency. You should not take into account party affiliations. You should not take into account demographics. So with the exception of the Voting Rights Act, that's all the other criteria in nonpartisan. Since African-Americans vote heavily democratic, especially North Carolina, that almost is a surrogate for being in a democratic party, but the Voting Rights Act forces your hand there, so you want to do it in a very leisurely way. So, where's the math? So, what I have is a 13-color POTS model, and what does that mean? So what it means is I have a lattice, and at every lattice is a precinct, and so I have all the precincts, and I have a map from each precinct to the number one through 13, which is the district that it's in, the color, if you will, for the statistical machinations in the room. And then I have an unusual energy, energy that tries to measure whether the populations are equally distributed, or energy which tries to decide a surface energy that tries to decide if they're relatively compact, a county energy, because there's something in the rules in the Constitution of North Carolina that says you should not try to split counties because they're seen as political constituencies that should be left whole, and then there's some energy that tries to make sure you're adhering to the Voting Rights Act. Lower scores are better, so these numbers, these different J's, we call them scores, they're energies. Lower the energy, the better, the lower the score is better. And then what we do is we build this Gibbs measure, we build a probability distribution on the space of all redistrictings, okay? So what that really is, is saying that we're gonna pick districtings randomly according to this probability distribution, where the probability of picking a certain redistricting goes up as the score goes down. So the lower the score, e to the minus, the lower the score, the higher the probability, okay? And so it tries to pick redistrictings that satisfy the principles that we've put in. And you can debate about what principles we put in, so we, at one end, give you a methodology for thinking about this and then open the door and say, let's decide what principles we should put in this score function. So here's one of them. Here's the equal population. So what you do is you take the population of each district, n goes from one to 13, you add it up and you look at the square deviation from the ideal population of a district, which is one over 13, the population of North Carolina at the moment of the census. And that comes out to be this number, right? 733,000 something. All right? And so you sum this up. So you really have this point in 13 dimensional space and you're measuring the square distance to it of your map. And you try to lower that dimensionality. Then you also have the compactness score, which is actually, this number is reciprocal of something that I didn't know. They used in actually in political science, but the mathematicians, you guys will recognize this as the isoparametric constant of each district. So you take its perimeter squared divided by its area, and this is older than the hills, right? This goes back to at least Dido, right? Carthage. So there's, this is a room full of geometric measure theorists. Everyone should be nodding, right? So we have the perimeter squared over the area. And of course, that's minimized by a circle. So this wants to try to make it compact if we can. So we add up the isoparametric constants for every one of the districts. And we say, let's minimize that to try to keep it compact. We consider some other energies, but this one we like the best, other compactness energies. All right. So the recipe is, first we determine a compliant random redistricting, all right? Then we count, so we do that by sampling from this distribution. Then we count the number of votes in each new district that we just formed using some historical election. So we take the House of Representatives race in 2016 where we had the votes in each precinct. We add them up in each of our districts, and now we have a winner in each district. And we record that. We also record how much they won by in some statistics. And we do that over and over again. And we did that almost, the data we presented in court was 24,000 different maps. We actually checked it against 120,000 different maps that we generated to try to benchmark our scores. So you do this over and over again. You get the idea, you do a loop. So you take a map you've generated, you run an election on it, which is an actual election with the actual votes that people cast. Now we're making a lie. We assume that if you vote a Democrat, you stay voting Democrat. If you vote a Republican, you stay voting Republican. That's not always true, but you can check the results by using lots of different elections and see if it's sensitive to that. Okay, and the way we sample step one is we use a Markov chain Monte Carlo algorithm, Metropolis Hastings algorithm that dates back to right after the Manhattan Project. All right? So it's the cornerstone of machine learning and Bayesian statistics in many ways. And the way it works is the following. So here's Iowa. This is actually Iowa. These are the precincts in Iowa divided into four districts. So each of the colors is a different district. We first identify the edges in this graph which are conflicted that go between two different colors. Then we pick one at random, that one, and then we choose a direction and we flip the color across it. There we go, we flipped it. Yeah, got it? And we keep doing that over and over again. Okay, if you do that, it doesn't preserve the measure. You have to do a step. You decide whether this move is accepted or rejected. That's the Metropolis Hastings algorithm. There's a Wikipedia page about it. You can read about it. It's not hard. It's just some elementary probability. Why it works is a little trickier, but it's nothing hard. I teach in my undergraduate probability class all the time. And in fact, if I have a little moment at the end, there's a web app that I'll run which will show you this in action. My partner, she's a fantastic D3 programmer and she whipped this up in a weekend when I was trying to do math. She does math too, but she's like, let me draw you, let me make a simulation for you, it's great. All right, so this is not working. There we go. Here's North Carolina, about 3,000 different precincts. 3,000, yeah, 3,000 different precincts. There they are on the map. And so we color them each based on this and we generate them. So here's one of the maps we generated. Here's another map we generated. Here's another map we generated, another one. So this is just the first couple of maps in our atlas, our ensemble of random maps we generate. All right, so, okay, so what do we do with that? So let's go back to the story. So remember, we had these three maps I gave you at the beginning and I claimed one of them, these, the top two were more like the bot, more like each other than the bottom one. So first of all, let's see what the distribution this gives. If we run it with the 2012 elections, this is the number of seats the Democrats won. First of all, notice, it's not one number, there's a distribution. It should worry you a little bit with only those criteria, I'm able to get four or nine Democrats elected. I mean, that hardly seems like the votes actually matter if I can go from four or nine using the same number of votes just by changing the map. Here's the 2016 election, a little bit more Republican, three to seven, okay? Yeah. Are these are compliant? Yes. Yeah, we actually threshold after the fact to make sure that none of these are too egregious, okay? So we'd really put a little indicator function against our probability measure, but. All right, so let's go back to those maps we cared about, there they are. And here they are on that map, on that thing. So the two that were at top are these boxes down at four and at three. You see, they give the same political outcome. And the judges map, so I didn't tell you what the judges was, it was this bottom one, it was called the Beyond Gerrymandering Project. So an elder statesman, he probably hates it when I say that, of North Carolina Tom Ross, former president of the University of North Carolina System, came to Duke after he stopped being president and of North Carolina, University of North Carolina System and he was interested in Gerrymandering. And so he got together a bunch of extremely respected jurists, most of them retired Supreme Court of North Carolina judges, many of them former chief justices, half Democrat, half Republican. He said, let's follow this rule, this bill that was proposed. And they sat in a room, I watched them, I went to the meetings, and they argued with each other and they came up with their map and they voted on their map and they accepted their map. It was a map that had people from both parties who decided it was a simulated bipartisan redistricting commission. Their map's not so bad. It does a pretty good job, okay? And that's kind of my normative, that's my piece of reality injected into my mathematics. Here's a whole bunch of different elections. Governor 12, U.S. House of Representatives 16 and they're ordered by how Republican, so the percentage on the left is the global vote fraction for Democrats. So the top ones are more Democratic, the bottom ones are more Republican. Notice, so this little blue histogram is what you get when you take my ensemble 24,000 maps. The green dots are the judges. Notice they kind of track the peak. They shift along with it. So if the public opinion changes, so does the outcome of the election. These other dots are the maps that the legislature made. Notice the outcome never changes almost.