SlideShare une entreprise Scribd logo
1  sur  50
Télécharger pour lire hors ligne
ITERATING OVER STATISTICAL MODELS
NCAA TOURNAMENT EDITION
Daniel Lee
WHY ARE YOU LISTENING TO ME?
▸ Stan developer

http://mc-stan.org

▸ Researcher at Columbia

▸ Co-founder of Stan Group

training / statistical support /
consulting






▸ email: bearlee@alum.mit.edu

twitter: @djsyclik / @mcmc_stan

web: http://syclik.com
MARCH MADNESS
WHAT IS MARCH MADNESS?
WHAT IS MARCH MADNESS?
CHAMPIONSHIP GAME: 

VILLANOVA VS NORTH CAROLINA
P(VILLANOVA WIN)?
CHAMPIONSHIP GAME: 

VILLANOVA VS NORTH CAROLINA
P(VILLANOVA WIN)?
VILLANOVA WILDCATS VS. NORTH CAROLINA TAR HEELS
▸ 1:00. 70 - 69
▸ 0:35. 72 - 69
▸ 0:23. 72 - 71
P(VILLANOVA WIN)?
VILLANOVA WILDCATS VS. NORTH CAROLINA TAR HEELS
▸ 1:00. 70 - 69
▸ 0:35. 72 - 69
▸ 0:23. 72 - 71
▸ 0:13. 74 - 71
P(VILLANOVA WIN)?
VILLANOVA WILDCATS VS. NORTH CAROLINA TAR HEELS
▸ 1:00. 70 - 69
▸ 0:35. 72 - 69
▸ 0:23. 72 - 71
▸ 0:13. 74 - 71
▸ 0:06. 74 - 74
P(VILLANOVA WIN)?
VILLANOVA WILDCATS VS. NORTH CAROLINA TAR HEELS
▸ 1:00. 70 - 69
▸ 0:35. 72 - 69
▸ 0:23. 72 - 71
▸ 0:13. 74 - 71
▸ 0:06. 74 - 74
▸ 0:00. 77 - 74. Villanova wins.
STATISTICAL MODELS
TREAT
AS CODE
WRITING CODE IS A DISCIPLINE
WRITING CODE IS A DISCIPLINE
▸ design patterns
▸ testing
▸ code review
▸ maintenance
▸ modularity
▸ collaboration
CAN BE
IS STATISTICAL MODELING A DISCIPLINE?
▸ Art or science?

▸ Models have names

▸ Statistical model vs implementation

▸ Collaboration on the statistical model?
TREAT STATISTICAL MODELS AS CODE
WHAT DO WE NEED TO DO
▸ Elevate statistical models: first class entity

▸ Modularize

▸ Language

▸ Discuss subtle details

▸ Collaborate
TREAT STATISTICAL MODELS AS CODE
STAN GETS US CLOSE
▸ statistical modeling language
▸ domain-specific language

has its own grammar; not R or BUGS!
▸ rstan

shinystan, RStudio integration, rstanarm
▸ open-source

core libraries are new BSD
▸ Stan program
▸ plain text
▸ plays nicely with source
repositories
▸ imperative language
Note: Stan isn’t the only thing you can do this with
MODELING
BASKETBALL
MARCH MADNESS
BASKETBALL HISTORY
▸ 1891
▸ Dr. James Naismith. Springfield, MA
▸ Non-contact conditioning
▸ 13 simple rules
▸ Peach basket





MARCH MADNESS
BASKETBALL HISTORY
▸ 1891
▸ Dr. James Naismith. Springfield, MA
▸ Non-contact conditioning
▸ 13 simple rules
▸ Peach basket

10. The umpire shall be judge of the men and shall note the fouls and notify the
referee when three consecutive fouls have been made. He shall have power to
disqualify men according to Rule 5.
MARCH MADNESS
BASKETBALL NOW
▸ 2 x 20 min half
▸ Increasing score
▸ Points increment by 2, 3, and 1
▸ 5 players, unlimited substitutions
▸ player DQ: 5th foul
▸ Bonus: 7 team fouls

Double bonus: 10 team fouls
MARCH MADNESS
DATA
▸ 351 NCAA Division 1 Men’s basketball teams
▸ 33 conferences
▸ 5421 games
▸ 24 - 35 games per team
▸ Max 3 observations
IS THIS BIG DATA?
TALL DATA VS WIDE DATA
▸ Tall data

