NFL Picks – Week 3

You can view my predictions here.  Go Bears.

Season: SU: 20-12-1, Spread: 19-14, O/U: 15-18

Week 1: SU: 10-5-1, Spread: 9-7, O/U: 8-8

Week 2: SU: 9-7, Spread: 9-7, O/U: 6-10

Week 3: SU: 1-0, Spread: 1-0, O/U: 1-0

Prediction: Jaguars 23-14
Pick: Jaguars + 1.5
Over/Under: Under 38

Prediction: Bengals 22-19
Pick: Bengals +6
Over/Under: Under 44

Prediction: Falcons 27-20
Pick: Falcons +2
Over/Under: Over 47

Prediction: Cowboys 24-18
Pick: Dolphins +21
Over/Under: Under 47.5

Prediction: Packers 24-21
Pick: Broncos +8
Over/Under: Over 43

 

Prediction: Chiefs 26-24
Pick: Ravens +6.5
Over/Under: Under 53.5

 

Prediction: Vikings 28-16
Pick: Vikings -8
Over/Under: Over 43.5

 

Prediction: Patriots 29-17
Pick: Jets +23
Over/Under: Over 44

 

Prediction: Eagles 27-20
Pick: Eagles -6.5
Over/Under: Over 46.5

 

Prediction: Panthers 20-18
Pick: Cardinals +3
Over/Under: Over 46.5 

 

Prediction: Buccaneers 24-22
Pick: Giants +6.5
Over/Under: Under 47.5

 

Prediction: Chargers 24-21
Pick: Chargers -3
Over/Under: Under 47.5 

Prediction: Saints 27-23
Pick: Saints +4
Over/Under: Over 47.5 

Prediction: 49ers 24-23
Pick: Steelers +6.5
Over/Under: Over 44

Prediction: Rams 27-20
Pick: Rams -3
Over/Under: Under 49.5

Prediction: Bears 22-21
Pick: Washington Football Team +4
Over/Under: Over 41.5

NFL Picks – Week 2

You can view my predictions here.  Go Bears.

Season: SU: 19-12-1, Spread: 18-14, O/U: 14-18

Week 1: SU: 10-5-1, Spread: 9-7, O/U: 8-8

Week 2: SU: 9-7, Spread: 9-7, O/U: 6-10

Prediction: Panthers 23-18
Pick: Buccaneers +7
Over/Under: Under 49

Prediction: 49ers 21-19
Pick: 49ers +2
Over/Under: Under 45

Prediction: Chargers 30-23
Pick: Chargers -2.5
Over/Under: Over 47.5

Prediction: Vikings 30-21
Pick: Vikings +3
Over/Under: Over 44

Prediction: Jaguars 20-19
Pick: Jaguars +9
Over/Under: Under 43

Prediction: Patriots 28-20
Pick: Dolphins +19
Over/Under: Over 47.5

Prediction: Giants 19-16
Pick: Giants +2
Over/Under: Under 43.5

Prediction: Titans 24-21
Pick: Titans -3
Over/Under: Over 44.5 

Prediction: Steelers 29-25
Pick: Steelers -4
Over/Under: Over 46.5

Prediction: Ravens 27-10
Pick: Ravens -13
Over/Under: Under 47

Prediction: Cowboys 28-17
Pick: Cowboys -5.5
Over/Under: Under 46.5

Prediction: Chiefs 36-20
Pick: Chiefs -7
Over/Under: Over 53

Prediction: Bears 21-20
Pick: Broncos +2.5
Over/Under: Over 40.5

Prediction: Rams 38-34
Pick: Rams -2.5
Over/Under: Over 52.5

Prediction: Falcons 32-18
Pick: Falcons +1.5
Over/Under: Under 51.5

Prediction: Browns 27-21
Pick: Browns -3
Over/Under: Over 46

NFL Picks – Week 1

You can view my predictions here.  Go Bears.

Season: SU: 10-5-1, Spread: 9-7, O/U: 8-8

Week 1: SU: 10-5-1, Spread: 9-7, O/U: 8-8

Prediction: Bears 23-18
Pick: Bears -3
Over/Under: Under 46.5

Prediction: Rams 22-21
Pick: Panthers +2
Over/Under: Under 50

Prediction: Browns 21-16
Pick: Titans +6
Over/Under: Under 45

Prediction: Chiefs 26-19
Pick: Chiefs -3.5
Over/Under: Under 51.5

Prediction: Ravens 23-16
Pick: Ravens -7
Over/Under: Over 38.5

Prediction: Vikings 26-19
Pick: Vikings -3.5
Over/Under: Under 48

