Saturday, March 25, 2017

Predicting Win Percentages

Continuing on from last weeks post regarding the website fivethirtyeight.com and how they come up with their information. Last week was about how they look at various political polls and how they rank them. I found that quite interesting.

Even more interesting to me is how they come up with in-game percentages as to who is going to win. We all do that to some degree. Five minutes to go and your team has a ten point lead. You are probably going to win. So it is over 50%. But is it 60%? 85%? They know. At least I would say that their guess is as good as it gets.

I want to give Jay Boice and Nate Silver credit because I'm just relaying what they say is how their group comes up with those percentage win chances. I will try to do their explanation justice. So with a bit of paraphrasing, here we go,

  • You you are ahead by 10 a with five minutes to go. The question becomes - How often have teams in that same situation done that in the past?
  • They use regression analysis based on various game situations in the past. "The past" being the scores from all of the NCAA games over the past five years. 
  • It makes a difference if that team that is ahead is really the better team, so they also factor in the pre-game win probabilities. That team currently in the lead may be more lucky than good.
  • Finally, what is the current situation? It's five minutes to go. But who has the ball. Is one of the teams getting ready to shoot free throws?
  • They don't account for everything, e.g., a player has fouled out and won't be available the rest of the game. That certainly could have an impact. 
  • There probably are a number of factors that are just too much to deal with, so they don't.
Their results are pretty impressive. I haven't checked them out in real time. Its always after a game has been played. I'll have to remember to do that. Looking at them after the fact, though, their results seem pretty impressive. You can see some of their March Madness work here: 2017 March Madness Predictions

Monday, March 20, 2017

Rating the Polls

I was going to call this week's post "March Mathness" and talk a little about the NCAA tournament. Let's do that next week. Let me go ahead, though, and apologize for the title now. I'm sure I'm not the only one to use this type of play on "March Madness". That still doesn't make it right.

There is a nice website by the name of fivethirtyeight.com. It presents information regarding polls and polling data (The 538 part comes from the fact that there are 538 electors in the electoral college.) One interesting part of the website is looking at various polls (there are a lot more than I would have imagined - they rate over three hundred polling firms).

The reason I got there is because I was trying to figure out how their site, can come up with in-game information like Arizona is ahead of St. Johns 55 to 46 with 3:38 left to play, thus Arizona has an 89% chance of winning. Wow. It's clear Arizona would probably win, but how do they come up with a percent like that? Anyway, we'll look at that next week.

I got side-tracked with a section that speaks to how they rate various polls. For example the Trump/Clinton election did not come out as most had predicted. Some polls are better than others. They rate them all. For example, one of the best seems to be the ABC News/Washington Post poll. On the other had, an organization called Research 2000 is not. An overview of their methodology is at:

https://fivethirtyeight.com/features/how-fivethirtyeight-calculates-pollster-ratings/

They don't really give enough information to show exactly how they do it. That would probably be beyond me anyway. Let me tell you something they have used in the past. It is an especially cool math application since it has a square root stuck in there.

Total Error = Square Root of (Sampling Error + Temporal Error + Pollster Induced Error)

Why don't polls come out exactly right:

  1. Sampling Error:  Sampling not enough people or not getting a representative sample
  2. Temporal Error:  The farther away it time a poll is from the event; the more error
  3. Pollster Induced Error:  Seems to be kind of a catch-all category for other things that can go wrong, such as assuming a too high or too low voter turnout.
Something else interesting they talk about is the concept of "herding". The companies that do the polling want to look good. It does not look good if they've wandered too fall away from the rest of the herd. If most every other poll has candidate A having around 55% of the vote and you predict he'll have 73%, you might make an "adjustment" to your results. Or you simply chose to not publish those results in which your company seems to be way off. 

That and other factors make it pretty complicated. Polling itself is complicated and then ranking the pollster even more so. 

I hope I've done justice to what they do. If you read what they have to see on their website you can see the complexity involved.