lots of replications



▸ Wide data

lots of fields



day, home, score, ot, fgm, fga, 3pm, 3pa, 3a, fta, ftm, or, dr, ast, to, stl, blk, pf
THREE STEPS OF
BAYESIAN DATA ANALYSIS
ANDREW GELMAN IN BDA
THE THREE STEPS OF BAYESIAN DATA ANALYSIS
1. Set up full probability model



2. Condition on observed data



3. Evaluate the fit of the model

ANDREW GELMAN IN BDA
THE THREE STEPS OF BAYESIAN DATA ANALYSIS
1. Set up full probability model

Write a Stan program

2. Condition on observed data



3. Evaluate the fit of the model

ANDREW GELMAN IN BDA
THE THREE STEPS OF BAYESIAN DATA ANALYSIS
1. Set up full probability model

Write a Stan program

2. Condition on observed data

Run RStan

3. Evaluate the fit of the model

ANDREW GELMAN IN BDA
THE THREE STEPS OF BAYESIAN DATA ANALYSIS
1. Set up full probability model

Write a Stan program

2. Condition on observed data

Run RStan

3. Evaluate the fit of the model

R, ShinyStan, posterior predictive checks

ITERATING OVER
MODELS
ITERATING OVER STATISTICAL MODELS
STATISTICAL MODEL #1
▸ Only 2015-2016 matters
▸ Teams have a latent ability
▸ “logistic regression”
▸ “Bradley-Terry model”
y ⇠ bernoulli(logit 1
(✓1 ✓2))
P(VILLANOVA > UNC | DATA) = 0.73
ITERATING OVER STATISTICAL MODELS
TREAT STATISTICAL MODELS AS CODE
▸ Statistical model in a separate file
▸ Git
▸ Testing
▸ Inspection of fit
▸ Backtest on historical data
▸ Priors
▸ “Model #1”
IN WRITING, YOU MUST KILL ALL YOUR
DARLINGS.
Willliam Faulkner
ITERATING OVER STATISTICAL MODELS
STATISTICAL MODEL #2
▸ Home court advantage!

▸ Teams have a latent ability
▸ “logistic regression”
▸ “Bradley-Terry model”
y ⇠ bernoulli(logit 1
(↵ + ✓1 ✓2))
P(VILLANOVA > UNC | DATA) = 0.52
ITERATING OVER STATISTICAL MODELS
STATISTICAL MODEL #3
▸ Assumptions:
▸ Only 2015-2016 matters
▸ Teams have a latent ability
▸ Model points
▸ Add a home court advantage
ITERATING OVER STATISTICAL MODELS
HOW DID WE DO?
▸ Kaggle: 87 / 608
▸ What went wrong?
▸ What’s next?
STATISTICAL MODELS
TREAT
AS CODE
THANKS
▸ Collaborative effort
▸ NCAA modeling:

Rob Trangucci
▸ Stan team

Andrew Gelman, Bob Carpenter, Matt
Hoffman, Ben Goodrich, Michael Betancourt,
Marcus Brubaker, Jiqiang Guo, Peter Li, Allen
Riddell, Marco Ignacio, Jeff Arnold, Mitzi
Morris, Rob Goedman, Brian Lau, Jonah
Gabry, Alp Kucukelbir, Robert Grant, Dustin
Tran, Krzysztof Sakrejda, Aki Vehtari, Rayleigh
Lei, Sebastian Weber
HELP
▸ http://mc-stan.org
▸ stan-users mailing list

▸ Stan Group Inc.

http://stan.fit

training / statistical support / consulting



▸ bearlee@alum.mit.edu / @djsyclik / @mcmc_stan

Contenu connexe

En vedette

Analyzing NYC Transit Data
Analyzing NYC Transit DataAnalyzing NYC Transit Data
Analyzing NYC Transit DataWork-Bench
 
The Political Impact of Social Penumbras
The Political Impact of Social PenumbrasThe Political Impact of Social Penumbras
The Political Impact of Social PenumbrasWork-Bench
 
Reflection on the Data Science Profession in NYC
Reflection on the Data Science Profession in NYCReflection on the Data Science Profession in NYC
Reflection on the Data Science Profession in NYCWork-Bench
 
