## # A tibble: 7 x 7
##   titleId  seasonNumber title        date       av_rating share genres     
##   <chr>           <dbl> <chr>        <date>         <dbl> <dbl> <chr>      
## 1 tt01182~            1 Buffy the V~ 1997-04-14      7.96 11.7  Action,Dra~
## 2 tt01182~            2 Buffy the V~ 1997-12-31      8.42 19.4  Action,Dra~
## 3 tt01182~            3 Buffy the V~ 1999-01-29      8.62 17.1  Action,Dra~
## 4 tt01182~            4 Buffy the V~ 2000-01-19      8.22 16.2  Action,Dra~
## 5 tt01182~            5 Buffy the V~ 2001-01-12      8.30 12.0  Action,Dra~
## 6 tt01182~            6 Buffy the V~ 2002-01-29      8.10  8.45 Action,Dra~
## 7 tt01182~            7 Buffy the V~ 2003-01-18      8.05  9.89 Action,Dra~

Do most shows get better or worse over time?

What are the highest rated seasons of TV?

Has TV been getting better or worse over time?

Show survival

If season 1 is good, what’s the probability they get a season 2?

## 
## Call:
## glm(formula = !is.na(season2) ~ season1, data = first_three_seasons)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -0.8945  -0.4984   0.2964   0.4275   0.9611  
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -1.08101    0.22075  -4.897 1.22e-06 ***
## season1      0.20403    0.02779   7.343 5.96e-13 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for gaussian family taken to be 0.2312924)
## 
##     Null deviance: 170.44  on 684  degrees of freedom
## Residual deviance: 157.97  on 683  degrees of freedom
## AIC: 945.05
## 
## Number of Fisher Scoring iterations: 2

## 
## Call:
## glm(formula = had_second_season ~ season1 * year, family = "binomial", 
##     data = .)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.8707  -1.1609   0.7349   1.0575   2.3826  
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)   
## (Intercept)   827.25925  255.08118   3.243  0.00118 **
## season1      -104.23247   32.01611  -3.256  0.00113 **
## year           -0.41594    0.12719  -3.270  0.00107 **
## season1:year    0.05242    0.01596   3.284  0.00102 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 946.38  on 684  degrees of freedom
## Residual deviance: 882.18  on 681  degrees of freedom
## AIC: 890.18
## 
## Number of Fisher Scoring iterations: 4

Whether a show gets a second season depends on the ratings of the first season