Prediction: Bills 19-18
Pick: Bills +3
Over/Under: Under 41

Prediction: Eagles 27-17
Pick: Eagles -9.5
Over/Under: Under 45

Prediction: Chargers 24-21
Pick: Colts +6.5
Over/Under: Over 44.5

Prediction: Seahawks 26-16
Pick: Seahawks -9
Over/Under: Under 44

Prediction: Lions 20-15 PUSH
Pick: Lions -2.5
Over/Under: Under 46.5

Prediction: Giants 20-18
Pick: Giants +7.5
Over/Under: Under 46.5

Prediction: Buccaneers 24-22
Pick: Buccaneers EVEN
Over/Under: Under 51

Prediction: Patriots 28-22
Pick: Patriots -5.5
Over/Under: Over 49.5

Prediction: Saints 27-23
Pick: Texans +6.5
Over/Under: Under 53

Prediction: Broncos 21-20
Pick: Raiders +3
Over/Under: Under 43

 

Cheers.

ggplot2 vs base R graphics: An example

It took me a while to make the switch over to ggplot2 because I learned how to do things in R mostly with base R.  But I’m glad I finally made the switch.  ggplot2 is so much better in so many ways, and here is an example of how much easier it is to code and how much better the output looks.  (Side note: When I make art in R, I exclusively use base R.)

So anyway, on Tuesday I talked to our incoming graduate students about R, and presented some basics of data input and data visualization.  I gave a simple example of base R vs ggplot2 using a histogram and then a scatter plot.  After the talk, a colleague of mine sent me the following code for an example plot that he had made, and wanted to know how to do it in ggplot2.  Take a look at all this code!

summary(CO2)
str(CO2)
head(CO2, 20)
CO2.QC <- subset(CO2, Type == "Quebec" & Treatment == "chilled")
CO2.QN <- subset(CO2, Type == "Quebec" & Treatment == "nonchilled")
CO2.MC <- subset(CO2, Type == "Mississippi" & Treatment == "chilled")
CO2.MN <- subset(CO2, Type == "Mississippi" & Treatment == "nonchilled")
xrange <- range(CO2$conc)
yrange<-range(CO2$uptake)
png("/Users/gregorymatthews/Dropbox/StatsInTheWild/baseRplot.png",res = 300, units = "in", h = 5, w = 10)
par(mfrow = c(1, 2))
plot(CO2.QC$uptake ~ CO2.QC$conc, pch = 19, lty = 2, lwd = 3, cex = 1.5, las = 1,
ylim = yrange, xlim = xrange, col = "purple", xlab = "Concentration",
ylab = "Uptake")
par(new=T)
plot(CO2.QN$uptake ~ CO2.QN$conc, pch = 20, lty = 2, lwd = 3, cex = 1.5, las = 1,
ylim = yrange, xlim = xrange, col = "lightblue", main = "Quebec", xlab = "",
ylab = "")
legend("bottomright", title = "Treatment", c("Chilled", "Nonchilled"),
pch = c(19, 20), col = c("purple", "lightblue"))
plot(CO2.MC$uptake ~ CO2.MC$conc, pch = 19, lty = 2, lwd = 3, cex = 1.5, las = 1,
ylim = yrange, xlim = xrange, col = "orange", xlab = "Concentration",
ylab = "Uptake")
par(new=T)
plot(CO2.MN$uptake ~ CO2.MN$conc, pch = 20, lty = 2, lwd = 3, cex = 1.5,
ylim = yrange, las = 1,
xlim = xrange, col = "red", main = "Mississippi", xlab = "", ylab = "")
legend("topleft", title = "Treatment", c("Chilled", "Nonchilled"), pch = c(19,20),
col = c("orange", "red"))
par(mfrow = c(1, 1), las = 1)
dev.off()

All that code produces the following plot:

baseRplot

These are fine looking graphs, but you have to manually choose the x and y limits, the legends look weird and they have to be manually added to each plot, and it would be nice to have some grid lines in the plots, which can be added, but that addition must be done manually.  (As a fun exercise, try to recreate the plot above using ggplot2. Don’t cheat!)

Now take a look at how easy this is to do in ggplot2!


library(ggplot2)
png("/Users/gregorymatthews/Dropbox/StatsInTheWild/ggplot2plot.png",res = 300, units = "in", h = 5, w = 10)
ggplot(aes(x = conc, y = uptake, color = Treatment), data = CO2) + geom_point() + facet_grid( ~ Type) + xlab("Concentration") + ylab("Uptake") + labs(color = "Trt") + scale_color_manual(values = c("purple","blue"))
dev.off()