A Statistician Walks into a Tech Company: R at a Rapidly Scaling Healthcare S...
A Statistician Walks into a Tech Company: R at a Rapidly Scaling Healthcare S...A Statistician Walks into a Tech Company: R at a Rapidly Scaling Healthcare S...
A Statistician Walks into a Tech Company: R at a Rapidly Scaling Healthcare S...Work-Bench
 
Dr. Datascience or: How I Learned to Stop Munging and Love Tests
Dr. Datascience or: How I Learned to Stop Munging and Love TestsDr. Datascience or: How I Learned to Stop Munging and Love Tests
Dr. Datascience or: How I Learned to Stop Munging and Love TestsWork-Bench
 
Julia + R for Data Science
Julia + R for Data ScienceJulia + R for Data Science
Julia + R for Data ScienceWork-Bench
 
R for Everything
R for EverythingR for Everything
R for EverythingWork-Bench
 
Using R at NYT Graphics
Using R at NYT GraphicsUsing R at NYT Graphics
Using R at NYT GraphicsWork-Bench
 
Thinking Small About Big Data
Thinking Small About Big DataThinking Small About Big Data
Thinking Small About Big DataWork-Bench
 
Improving Data Interoperability for Python and R
Improving Data Interoperability for Python and RImproving Data Interoperability for Python and R
Improving Data Interoperability for Python and RWork-Bench
 
Building Scalable Prediction Services in R
Building Scalable Prediction Services in RBuilding Scalable Prediction Services in R
Building Scalable Prediction Services in RWork-Bench
 
What We Learned Building an R-Python Hybrid Predictive Analytics Pipeline
What We Learned Building an R-Python Hybrid Predictive Analytics PipelineWhat We Learned Building an R-Python Hybrid Predictive Analytics Pipeline
What We Learned Building an R-Python Hybrid Predictive Analytics PipelineWork-Bench
 
High-Performance Python
High-Performance PythonHigh-Performance Python
High-Performance PythonWork-Bench
 
Inside the R Consortium
Inside the R ConsortiumInside the R Consortium
Inside the R ConsortiumWork-Bench
 
Scaling Analysis Responsibly
Scaling Analysis ResponsiblyScaling Analysis Responsibly
Scaling Analysis ResponsiblyWork-Bench
 

En vedette (15)

Analyzing NYC Transit Data
Analyzing NYC Transit DataAnalyzing NYC Transit Data
Analyzing NYC Transit Data
 
The Political Impact of Social Penumbras
The Political Impact of Social PenumbrasThe Political Impact of Social Penumbras
The Political Impact of Social Penumbras
 
Reflection on the Data Science Profession in NYC
Reflection on the Data Science Profession in NYCReflection on the Data Science Profession in NYC
Reflection on the Data Science Profession in NYC
 
A Statistician Walks into a Tech Company: R at a Rapidly Scaling Healthcare S...
A Statistician Walks into a Tech Company: R at a Rapidly Scaling Healthcare S...A Statistician Walks into a Tech Company: R at a Rapidly Scaling Healthcare S...
A Statistician Walks into a Tech Company: R at a Rapidly Scaling Healthcare S...
 
Dr. Datascience or: How I Learned to Stop Munging and Love Tests
Dr. Datascience or: How I Learned to Stop Munging and Love TestsDr. Datascience or: How I Learned to Stop Munging and Love Tests
Dr. Datascience or: How I Learned to Stop Munging and Love Tests
 
Julia + R for Data Science
Julia + R for Data ScienceJulia + R for Data Science
Julia + R for Data Science
 
R for Everything
R for EverythingR for Everything
R for Everything
 
Using R at NYT Graphics
Using R at NYT GraphicsUsing R at NYT Graphics
Using R at NYT Graphics
 
Thinking Small About Big Data
Thinking Small About Big DataThinking Small About Big Data
Thinking Small About Big Data
 
Improving Data Interoperability for Python and R
Improving Data Interoperability for Python and RImproving Data Interoperability for Python and R
Improving Data Interoperability for Python and R
 
Building Scalable Prediction Services in R
Building Scalable Prediction Services in RBuilding Scalable Prediction Services in R
Building Scalable Prediction Services in R
 