Next week, March Madness. Don't worry it will still be going on. In fact, it is actually March and slopping over into a little bit if April Madness. 





Tuesday, March 14, 2017

Top Ten Applications of Pi

It is pi day!!! It snuck up on me. I was going to make a top ten of cool facts about pi - by stealing them from the internet, of course. But most of those are not math applications, just cool trivia with virtually no applications, e.g., in a Star Trek episode, Spoke once defeated a computer by commanding it to compute the last digit of pi.

Brainstorm. Combine the two into the top ten applications of pi. And also doing so by stealing them from the internet. All wrapped up in one tidy package. By the way, I understand some of these applications fully and some not very well at all. I will try to give a short internet-stolen explanation for these.

  1. Circumference of a circle.
  2. Area of a circle.
  3. Volume of a sphere.
  4. Surface area of a sphere.
  5. Cosmological constant - Value of the energy density of the vacuum of space. Originally introduced by Albert Einstein in 1917.
  6. Heisenberg's uncertainty principle - Precision with which certain pairs of physical properties of a particle (such as momentum and position) can be known. Joke break: Heisenberg is driving down the road and is pulled over by a police officer. Police: "Do you have any idea how fast you were going?" Heisenberg: "No, but I know exactly where I am."
  7. Einstein's field equations of general relativity - Describes the fundamental interaction of gravitation as a result of space time being curved by mass and  energy.
  8. Coulomb's Law - Force between two charged particles.
  9. Period of a pendulum.
  10. Buckling formula - Finds the stress an object can handle before "buckling" would occur.

Monday, March 6, 2017

Hidden Figures

This is kind of a review of the movie/book Hidden Figures. Before seeing either one, I was a little concerned that it was going to be preachy. We need to treat African American people / women with respect. Hollywood, you don't need to tell us that. The people that already know that don't need to be told. And the people that don't know that probably aren't going to pay money to see this movie anyway. But it wasn't like that - the movie or the book. It just told their story.

If you want the true story, books are usually a better bet than the movie. The movie seemed quite in line with the book, but there were a few things. The two hour movie obviously had to leave a lot of stuff out that was in the book. There was also a time one of the ladies was at a chalkboard. She was impressing the room with the math she was doing. Some of it was a little unrealistic. Most people can't rattle off sin(23) to ten-thousandths place from memory - stuff like that. But, I'm quibbling. The movie was really good.

I got the book. And to be honest, I did some skimming in parts. I may get around to reading every word at some point, but that will be a ways off. There were a couple of cool things dealing with math applications that I thought was interesting. First of all, the book is Hidden Figures and is written by Margo Lee Shetterly. There. I hope that covers me from violating any copy write issues. Regardless, here we go.

Where do systems of equations take place in real life? Well check this out: "Modeling flight at transonic speeds was a particularly knotty problem, because of the subsonic and supersonic winds that passed over the plane or model simultaneously. Aerodynamic equations describing transonic airflows might contain as many as thirty-five variables. Because each point in the airflow was dependent on the others, an error made in one part of the series would cause an error in all the others. Calculating the pressure distribution over a particular airfoil at a transonic speed could easily take a month to complete for the most experienced of mathematicians." (pages 137, 138)

I once had the father of a student tell me about an older child of his that was in the NASA astronaut program. He said that their astronauts had to have a very good mathematics background in case something happened to the on-board computers. Another part of this book spoke to that issue:  "An astronaut stranded hundreds of thousands of miles from Earth is like a mariner from a previous age, adrift in the most remote part of the ocean. So what do you do when the computers go out? This was precisely the question Katherine [Johnson] and her colleague Al Hamer had asked in the late 1960s, during the most intense preparations for the first Moon landing. And in 1967, Johnson and Hamer coauthored the first of a series of of reports describing a method for using visible stars to navigate a course without a guidance computer and ensure the space vehicle's safe return to earth. This was the method that was available to the stranded astronauts aboard Apollo 13." (page 248)


Speaking of outer space, I give both the book and the movie, four stars.