The code is so much more concise, it’s easier to read, the x and y limits were chosen automatically, and the output looks so much nicer!

 

ggplot2plot

What I’m trying to say is that in almost every situation ggplot2 > base R.

Cheers.

JSM 2019 – My Schedule

I attending every single JSM for 8 straight years from 2010 – 2017 (Vancouver, Miami, San Diego, Montreal, Boston, Seattle, Chicago, Baltimore).  Unfortunately, I missed last year in Vancouver due to the birth of my second child, but I suppose it was worth it (Benji just turned 1!).  This year I return to JSM in Denver for what would have been my 10th in a row had I not missed last year, and I am very excited.

I’ll be in Denver from Sunday afternoon through Friday evening (as I am staying an extra day for the Rocky Mountain Symposium on Analytics in Sports hosted by the University of Denver).  I’ve been working out my schedule for the week, and here’s what I have so far.  If there is something you think I should go to that you think I’d like and it’s not listed here, please let me know.

And as always, don’t forget to check out the data art show!

Sunday

4 – 5:50pm: Session Number: 79, Location: CC-502,  “Functional Data Analysis: Methods and Applications— Contributed”

I’m giving a talk in this session related to the work I’ve been doing on my NSF grant about classification of partially observed shapes with applications to biological anthropology.  You can view my slides here:  http://rpubs.com/statsinthewild/JSM2019_slides

6:05 – 7pm: 2019 JSM Public Lecture—Invited ASA 6:05 p.m. Data Tripper: Distinguishing Authorship of Beatles Songs through Data Science – Mark Glickman

I believe this is the first time they are ever doing a public lecture like this.  Anyone can attend even if you haven’t signed up for the conference.  This is a great way to reach out to the public and people who don’t want to pay to attend JSM to see a really interesting talk on data science.  And getting Mark Glickman to do the first one is a great selection.  He’s a super interesting speaker and this topic is super interesting.

Monday

8:30 – 10:20am: Session Number: 98, Location: CC-607, “The Multiple Adaptations of Multiple Imputation— Invited”

This session has Jerry Reiter, Trivellore Raghunathan, and Donald Rubin (Rubin is my adviser’s adviser’s adviser……).  I spent 4 years of my life reading approximately a billion papers by these three.  If you are at all interested in synthetic data and/or multiple imputation, you should definitely check this out.  I know it’s at 8:30 in the morning.  But if I can make it, you can make it too.  And besides.  It’s Mountain Time.  So it’s like 10:30 if you live on the east coast or 9:30 if you live in flyover country like me.

9 – 11am: Location: Room H- Mineral Hall A at the Hyatt Regency Denver, Data Fest Meeting

So I know that I just said how awesome that 8:30am session is going to be, but I’ll be missing it because the Data Fest meeting is from 9am-11am.  This is where I’ll be during that time.  (Side note: Loyola just had it’s fourth annual DataFest this past Spring.  I can’t believe I’ve done it 4 times!)

1pm-2pm: Research meeting with some colleagues.  Talking about incomplete shapes!

4 – 6pm: Session Number: 261, Location: CC-Four Seasons 2-4, ASA President’s Invited Address—Invited JSM Partner Societies, “Coming to Our Census: How Social Statistics Underpin Our Democracy (And Republic),” Teresa A. Sullivan, University of Virginia

Teresa Sullivan

5 – 6pm: Section of Statistics in Sports mixer, Location: Rock Bottom

I go to this every year.  Stat nerds, Sports, Beer.  It’s where I belong.

Tuesday

8:35 – 10:20am: Session Number: 292, Location: CC-709. “Providing Access to Useful Data While Preserving Confidentiality—Topic Contributed Survey Research Methods Section, Government”

My adviser, Ofer Harel, will be presenting some work that we did together a few years ago bout privacy and ROC curves.

10:35 – 11:50am: Session Number: 344, Location: CC-506. “Expanding Data Utility – Issues in Disclosure and Modeling—Contributed”

I’m particularly interested in the talk at 11:05am “Using Generative Adversarial Networks to Generate Synthetic Population”.  The first time I ever read about GANs my immediate thought was: Synthetic Data!  I’m interested to see what they are doing here.

10:35 – 11:50am: Session Number: 323, Location: CC-708. “Causal Inference in Sports Statistics—Invited”

I’m going to try to get to this one for the last two talks starting at 11:25.

Evening: Rockies vs Dodgers

#gocubsgo

Wednesday – Friday Schedule Coming soon.

NFL Win probability art