What We Learned Building an R-Python Hybrid Predictive Analytics Pipeline
What We Learned Building an R-Python Hybrid Predictive Analytics PipelineWhat We Learned Building an R-Python Hybrid Predictive Analytics Pipeline
What We Learned Building an R-Python Hybrid Predictive Analytics Pipeline
 
High-Performance Python
High-Performance PythonHigh-Performance Python
High-Performance Python
 
Inside the R Consortium
Inside the R ConsortiumInside the R Consortium
Inside the R Consortium
 
Scaling Analysis Responsibly
Scaling Analysis ResponsiblyScaling Analysis Responsibly
Scaling Analysis Responsibly
 

Plus de Work-Bench

2017 Enterprise Almanac
2017 Enterprise Almanac2017 Enterprise Almanac
2017 Enterprise AlmanacWork-Bench
 
AI to Enable Next Generation of People Managers
AI to Enable Next Generation of People ManagersAI to Enable Next Generation of People Managers
AI to Enable Next Generation of People ManagersWork-Bench
 
Startup Recruiting Workbook: Sourcing and Interview Process
Startup Recruiting Workbook: Sourcing and Interview ProcessStartup Recruiting Workbook: Sourcing and Interview Process
Startup Recruiting Workbook: Sourcing and Interview ProcessWork-Bench
 
Cloud Native Infrastructure Management Solutions Compared
Cloud Native Infrastructure Management Solutions ComparedCloud Native Infrastructure Management Solutions Compared
Cloud Native Infrastructure Management Solutions ComparedWork-Bench
 
Building a Demand Generation Machine at MongoDB
Building a Demand Generation Machine at MongoDBBuilding a Demand Generation Machine at MongoDB
Building a Demand Generation Machine at MongoDBWork-Bench
 
How to Market Your Startup to the Enterprise
How to Market Your Startup to the EnterpriseHow to Market Your Startup to the Enterprise
How to Market Your Startup to the EnterpriseWork-Bench
 
Marketing & Design for the Enterprise
Marketing & Design for the EnterpriseMarketing & Design for the Enterprise
Marketing & Design for the EnterpriseWork-Bench
 
Playing the Marketing Long Game
Playing the Marketing Long GamePlaying the Marketing Long Game
Playing the Marketing Long GameWork-Bench
 

Plus de Work-Bench (8)

2017 Enterprise Almanac
2017 Enterprise Almanac2017 Enterprise Almanac
2017 Enterprise Almanac
 
AI to Enable Next Generation of People Managers
AI to Enable Next Generation of People ManagersAI to Enable Next Generation of People Managers
AI to Enable Next Generation of People Managers
 
Startup Recruiting Workbook: Sourcing and Interview Process
Startup Recruiting Workbook: Sourcing and Interview ProcessStartup Recruiting Workbook: Sourcing and Interview Process
Startup Recruiting Workbook: Sourcing and Interview Process
 
Cloud Native Infrastructure Management Solutions Compared
Cloud Native Infrastructure Management Solutions ComparedCloud Native Infrastructure Management Solutions Compared
Cloud Native Infrastructure Management Solutions Compared
 
Building a Demand Generation Machine at MongoDB
Building a Demand Generation Machine at MongoDBBuilding a Demand Generation Machine at MongoDB
Building a Demand Generation Machine at MongoDB
 
How to Market Your Startup to the Enterprise
How to Market Your Startup to the EnterpriseHow to Market Your Startup to the Enterprise
How to Market Your Startup to the Enterprise
 
Marketing & Design for the Enterprise
Marketing & Design for the EnterpriseMarketing & Design for the Enterprise
Marketing & Design for the Enterprise
 
Playing the Marketing Long Game
Playing the Marketing Long GamePlaying the Marketing Long Game
Playing the Marketing Long Game
 

Dernier

Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...only4webmaster01
 
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...amitlee9823
 
Detecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning ApproachDetecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning ApproachBoston Institute of Analytics
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...amitlee9823
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Pooja Nehwal
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramMoniSankarHazra
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxolyaivanovalion
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...SUHANI PANDEY
 
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...amitlee9823
 
hybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptxhybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptx9to5mart
 

Dernier (20)

Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
 
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
 
Detecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning ApproachDetecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning Approach
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics Program
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
 