So I was screwing around with the nflscrapr package by Ron Yurko and Maksim Horowitz, probably doing something useless and unproductive.  In their tutorial on the github, I came across this image:

Screen Shot 2019-06-21 at 9.56.37 AM.png

And for some reason, I thought that would look really cool rotated 90 degrees.  So after a few hours of playing around with win probabilities (and smoothing), I came up with these.  These are the win probabilities for every NFL team for the 2018 season.  I think these look awesome, and I’ll probably bring a few of these with me to the JSM Data Art show.

I particularly like New Orleans, Jacksonville, and New England:

win_prob_art_NO_2018win_prob_art_JAX_2018

(Wouldn’t this look nice in your office?)

Screen Shot 2019-06-21 at 9.59.56 AM.png

If you are interested in ordering one of these, DM me at @statsinthewild.

Update:
No need to DM me, you can order them now here:

Cheers.

 

Some random NCAA Tournament thoughts

I want to start with this plot:

Screen Shot 2019-03-20 at 8.09.31 PM.png

This plot shows all the 1 and 2 seeds and their odds of making it to each round relative to Duke.  I think the most interesting parts of this plot are where they cross.  So for instance, Gonzaga is more likely to make the Final 4 than Virginia, but Virginia is more likely to make the Finals than Gonzaga.  That’s because Gonzaga will likely have to play Duke to get to the Finals.  Whereas Virginia will likely only (ONLY) have to play North Carolina/Kentucky to get to the Finals.

Another example is that Tennessee is more likely to make the Sweet Sixteen than Michigan State, but Michigan State is more likely to make the Elite 8 than Tennessee.  It then switches back again and Tennessee is more likely to make it to the Final 4, Finals, and win it all than Michigan State.  So what is going on here?  It’s Duke again.  In order for Michigan State to get to the Final Four, they’ll probably have to beat Duke.

Zion Williamson is really good.  Thus, Duke is really good.

Now here is some more fun stuff:

Most likely double digit seeds to win first round game

(10) Seton Hall over Wofford – 41.25%

(10) Florida over Nevada – 40.23%

(10) Minnesota over Louisville – 32.5%

(11) Arizona State over Buffalo – 32.5% (given they win the play in game)

(11) St. Mary’s over Villanova – 28.35%

(11) Ohio State over Iowa State – 27.84%

(11) Belmont over Maryland – 25.52%

(12) Oregon over Wisconsin – 24.95%

(12) Murray State over Marquette – 24.1%

(12) Liberty over Mississippi State – 21.52%

(14) Georgia State over Houston – 17.6%

(14) Yale over LSU – 17.35%

(13) Northeastern over Kansas – 13.95%

(13) UC Irvine over Kansas State – 13.6%

(13) St. Louis over Virginia Tech – 13.6%

(13) Vermont over Florida State – 12.8%

Biggest toss-up first round games

(10) Iowa over (7) Cincy – 50.38%

(8) Mississippi over (9) Oklahoma – 50.65%

(9) UCF over (8) VCU – 50.69%

(8) Syracuse over (9) Baylor (51.97%)

Most like to make it to the Sweet 16

(1) Duke – 90.67%

(1) Gonzaga – 83.71%

(1) Virginia – 83.6%

(1) North Carolina – 83.34%

(2) Kentucky – 79.82%

(2) Tennessee – 76.61%

(2) Michigan State – 74.27%

(3) Texas Tech – 69.74%

(3) Purdue – 66.27%

(2) Michigan – 64.83% (They are going to have to beat either Nevada or Florida.  Both are tough opponents in for a 2 seed in the second round.)

Most likely double digit seed to make Sweet Sixteen

(10) Florida – 11.53%

(10) Iowa 11.27%

(11) Ohio St – 11.22%

(12) Oregon – 8.15%

(11) Belmont – 7.32%

(10) Seton Hall – 7.02%

Most likely 5 seed or higher to make Final Four

(5) Auburn  – 8.87%

(6) Iowa State – 7.41%

(5) Wisconsin – 4.96%

(7) Nevada – 3.62%

(5) Mississippi State – 3.55%

Most likely double digit seed to make Final Four

(10) Florida – 1.04%

(10) Iowa 1.00%

(11) Ohio St – 0.71%

(10) Seton Hall – 0.033%

Most likely to win the tournament

(1) Duke – 21.07%

(1) Virginia – 15.94%

(1) Gonzaga – 15.78%

(2) Kentucky – 8.16%

(1) North Carolina – 7.96%

(2) Tennessee – 6.74%

(2) Michigan St – 5.4%

(2) Michigan – 3.87%

(3) Purdue – 3.28%

(3) Texas Tech – 2.88%

(5) Auburn – 1.09%

(6) Iowa State – 0.91%

(4) Kansas – 0.86%

 

Cheers.

NCAA Tournament Preview

Well, just like last year, I’m predicting that Loyola Chicago won’t make the Final Four.  But I’ll probably be wrong again somehow…….. Anyway, here are some thoughts about the NCAA tournament from a guy who hasn’t paid attention all year until last week.

Here is how I CURRENTLY rank the tournament teams.  This is based on heavily weighting recent performances of teams.  I’ll have more later, but for now I hope Harrel enjoys these.  Now I have to do “real work”……..

Rankings

Team (Seed)

  1. Gonzaga (1)
  2. Duke (1)
  3. Virginia (1)
  4. Kentucky (2)
  5. North Carolina (1)
  6. Tennessee (2)
  7. Michigan State (2)
  8. Michigan (2)
  9. Purdue (3)
  10. Texas Tech (3)
  11. Nevada (7)
  12. Kansas (4)
  13. Auburn (5)
  14. Iowa St (6)
  15.  Florida St (4)
  16. Wisconsin (5)
  17. Virginia Tech (4)
  18. Houston (3)
  19. Villanova (6)
  20. LSU (3)
  21. Kansas St (4)
  22. Maryland (6)
  23. Mississippi St (5)
  24. Louisville (7)
  25. Buffalo (6)
  26. Marquette (5)
  27. Cincinnati (7)
  28. Syracuse (8)
  29. Iowa (10)
  30. Florida (10)
  31. Utah St (8)
  32. Baylor (9)
  33. Mississippi (8)
  34. Oklahoma (9)
  35. Ohio State (11)
  36. Washington (9)
  37. Oregon (12)
  38. Wofford (7)
  39. UCF (9)
  40. Minnesota (10)
  41. St. John’s (11)
  42. VCU (8)
  43. St. Mary’s (CA) (11)
  44. Arizona St (11)
  45. Seton Hall (10)
  46. Belmont (11)
  47. Temple (11)
  48. New Mexico St (12)
  49. Murray St (12)
  50. Yale (14)
  51. Northeastern (13)
  52. Liberty (12)
  53. Vermont (13)
  54. St. Louis (13)
  55. UC Irvine (13)
  56. Montana (15)
  57. Old Dominion (14)
  58. N Kentucky (14)
  59. Georgia St (14)
  60. Colgate (15)
  61. Bradley (15)
  62. Iona (16)
  63. N Dakota St (16)
  64. Gardner-Webb (16)
  65. Fairleigh Dickinson (16)
  66. Prairie View A&M (16)
  67. NC Central (16)
  68. Abilene Christian (15)

Picks

Round of 32

East

  • Duke
  • UCF
  • Miss St
  • Virginia Tech
  • Maryland
  • LSU
  • Louisville
  • Michigan St

West

  • Gonzaga
  • Syracuse
  • Marquette
  • Florida St
  • Buffalo
  • Texas Tech
  • Nevada
  • Michigan

South

  • Virginia
  • Ole Miss
  • Wisconsin
  • Kansas State
  • Villanova
  • Purdue
  • Cincinnati
  • Tennessee

Midwest

  • UNC
  • Utah St
  • Auburn
  • Kansas
  • Iowa St
  • Houston
  • Wofford
  • Kentucky

Sweet 16

  • Duke
  • Virginia Tech
  • LSU
  • Michigan St
  • Gonzaga
  • Florida St
  • Texas Tech
  • Michigan
  • Virginia
  • Wisconsin
  • Purdue
  • Tennessee
  • UNC
  • Kansas
  • Iowa St
  • Kentucky

Elite 8

  • Duke
  • Michigan St
  • Gonzaga
  • Michigan
  • Virginia
  • Tennessee
  • UNC
  • Kentucky

Final Four

  • Duke
  • Gonzaga
  • Virginia
  • Kentucky

Finals

  • Gonzaga
  • Virginia

Champion

  • Gonzaga

 

 

 

 

Official StatsInTheWild Super Bowl Predictions

Pick: Patriots 27-26

Spread: Rams +2.5

Total: Under 56.5

 

2019 Super Bowl Squares

Unrelated to this post: What time does the Super Bowl start?  5:30pm Central.

Moving on, below is a 2d histogram of frequencies of the last digits of the final score of ever NFL game from 1920 through last year’s Super Bowl.

superbowlsquares2019

If I only use games from 2000 through the 2018 Super Bowl the 2d histogram looks like this.

SuperBowlSquares2019_Recent.png

Loading cart ⌛️ ...