Anomaly detection and data imputation within time series
Anomaly detection and data imputation within time seriesAnomaly detection and data imputation within time series
Anomaly detection and data imputation within time series
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
 
hybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptxhybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptx
 

Iterating over statistical models: NCAA tournament edition

  • 1. ITERATING OVER STATISTICAL MODELS NCAA TOURNAMENT EDITION
  • 2. Daniel Lee WHY ARE YOU LISTENING TO ME? ▸ Stan developer
 http://mc-stan.org
 ▸ Researcher at Columbia
 ▸ Co-founder of Stan Group
 training / statistical support / consulting 
 
 
 ▸ email: bearlee@alum.mit.edu
 twitter: @djsyclik / @mcmc_stan
 web: http://syclik.com
  • 4. WHAT IS MARCH MADNESS?
  • 5. WHAT IS MARCH MADNESS?
  • 7. P(VILLANOVA WIN)? CHAMPIONSHIP GAME: 
 VILLANOVA VS NORTH CAROLINA
  • 8. P(VILLANOVA WIN)? VILLANOVA WILDCATS VS. NORTH CAROLINA TAR HEELS ▸ 1:00. 70 - 69 ▸ 0:35. 72 - 69 ▸ 0:23. 72 - 71
  • 9. P(VILLANOVA WIN)? VILLANOVA WILDCATS VS. NORTH CAROLINA TAR HEELS ▸ 1:00. 70 - 69 ▸ 0:35. 72 - 69 ▸ 0:23. 72 - 71 ▸ 0:13. 74 - 71
  • 10. P(VILLANOVA WIN)? VILLANOVA WILDCATS VS. NORTH CAROLINA TAR HEELS ▸ 1:00. 70 - 69 ▸ 0:35. 72 - 69 ▸ 0:23. 72 - 71 ▸ 0:13. 74 - 71 ▸ 0:06. 74 - 74
  • 11. P(VILLANOVA WIN)? VILLANOVA WILDCATS VS. NORTH CAROLINA TAR HEELS ▸ 1:00. 70 - 69 ▸ 0:35. 72 - 69 ▸ 0:23. 72 - 71 ▸ 0:13. 74 - 71 ▸ 0:06. 74 - 74 ▸ 0:00. 77 - 74. Villanova wins.
  • 12.
  • 14. WRITING CODE IS A DISCIPLINE
  • 15. WRITING CODE IS A DISCIPLINE ▸ design patterns ▸ testing ▸ code review ▸ maintenance ▸ modularity ▸ collaboration CAN BE
  • 16. IS STATISTICAL MODELING A DISCIPLINE? ▸ Art or science?
 ▸ Models have names
 ▸ Statistical model vs implementation
 ▸ Collaboration on the statistical model?
  • 17. TREAT STATISTICAL MODELS AS CODE WHAT DO WE NEED TO DO ▸ Elevate statistical models: first class entity
 ▸ Modularize
 ▸ Language
 ▸ Discuss subtle details
 ▸ Collaborate
  • 18. TREAT STATISTICAL MODELS AS CODE STAN GETS US CLOSE ▸ statistical modeling language ▸ domain-specific language
 has its own grammar; not R or BUGS! ▸ rstan
 shinystan, RStudio integration, rstanarm ▸ open-source
 core libraries are new BSD ▸ Stan program ▸ plain text ▸ plays nicely with source repositories ▸ imperative language Note: Stan isn’t the only thing you can do this with
  • 20. MARCH MADNESS BASKETBALL HISTORY ▸ 1891 ▸ Dr. James Naismith. Springfield, MA ▸ Non-contact conditioning ▸ 13 simple rules ▸ Peach basket
 
 

  • 21. MARCH MADNESS BASKETBALL HISTORY ▸ 1891 ▸ Dr. James Naismith. Springfield, MA ▸ Non-contact conditioning ▸ 13 simple rules ▸ Peach basket
 10. The umpire shall be judge of the men and shall note the fouls and notify the referee when three consecutive fouls have been made. He shall have power to disqualify men according to Rule 5.
  • 22. MARCH MADNESS BASKETBALL NOW ▸ 2 x 20 min half ▸ Increasing score ▸ Points increment by 2, 3, and 1 ▸ 5 players, unlimited substitutions ▸ player DQ: 5th foul ▸ Bonus: 7 team fouls
 Double bonus: 10 team fouls
  • 23. MARCH MADNESS DATA ▸ 351 NCAA Division 1 Men’s basketball teams ▸ 33 conferences ▸ 5421 games ▸ 24 - 35 games per team ▸ Max 3 observations
  • 24.
  • 25. IS THIS BIG DATA?
  • 26. TALL DATA VS WIDE DATA ▸ Tall data
 lots of replications
 
 ▸ Wide data
 lots of fields
 
 day, home, score, ot, fgm, fga, 3pm, 3pa, 3a, fta, ftm, or, dr, ast, to, stl, blk, pf
  • 27. THREE STEPS OF BAYESIAN DATA ANALYSIS
  • 28. ANDREW GELMAN IN BDA THE THREE STEPS OF BAYESIAN DATA ANALYSIS 1. Set up full probability model
 
 2. Condition on observed data
 
 3. Evaluate the fit of the model

  • 29. ANDREW GELMAN IN BDA THE THREE STEPS OF BAYESIAN DATA ANALYSIS 1. Set up full probability model
 Write a Stan program
 2. Condition on observed data
 
 3. Evaluate the fit of the model

  • 30. ANDREW GELMAN IN BDA THE THREE STEPS OF BAYESIAN DATA ANALYSIS 1. Set up full probability model
 Write a Stan program
 2. Condition on observed data
 Run RStan
 3. Evaluate the fit of the model

  • 31. ANDREW GELMAN IN BDA THE THREE STEPS OF BAYESIAN DATA ANALYSIS 1. Set up full probability model
 Write a Stan program
 2. Condition on observed data
 Run RStan
 3. Evaluate the fit of the model
 R, ShinyStan, posterior predictive checks

  • 33. ITERATING OVER STATISTICAL MODELS STATISTICAL MODEL #1 ▸ Only 2015-2016 matters ▸ Teams have a latent ability ▸ “logistic regression” ▸ “Bradley-Terry model” y ⇠ bernoulli(logit 1 (✓1 ✓2))
  • 34.
  • 35. P(VILLANOVA > UNC | DATA) = 0.73
  • 36.
  • 37.
  • 38. ITERATING OVER STATISTICAL MODELS TREAT STATISTICAL MODELS AS CODE ▸ Statistical model in a separate file ▸ Git ▸ Testing ▸ Inspection of fit ▸ Backtest on historical data ▸ Priors ▸ “Model #1”
  • 39. IN WRITING, YOU MUST KILL ALL YOUR DARLINGS. Willliam Faulkner
  • 40. ITERATING OVER STATISTICAL MODELS STATISTICAL MODEL #2 ▸ Home court advantage!
 ▸ Teams have a latent ability ▸ “logistic regression” ▸ “Bradley-Terry model” y ⇠ bernoulli(logit 1 (↵ + ✓1 ✓2))
  • 41.
  • 42. P(VILLANOVA > UNC | DATA) = 0.52
  • 43.
  • 44. ITERATING OVER STATISTICAL MODELS STATISTICAL MODEL #3 ▸ Assumptions: ▸ Only 2015-2016 matters ▸ Teams have a latent ability ▸ Model points ▸ Add a home court advantage
  • 45.
  • 46.
  • 47.
  • 48. ITERATING OVER STATISTICAL MODELS HOW DID WE DO? ▸ Kaggle: 87 / 608 ▸ What went wrong? ▸ What’s next?
  • 50. THANKS ▸ Collaborative effort ▸ NCAA modeling:
 Rob Trangucci ▸ Stan team
 Andrew Gelman, Bob Carpenter, Matt Hoffman, Ben Goodrich, Michael Betancourt, Marcus Brubaker, Jiqiang Guo, Peter Li, Allen Riddell, Marco Ignacio, Jeff Arnold, Mitzi Morris, Rob Goedman, Brian Lau, Jonah Gabry, Alp Kucukelbir, Robert Grant, Dustin Tran, Krzysztof Sakrejda, Aki Vehtari, Rayleigh Lei, Sebastian Weber HELP ▸ http://mc-stan.org ▸ stan-users mailing list
 ▸ Stan Group Inc.
 http://stan.fit
 training / statistical support / consulting
 
 ▸ bearlee@alum.mit.edu / @djsyclik / @mcmc_stan