Initialisation of Variables

Imports


In [1]:
import pandas as pd
import numpy as np
import statsmodels.api as sm
import matplotlib.pyplot as plt
from pandas.stats.api import ols
import warnings
warnings.filterwarnings('ignore')
data = pd.read_json("OverwatchFullDB.json")

Arrays


In [3]:
rank = [x for x in data['rank']] 
level = [x for x in data['level']] 
comp = [x for x in data.get('comp', {})]
qp = [x for x in data.get('qp', {})]
heroes = [x for x in data.get('heroes', {})]

Functions


In [4]:
def getAvgElims(x):
    b = x.get('average', {})
    return(b.get('elims', {}))
def getTotalElims(x):
    b = x.get('total', {})
    return(b.get('elims', {}))
def getMostElims(x):
    b = x.get('most', {})
    return(b.get('elims', {}))
def getGames(x):
    b = x.get('total',{})
    return(b.get('games',{}))
def getAna(x):
    b = x.get('playtime',{})
    return(b.get('ana',{}))
def getBastion(x):
    b = x.get('playtime',{})
    return(b.get('bastion',{}))
def getDva(x):
    b = x.get('playtime',{})
    return(b.get('dva',{}))
def getGenji(x):
    b = x.get('playtime',{})
    return(b.get('genji',{}))
def getHanzo(x):
    b = x.get('playtime',{})
    return(b.get('hanzo',{}))
def getJunkrat(x):
    b = x.get('playtime',{})
    return(b.get('junkrat',{}))
def getLucio(x):
    b = x.get('playtime',{})
    return(b.get('lucio',{}))
def getMccree(x):
    b = x.get('playtime',{})
    return(b.get('mccree',{}))
def getMei(x):
    b = x.get('playtime',{})
    return(b.get('mei',{}))
def getMercy(x):
    b = x.get('playtime',{})
    return(b.get('mercy',{}))
def getOrisa(x):
    b = x.get('playtime',{})
    return(b.get('orisa',{}))
def getPharah(x):
    b = x.get('playtime',{})
    return(b.get('pharah',{}))
def getReaper(x):
    b = x.get('playtime',{})
    return(b.get('reaper',{}))
def getReinhardt(x):
    b = x.get('playtime',{})
    return(b.get('reinhardt',{}))
def getRoadhog(x):
    b = x.get('playtime',{})
    return(b.get('roadhog',{}))
def getSoldier76(x):
    b = x.get('playtime',{})
    return(b.get('soldier76',{}))
def getSombra(x):
    b = x.get('playtime',{})
    return(b.get('sombra',{}))
def getSymmetra(x):
    b = x.get('playtime',{})
    return(b.get('symmetra',{}))
def getTorbjorn(x):
    b = x.get('playtime',{})
    return(b.get('torbjorn',{}))
def getTracer(x):
    b = x.get('playtime',{})
    return(b.get('tracer',{}))
def getWidowmaker(x):
    b = x.get('playtime',{})
    return(b.get('widowmaker',{}))
def getWinston(x):
    b = x.get('playtime',{})
    return(b.get('winston',{}))
def getZarya(x):
    b = x.get('playtime',{})
    return(b.get('zarya',{}))
def getZenyatta(x):
    b = x.get('playtime',{})
    return(b.get('zenyatta',{}))
def filterNaN(x):
    if x<1e100:
        return(x)
    else:
        return(0)
def filterLowRank(x):
    if x > 0 and x < 1666:
        return(x)
    else:
        return(0)
def filterMedRank(x):
    if x > 1666 and x < 3332:
        return(x)
    else:
        return(0)
def filterHighRank(x):
    if x > 3332 and x < 5001:
        return(x)
    else:
        return(0)

Parameters


In [5]:
compGames = [getGames(x) for x in  comp]
qpGames = [getGames(x) for x in  qp]
anaHours = [getAna(x) for x in heroes]
bastionHours = [getBastion(x) for x in heroes]
dvaHours = [getDva(x) for x in heroes]
genjiHours = [getGenji(x) for x in heroes]
hanzoHours = [getHanzo(x) for x in heroes]
junkratHours = [getJunkrat(x) for x in heroes]
lucioHours = [getLucio(x) for x in heroes]
mccreeHours = [getMccree(x) for x in heroes]
meiHours = [getMei(x) for x in heroes]
mercyHours = [getMercy(x) for x in heroes]
orisaHours = [getOrisa(x) for x in heroes]
pharahHours = [getPharah(x) for x in heroes]
reaperHours = [getReaper(x) for x in heroes]
reinhardtHours = [getReinhardt(x) for x in heroes]
roadhogHours = [getRoadhog(x) for x in heroes]
soldier76Hours = [getSoldier76(x) for x in heroes]
#sombraHours = [getSombra(x) for x in heroes]
symmetraHours = [getSymmetra(x) for x in heroes]
torbjornHours = [getTorbjorn(x) for x in heroes]
tracerHours = [getTracer(x) for x in heroes]
widowmakerHours = [getWidowmaker(x) for x in heroes]
winstonHours = [getWinston(x) for x in heroes]
zaryaHours = [getZarya(x) for x in heroes]
zenyattaHours = [getZenyatta(x) for x in heroes]
rankFiltered=[filterNaN(x) for x in rank]
levelFiltered= [filterNaN(x) for x in level]
lowRank = [filterLowRank(x) for x in rank]
medRank = [filterMedRank(x) for x in rank]
highRank = [filterHighRank(x) for x in rank]
avgElims = [getAvgElims(x) for x in comp]
totalElims = [getTotalElims(x) for x in comp]
mostElims = [getMostElims(x) for x in comp]

Analytics

Sample size of ~1000 players

MLS Fit for all set of parameters


In [6]:
df = pd.DataFrame({"Rank": rankFiltered, "Level": level, "Comp Games": compGames, "Quick Games": qpGames, "Ana": anaHours, "Bastion": bastionHours, "D.Va": dvaHours, "Genji": genjiHours, "Hanzo": hanzoHours, "Junkrat": junkratHours, "Lucio": lucioHours, "McCree": mccreeHours, "Mei": meiHours, "Mercy": mercyHours, "Orisa": orisaHours, "Pharah": pharahHours, "Reaper": reaperHours, "Reinhardt": reinhardtHours, "Roadhog": roadhogHours, "Soldier76": soldier76Hours, "Symmetra": symmetraHours, "Torbjorn": torbjornHours, "Tracer": tracerHours, "Widowmaker": widowmakerHours, "Winston": winstonHours, "Zarya": zaryaHours, "Zenyatta": zenyattaHours})
res = ols(y = df['Rank'], x = df[['Level','Comp Games', 'Quick Games', 'Ana', 'Bastion', 'D.Va', 'Genji', 'Hanzo', 'Junkrat', 'Lucio', 'McCree', 'Mei', 'Mercy', 'Orisa', 'Pharah', 'Reaper', 'Reinhardt', 'Roadhog', 'Soldier76', 'Symmetra', 'Torbjorn', 'Tracer', 'Widowmaker', 'Winston', 'Zarya', 'Zenyatta']])
res


Out[6]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Level> + <Comp Games> + <Quick Games> + <Ana> + <Bastion> + <D.Va>
             + <Genji> + <Hanzo> + <Junkrat> + <Lucio> + <McCree> + <Mei>
             + <Mercy> + <Orisa> + <Pharah> + <Reaper> + <Reinhardt> + <Roadhog>
             + <Soldier76> + <Symmetra> + <Torbjorn> + <Tracer> + <Widowmaker>
             + <Winston> + <Zarya> + <Zenyatta> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   27

R-squared:         0.2281
Adj R-squared:     0.2087

Rmse:           1337.9389

F-stat (26, 1037):    11.7860, p-value:     0.0000

Degrees of Freedom: model 26, resid 1037

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
         Level     0.7969     1.4599       0.55     0.5853    -2.0646     3.6584
    Comp Games     1.3557     1.0721       1.26     0.2063    -0.7457     3.4570
   Quick Games    -0.0070     0.6460      -0.01     0.9913    -1.2731     1.2590
           Ana     6.4847     7.7997       0.83     0.4059    -8.8026    21.7720
       Bastion    28.1365    11.3934       2.47     0.0137     5.8055    50.4676
--------------------------------------------------------------------------------
          D.Va    -7.3421     5.8592      -1.25     0.2105   -18.8261     4.1419
         Genji     3.6323     5.2253       0.70     0.4871    -6.6094    13.8740
         Hanzo     6.2629     6.0979       1.03     0.3046    -5.6890    18.2147
       Junkrat   -15.5118     7.7703      -2.00     0.0462   -30.7416    -0.2821
         Lucio     3.6914     5.8279       0.63     0.5266    -7.7313    15.1141
--------------------------------------------------------------------------------
        McCree    12.5183     6.4057       1.95     0.0509    -0.0368    25.0734
           Mei     6.2182    10.4056       0.60     0.5502   -14.1767    26.6131
         Mercy     2.8266     5.1750       0.55     0.5850    -7.3163    12.9695
         Orisa   141.5531   104.7078       1.35     0.1767   -63.6741   346.7804
        Pharah     5.5703     6.3694       0.87     0.3820    -6.9139    18.0544
--------------------------------------------------------------------------------
        Reaper   -14.0914     6.9698      -2.02     0.0435   -27.7522    -0.4306
     Reinhardt     4.3947     6.6133       0.66     0.5065    -8.5674    17.3569
       Roadhog    11.7741     6.0395       1.95     0.0515    -0.0632    23.6114
     Soldier76     9.5776     7.3765       1.30     0.1944    -4.8803    24.0356
      Symmetra     5.9898     8.3675       0.72     0.4743   -10.4106    22.3901
--------------------------------------------------------------------------------
      Torbjorn   -17.8530     9.3635      -1.91     0.0568   -36.2054     0.4995
        Tracer     8.5710     5.8623       1.46     0.1440    -2.9191    20.0612
    Widowmaker     8.9732     6.3676       1.41     0.1591    -3.5074    21.4537
       Winston     2.2778     7.8813       0.29     0.7726   -13.1695    17.7252
         Zarya     9.9907     6.7531       1.48     0.1393    -3.2453    23.2267
--------------------------------------------------------------------------------
      Zenyatta    -5.4216     7.4758      -0.73     0.4685   -20.0742     9.2311
     intercept  1979.6076   114.0226      17.36     0.0000  1756.1233  2203.0920
---------------------------------End of Summary---------------------------------

MLS Fit for Competitive Games and All Heroes (minus Orisa/Sombra)


In [7]:
df = pd.DataFrame({"Rank": rankFiltered, "Comp Games": compGames, "Ana": anaHours, "Bastion": bastionHours, "D.Va": dvaHours, "Genji": genjiHours, "Hanzo": hanzoHours, "Junkrat": junkratHours, "Lucio": lucioHours, "McCree": mccreeHours, "Mei": meiHours, "Mercy": mercyHours, "Pharah": pharahHours, "Reaper": reaperHours, "Reinhardt": reinhardtHours, "Roadhog": roadhogHours, "Soldier76": soldier76Hours, "Symmetra": symmetraHours, "Torbjorn": torbjornHours, "Tracer": tracerHours, "Widowmaker": widowmakerHours, "Winston": winstonHours, "Zarya": zaryaHours, "Zenyatta": zenyattaHours})
res = ols(y = df['Rank'], x = df[['Comp Games', 'Ana', 'Bastion', 'D.Va', 'Genji', 'Hanzo', 'Junkrat', 'Lucio', 'McCree', 'Mei', 'Mercy', 'Pharah', 'Reaper', 'Reinhardt', 'Roadhog', 'Soldier76', 'Symmetra', 'Torbjorn', 'Tracer', 'Widowmaker', 'Winston', 'Zarya', 'Zenyatta']])
res


Out[7]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Comp Games> + <Ana> + <Bastion> + <D.Va> + <Genji> + <Hanzo>
             + <Junkrat> + <Lucio> + <McCree> + <Mei> + <Mercy> + <Pharah> + <Reaper>
             + <Reinhardt> + <Roadhog> + <Soldier76> + <Symmetra> + <Torbjorn>
             + <Tracer> + <Widowmaker> + <Winston> + <Zarya> + <Zenyatta>
             + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   24

R-squared:         0.2264
Adj R-squared:     0.2093

Rmse:           1337.4800

F-stat (23, 1040):    13.2329, p-value:     0.0000

Degrees of Freedom: model 23, resid 1040

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
    Comp Games     1.3236     0.3482       3.80     0.0002     0.6411     2.0061
           Ana     6.2322     5.5679       1.12     0.2633    -4.6809    17.1453
       Bastion    29.7135     9.6691       3.07     0.0022    10.7620    48.6650
          D.Va    -6.9513     3.0225      -2.30     0.0217   -12.8753    -1.0272
         Genji     3.5506     1.5247       2.33     0.0201     0.5621     6.5390
--------------------------------------------------------------------------------
         Hanzo     6.3209     3.5126       1.80     0.0722    -0.5637    13.2056
       Junkrat   -15.5840     5.7923      -2.69     0.0072   -26.9369    -4.2311
         Lucio     3.7391     2.8555       1.31     0.1907    -1.8576     9.3358
        McCree    12.5762     3.3647       3.74     0.0002     5.9813    19.1711
           Mei     6.9732     8.6893       0.80     0.4224   -10.0579    24.0043
--------------------------------------------------------------------------------
         Mercy     2.7701     1.3555       2.04     0.0413     0.1132     5.4270
        Pharah     5.3336     3.8420       1.39     0.1654    -2.1968    12.8639
        Reaper   -14.4046     5.0228      -2.87     0.0042   -24.2493    -4.5600
     Reinhardt     4.1019     4.3508       0.94     0.3460    -4.4257    12.6296
       Roadhog    11.8941     3.5624       3.34     0.0009     4.9117    18.8764
--------------------------------------------------------------------------------
     Soldier76     9.1575     5.2038       1.76     0.0787    -1.0420    19.3569
      Symmetra     6.4484     6.5426       0.99     0.3246    -6.3752    19.2719
      Torbjorn   -17.1783     8.1569      -2.11     0.0354   -33.1659    -1.1907
        Tracer     8.2743     3.2259       2.56     0.0105     1.9514    14.5971
    Widowmaker     9.0736     3.2693       2.78     0.0056     2.6657    15.4815
--------------------------------------------------------------------------------
       Winston     3.4130     6.2297       0.55     0.5839    -8.7972    15.6233
         Zarya    10.1921     4.7351       2.15     0.0316     0.9114    19.4728
      Zenyatta    -5.1314     5.7702      -0.89     0.3741   -16.4410     6.1782
     intercept  2020.8125    72.1069      28.03     0.0000  1879.4829  2162.1420
---------------------------------End of Summary---------------------------------

MLS Fit for Low Ranked Players 0 - 1666 SR


In [8]:
df = pd.DataFrame({"Rank": lowRank, "Comp Games": compGames, "Ana": anaHours, "Bastion": bastionHours, "D.Va": dvaHours, "Genji": genjiHours, "Hanzo": hanzoHours, "Junkrat": junkratHours, "Lucio": lucioHours, "McCree": mccreeHours, "Mei": meiHours, "Mercy": mercyHours, "Pharah": pharahHours, "Reaper": reaperHours, "Reinhardt": reinhardtHours, "Roadhog": roadhogHours, "Soldier76": soldier76Hours, "Symmetra": symmetraHours, "Torbjorn": torbjornHours, "Tracer": tracerHours, "Widowmaker": widowmakerHours, "Winston": winstonHours, "Zarya": zaryaHours, "Zenyatta": zenyattaHours})
res = ols(y = df['Rank'], x = df[['Comp Games', 'Ana', 'Bastion', 'D.Va', 'Genji', 'Hanzo', 'Junkrat', 'Lucio', 'McCree', 'Mei', 'Mercy', 'Pharah', 'Reaper', 'Reinhardt', 'Roadhog', 'Soldier76', 'Symmetra', 'Torbjorn', 'Tracer', 'Widowmaker', 'Winston', 'Zarya', 'Zenyatta']])
res


Out[8]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Comp Games> + <Ana> + <Bastion> + <D.Va> + <Genji> + <Hanzo>
             + <Junkrat> + <Lucio> + <McCree> + <Mei> + <Mercy> + <Pharah> + <Reaper>
             + <Reinhardt> + <Roadhog> + <Soldier76> + <Symmetra> + <Torbjorn>
             + <Tracer> + <Widowmaker> + <Winston> + <Zarya> + <Zenyatta>
             + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   24

R-squared:         0.0467
Adj R-squared:     0.0256

Rmse:            262.9924

F-stat (23, 1040):     2.2129, p-value:     0.0009

Degrees of Freedom: model 23, resid 1040

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
    Comp Games    -0.0305     0.0685      -0.45     0.6557    -0.1647     0.1037
           Ana     0.0029     1.0948       0.00     0.9979    -2.1429     2.1488
       Bastion     1.2661     1.9013       0.67     0.5056    -2.4604     4.9926
          D.Va     0.3852     0.5943       0.65     0.5170    -0.7796     1.5501
         Genji    -0.0763     0.2998      -0.25     0.7991    -0.6639     0.5113
--------------------------------------------------------------------------------
         Hanzo    -0.7598     0.6907      -1.10     0.2715    -2.1136     0.5939
       Junkrat     2.2440     1.1390       1.97     0.0491     0.0116     4.4763
         Lucio    -0.0845     0.5615      -0.15     0.8803    -1.1850     1.0159
        McCree    -1.0942     0.6616      -1.65     0.0985    -2.3910     0.2025
           Mei    -1.7814     1.7086      -1.04     0.2974    -5.1302     1.5675
--------------------------------------------------------------------------------
         Mercy    -0.1864     0.2665      -0.70     0.4844    -0.7089     0.3360
        Pharah     1.4476     0.7555       1.92     0.0556    -0.0331     2.9283
        Reaper    -0.6558     0.9876      -0.66     0.5068    -2.5916     1.2800
     Reinhardt    -0.2795     0.8555      -0.33     0.7440    -1.9563     1.3973
       Roadhog    -0.7407     0.7005      -1.06     0.2905    -2.1137     0.6322
--------------------------------------------------------------------------------
     Soldier76     0.0783     1.0232       0.08     0.9390    -1.9272     2.0839
      Symmetra     0.7799     1.2865       0.61     0.5445    -1.7416     3.3014
      Torbjorn    -2.6165     1.6039      -1.63     0.1031    -5.7601     0.5272
        Tracer    -1.1944     0.6343      -1.88     0.0600    -2.4377     0.0488
    Widowmaker    -0.5438     0.6429      -0.85     0.3978    -1.8038     0.7163
--------------------------------------------------------------------------------
       Winston    -0.2372     1.2250      -0.19     0.8465    -2.6381     2.1638
         Zarya    -1.2715     0.9311      -1.37     0.1723    -3.0964     0.5534
      Zenyatta    -0.6279     1.1346      -0.55     0.5801    -2.8518     1.5959
     intercept   118.2918    14.1786       8.34     0.0000    90.5018   146.0819
---------------------------------End of Summary---------------------------------

MLS Fit for Medium Ranked Players 1666 - 3332 SR


In [9]:
df = pd.DataFrame({"Rank": medRank, "Comp Games": compGames, "Ana": anaHours, "Bastion": bastionHours, "D.Va": dvaHours, "Genji": genjiHours, "Hanzo": hanzoHours, "Junkrat": junkratHours, "Lucio": lucioHours, "McCree": mccreeHours, "Mei": meiHours, "Mercy": mercyHours, "Pharah": pharahHours, "Reaper": reaperHours, "Reinhardt": reinhardtHours, "Roadhog": roadhogHours, "Soldier76": soldier76Hours, "Symmetra": symmetraHours, "Torbjorn": torbjornHours, "Tracer": tracerHours, "Widowmaker": widowmakerHours, "Winston": winstonHours, "Zarya": zaryaHours, "Zenyatta": zenyattaHours})
res = ols(y = df['Rank'], x = df[['Comp Games', 'Ana', 'Bastion', 'D.Va', 'Genji', 'Hanzo', 'Junkrat', 'Lucio', 'McCree', 'Mei', 'Mercy', 'Pharah', 'Reaper', 'Reinhardt', 'Roadhog', 'Soldier76', 'Symmetra', 'Torbjorn', 'Tracer', 'Widowmaker', 'Winston', 'Zarya', 'Zenyatta']])
res


Out[9]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Comp Games> + <Ana> + <Bastion> + <D.Va> + <Genji> + <Hanzo>
             + <Junkrat> + <Lucio> + <McCree> + <Mei> + <Mercy> + <Pharah> + <Reaper>
             + <Reinhardt> + <Roadhog> + <Soldier76> + <Symmetra> + <Torbjorn>
             + <Tracer> + <Widowmaker> + <Winston> + <Zarya> + <Zenyatta>
             + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   24

R-squared:         0.0867
Adj R-squared:     0.0665

Rmse:           1144.3074

F-stat (23, 1040):     4.2908, p-value:     0.0000

Degrees of Freedom: model 23, resid 1040

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
    Comp Games    -0.2278     0.2979      -0.76     0.4447    -0.8117     0.3561
           Ana    10.0111     4.7637       2.10     0.0358     0.6741    19.3480
       Bastion     9.7262     8.2726       1.18     0.2400    -6.4881    25.9405
          D.Va     7.6816     2.5859       2.97     0.0030     2.6132    12.7501
         Genji    -2.4298     1.3045      -1.86     0.0628    -4.9866     0.1270
--------------------------------------------------------------------------------
         Hanzo    -4.9227     3.0053      -1.64     0.1017   -10.8130     0.9676
       Junkrat     5.0221     4.9557       1.01     0.3111    -4.6911    14.7353
         Lucio    -5.4836     2.4430      -2.24     0.0250   -10.2720    -0.6953
        McCree    -8.4452     2.8788      -2.93     0.0034   -14.0876    -2.8028
           Mei     3.7461     7.4343       0.50     0.6144   -10.8252    18.3173
--------------------------------------------------------------------------------
         Mercy    -2.5532     1.1598      -2.20     0.0279    -4.8264    -0.2801
        Pharah    -8.0994     3.2871      -2.46     0.0139   -14.5422    -1.6567
        Reaper    -1.4459     4.2973      -0.34     0.7366    -9.8686     6.9769
     Reinhardt     3.3885     3.7224       0.91     0.3629    -3.9075    10.6845
       Roadhog    -4.1720     3.0479      -1.37     0.1714   -10.1459     1.8019
--------------------------------------------------------------------------------
     Soldier76     2.8133     4.4522       0.63     0.5276    -5.9131    11.5396
      Symmetra    -1.9343     5.5977      -0.35     0.7297   -12.9058     9.0371
      Torbjorn    -8.3351     6.9788      -1.19     0.2326   -22.0136     5.3434
        Tracer    -4.2801     2.7600      -1.55     0.1213    -9.6898     1.1295
    Widowmaker    -4.7097     2.7972      -1.68     0.0925   -10.1921     0.7727
--------------------------------------------------------------------------------
       Winston    -7.0422     5.3300      -1.32     0.1867   -17.4889     3.4045
         Zarya    -5.8728     4.0512      -1.45     0.1475   -13.8131     2.0675
      Zenyatta     3.7093     4.9368       0.75     0.4526    -5.9668    13.3855
     intercept  1050.8837    61.6925      17.03     0.0000   929.9665  1171.8010
---------------------------------End of Summary---------------------------------

MLS Fit for High Ranked Players 3332 - 5000 SR


In [10]:
df = pd.DataFrame({"Rank": highRank, "Comp Games": compGames, "Ana": anaHours, "Bastion": bastionHours, "D.Va": dvaHours, "Genji": genjiHours, "Hanzo": hanzoHours, "Junkrat": junkratHours, "Lucio": lucioHours, "McCree": mccreeHours, "Mei": meiHours, "Mercy": mercyHours, "Pharah": pharahHours, "Reaper": reaperHours, "Reinhardt": reinhardtHours, "Roadhog": roadhogHours, "Soldier76": soldier76Hours, "Symmetra": symmetraHours, "Torbjorn": torbjornHours, "Tracer": tracerHours, "Widowmaker": widowmakerHours, "Winston": winstonHours, "Zarya": zaryaHours, "Zenyatta": zenyattaHours})
res = ols(y = df['Rank'], x = df[['Comp Games', 'Ana', 'Bastion', 'D.Va', 'Genji', 'Hanzo', 'Junkrat', 'Lucio', 'McCree', 'Mei', 'Mercy', 'Pharah', 'Reaper', 'Reinhardt', 'Roadhog', 'Soldier76', 'Symmetra', 'Torbjorn', 'Tracer', 'Widowmaker', 'Winston', 'Zarya', 'Zenyatta']])
res


Out[10]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Comp Games> + <Ana> + <Bastion> + <D.Va> + <Genji> + <Hanzo>
             + <Junkrat> + <Lucio> + <McCree> + <Mei> + <Mercy> + <Pharah> + <Reaper>
             + <Reinhardt> + <Roadhog> + <Soldier76> + <Symmetra> + <Torbjorn>
             + <Tracer> + <Widowmaker> + <Winston> + <Zarya> + <Zenyatta>
             + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   24

R-squared:         0.2674
Adj R-squared:     0.2512

Rmse:           1773.8721

F-stat (23, 1040):    16.5080, p-value:     0.0000

Degrees of Freedom: model 23, resid 1040

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
    Comp Games     1.5819     0.4618       3.43     0.0006     0.6767     2.4871
           Ana    -3.7818     7.3846      -0.51     0.6087   -18.2556    10.6920
       Bastion    18.7212    12.8240       1.46     0.1446    -6.4138    43.8562
          D.Va   -15.0181     4.0087      -3.75     0.0002   -22.8751    -7.1612
         Genji     6.0567     2.0222       3.00     0.0028     2.0932    10.0202
--------------------------------------------------------------------------------
         Hanzo    12.0034     4.6587       2.58     0.0101     2.8725    21.1344
       Junkrat   -22.8501     7.6822      -2.97     0.0030   -37.9072    -7.7929
         Lucio     9.3073     3.7871       2.46     0.0141     1.8846    16.7301
        McCree    22.1156     4.4626       4.96     0.0000    13.3690    30.8623
           Mei     5.0085    11.5245       0.43     0.6639   -17.5794    27.5965
--------------------------------------------------------------------------------
         Mercy     5.5098     1.7978       3.06     0.0022     1.9860     9.0335
        Pharah    11.9854     5.0956       2.35     0.0189     1.9980    21.9727
        Reaper   -12.3030     6.6616      -1.85     0.0651   -25.3597     0.7538
     Reinhardt     0.9930     5.7704       0.17     0.8634   -10.3171    12.3030
       Roadhog    16.8068     4.7248       3.56     0.0004     7.5463    26.0674
--------------------------------------------------------------------------------
     Soldier76     6.2659     6.9017       0.91     0.3642    -7.2614    19.7932
      Symmetra     7.6027     8.6774       0.88     0.3811    -9.4049    24.6104
      Torbjorn    -6.2267    10.8184      -0.58     0.5650   -27.4307    14.9774
        Tracer    13.7489     4.2785       3.21     0.0014     5.3630    22.1347
    Widowmaker    14.3270     4.3361       3.30     0.0010     5.8283    22.8257
--------------------------------------------------------------------------------
       Winston    10.6924     8.2624       1.29     0.1959    -5.5018    26.8866
         Zarya    17.3364     6.2800       2.76     0.0059     5.0276    29.6452
      Zenyatta    -8.2128     7.6529      -1.07     0.2834   -23.2125     6.7869
     intercept   851.6369    95.6339       8.91     0.0000   664.1945  1039.0793
---------------------------------End of Summary---------------------------------

MLS Fit for Elimations


In [11]:
df = pd.DataFrame({"Rank": rankFiltered, "Average Elims": avgElims, "Total Elims": totalElims, "Most Elims": mostElims})
res = ols(y = df['Rank'], x = df[['Average Elims', 'Total Elims', 'Most Elims']])
res


Out[11]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Average Elims> + <Total Elims> + <Most Elims> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   4

R-squared:         0.1265
Adj R-squared:     0.1240

Rmse:           1407.7612

F-stat (3, 1060):    51.1589, p-value:     0.0000

Degrees of Freedom: model 3, resid 1060

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
 Average Elims    26.4562     8.7019       3.04     0.0024     9.4005    43.5119
   Total Elims     0.0489     0.0152       3.22     0.0013     0.0191     0.0786
    Most Elims    20.2743     4.4367       4.57     0.0000    11.5784    28.9702
     intercept   970.8227   180.8338       5.37     0.0000   616.3885  1325.2569
---------------------------------End of Summary---------------------------------

Individual Hero Playtime vs Rank

Ana

In [12]:
df = pd.DataFrame({"Rank": rankFiltered, "Ana": anaHours})
res = ols(y = df['Rank'], x = df[['Ana']])
res


Out[12]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Ana> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0586
Adj R-squared:     0.0577

Rmse:           1460.0405

F-stat (1, 1062):    66.1311, p-value:     0.0000

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
           Ana    39.4716     4.8538       8.13     0.0000    29.9582    48.9851
     intercept  2623.5444    51.6491      50.80     0.0000  2522.3121  2724.7767
---------------------------------End of Summary---------------------------------
Bastion

In [13]:
df = pd.DataFrame({"Rank": rankFiltered, "Bastion": bastionHours})
res = ols(y = df['Rank'], x = df[['Bastion']])
res


Out[13]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Bastion> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0340
Adj R-squared:     0.0331

Rmse:           1479.0291

F-stat (1, 1062):    37.3499, p-value:     0.0000

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
       Bastion    59.3203     9.7064       6.11     0.0000    40.2958    78.3449
     intercept  2622.0808    56.9942      46.01     0.0000  2510.3721  2733.7894
---------------------------------End of Summary---------------------------------
D.Va

In [14]:
df = pd.DataFrame({"Rank": rankFiltered, "D.Va": dvaHours})
res = ols(y = df['Rank'], x = df[['D.Va']])
res


Out[14]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <D.Va> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0005
Adj R-squared:    -0.0004

Rmse:           1504.4173

F-stat (1, 1062):     0.5583, p-value:     0.4551

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
          D.Va     2.2413     2.9996       0.75     0.4551    -3.6380     8.1206
     intercept  2817.5330    50.6169      55.66     0.0000  2718.3239  2916.7421
---------------------------------End of Summary---------------------------------
Genji

In [15]:
df = pd.DataFrame({"Rank": rankFiltered, "Genji": genjiHours})
res = ols(y = df['Rank'], x = df[['Genji']])
res


Out[15]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Genji> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0543
Adj R-squared:     0.0534

Rmse:           1463.3877

F-stat (1, 1062):    60.9764, p-value:     0.0000

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
         Genji    11.4865     1.4710       7.81     0.0000     8.6034    14.3696
     intercept  2652.4518    50.4774      52.55     0.0000  2553.5160  2751.3876
---------------------------------End of Summary---------------------------------
Hanzo

In [16]:
df = pd.DataFrame({"Rank": rankFiltered, "Hanzo": hanzoHours})
res = ols(y = df['Rank'], x = df[['Hanzo']])
res


Out[16]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Hanzo> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0490
Adj R-squared:     0.0481

Rmse:           1467.4635

F-stat (1, 1062):    54.7470, p-value:     0.0000

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
         Hanzo    25.1925     3.4048       7.40     0.0000    18.5191    31.8659
     intercept  2634.1110    52.4147      50.26     0.0000  2531.3783  2736.8438
---------------------------------End of Summary---------------------------------
Junkrat

In [17]:
df = pd.DataFrame({"Rank": rankFiltered, "Junkrat": junkratHours})
res = ols(y = df['Rank'], x = df[['Junkrat']])
res


Out[17]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Junkrat> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0014
Adj R-squared:     0.0004

Rmse:           1503.7962

F-stat (1, 1062):     1.4362, p-value:     0.2310

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
       Junkrat     6.7665     5.6462       1.20     0.2310    -4.3002    17.8331
     intercept  2798.4459    54.4272      51.42     0.0000  2691.7686  2905.1232
---------------------------------End of Summary---------------------------------
Lucio

In [18]:
df = pd.DataFrame({"Rank": rankFiltered, "Lucio": lucioHours})
res = ols(y = df['Rank'], x = df[['Lucio']])
res


Out[18]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Lucio> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0176
Adj R-squared:     0.0167

Rmse:           1491.5147

F-stat (1, 1062):    19.0215, p-value:     0.0000

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
         Lucio    12.4009     2.8434       4.36     0.0000     6.8279    17.9739
     intercept  2730.3746    51.4368      53.08     0.0000  2629.5585  2831.1906
---------------------------------End of Summary---------------------------------
McCree

In [19]:
df = pd.DataFrame({"Rank": rankFiltered, "McCree": mccreeHours})
res = ols(y = df['Rank'], x = df[['McCree']])
res


Out[19]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <McCree> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0996
Adj R-squared:     0.0988

Rmse:           1427.8744

F-stat (1, 1062):   117.5310, p-value:     0.0000

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
        McCree    30.5472     2.8177      10.84     0.0000    25.0245    36.0699
     intercept  2496.9951    53.6418      46.55     0.0000  2391.8572  2602.1330
---------------------------------End of Summary---------------------------------
Mei

In [20]:
df = pd.DataFrame({"Rank": rankFiltered, "Mei": meiHours})
res = ols(y = df['Rank'], x = df[['Mei']])
res


Out[20]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Mei> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0391
Adj R-squared:     0.0382

Rmse:           1475.1319

F-stat (1, 1062):    43.1665, p-value:     0.0000

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
           Mei    50.4518     7.6790       6.57     0.0000    35.4010    65.5027
     intercept  2608.9665    56.6485      46.06     0.0000  2497.9354  2719.9977
---------------------------------End of Summary---------------------------------
Mercy

In [21]:
df = pd.DataFrame({"Rank": rankFiltered, "Mercy": mercyHours})
res = ols(y = df['Rank'], x = df[['Mercy']])
res


Out[21]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Mercy> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0113
Adj R-squared:     0.0103

Rmse:           1496.3108

F-stat (1, 1062):    12.1025, p-value:     0.0005

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
         Mercy     4.6118     1.3256       3.48     0.0005     2.0135     7.2100
     intercept  2787.2860    47.7265      58.40     0.0000  2693.7421  2880.8300
---------------------------------End of Summary---------------------------------
Orisa

In [22]:
df = pd.DataFrame({"Rank": rankFiltered, "Orisa": orisaHours})
res = ols(y = df['Rank'], x = df[['Orisa']])
res


Out[22]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Orisa> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0093
Adj R-squared:     0.0083

Rmse:           1497.8272

F-stat (1, 1062):     9.9289, p-value:     0.0017

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
         Orisa   330.3869   104.8511       3.15     0.0017   124.8787   535.8951
     intercept  2799.2480    47.1600      59.36     0.0000  2706.8145  2891.6816
---------------------------------End of Summary---------------------------------
Pharah

In [23]:
df = pd.DataFrame({"Rank": rankFiltered, "Pharah": pharahHours})
res = ols(y = df['Rank'], x = df[['Pharah']])
res


Out[23]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Pharah> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0297
Adj R-squared:     0.0288

Rmse:           1482.3090

F-stat (1, 1062):    32.4902, p-value:     0.0000

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
        Pharah    22.1017     3.8775       5.70     0.0000    14.5018    29.7016
     intercept  2668.2139    53.8704      49.53     0.0000  2562.6278  2773.7999
---------------------------------End of Summary---------------------------------
Reaper

In [24]:
df = pd.DataFrame({"Rank": rankFiltered, "Reaper": reaperHours})
res = ols(y = df['Rank'], x = df[['Reaper']])
res


Out[24]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Reaper> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0098
Adj R-squared:     0.0089

Rmse:           1497.4018

F-stat (1, 1062):    10.5379, p-value:     0.0012

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
        Reaper    15.6313     4.8152       3.25     0.0012     6.1934    25.0691
     intercept  2730.8212    55.6807      49.04     0.0000  2621.6870  2839.9554
---------------------------------End of Summary---------------------------------
Reinhardt

In [25]:
df = pd.DataFrame({"Rank": rankFiltered, "Reinhardt": reinhardtHours})
res = ols(y = df['Rank'], x = df[['Reinhardt']])
res


Out[25]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Reinhardt> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0300
Adj R-squared:     0.0290

Rmse:           1482.1065

F-stat (1, 1062):    32.7894, p-value:     0.0000

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
     Reinhardt    22.7814     3.9784       5.73     0.0000    14.9836    30.5791
     intercept  2664.6754    54.1276      49.23     0.0000  2558.5854  2770.7654
---------------------------------End of Summary---------------------------------
Roadhog

In [26]:
df = pd.DataFrame({"Rank": rankFiltered, "Roadhog": roadhogHours})
res = ols(y = df['Rank'], x = df[['Roadhog']])
res


Out[26]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Roadhog> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0635
Adj R-squared:     0.0626

Rmse:           1456.2849

F-stat (1, 1062):    71.9573, p-value:     0.0000

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
       Roadhog    26.5789     3.1333       8.48     0.0000    20.4377    32.7202
     intercept  2582.2869    53.5494      48.22     0.0000  2477.3300  2687.2437
---------------------------------End of Summary---------------------------------
Soldier76

In [27]:
df = pd.DataFrame({"Rank": rankFiltered, "Soldier76": soldier76Hours})
res = ols(y = df['Rank'], x = df[['Soldier76']])
res


Out[27]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Soldier76> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0371
Adj R-squared:     0.0361

Rmse:           1476.6687

F-stat (1, 1062):    40.8673, p-value:     0.0000

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
     Soldier76    29.9659     4.6875       6.39     0.0000    20.7785    39.1534
     intercept  2579.0858    60.2364      42.82     0.0000  2461.0224  2697.1493
---------------------------------End of Summary---------------------------------
Sombra

In [28]:
df = pd.DataFrame({"Rank": rankFiltered, "Sombra": sombraHours})
res = ols(y = df['Rank'], x = df[['Sombra']])
res


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-28-48209a1a53f6> in <module>()
----> 1 df = pd.DataFrame({"Rank": rankFiltered, "Sombra": sombraHours})
      2 res = ols(y = df['Rank'], x = df[['Sombra']])
      3 res

NameError: name 'sombraHours' is not defined
Symmetra

In [29]:
df = pd.DataFrame({"Rank": rankFiltered, "Symmetra": symmetraHours})
res = ols(y = df['Rank'], x = df[['Symmetra']])
res


Out[29]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Symmetra> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0068
Adj R-squared:     0.0059

Rmse:           1499.6555

F-stat (1, 1062):     7.3167, p-value:     0.0069

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
      Symmetra    18.1636     6.7150       2.70     0.0069     5.0023    31.3250
     intercept  2784.7629    49.3278      56.45     0.0000  2688.0805  2881.4454
---------------------------------End of Summary---------------------------------
Torbjorn

In [30]:
df = pd.DataFrame({"Rank": rankFiltered, "Torbjorn": torbjornHours})
res = ols(y = df['Rank'], x = df[['Torbjorn']])
res


Out[30]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Torbjorn> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0028
Adj R-squared:     0.0018

Rmse:           1502.7194

F-stat (1, 1062):     2.9607, p-value:     0.0856

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
      Torbjorn    13.5120     7.8527       1.72     0.0856    -1.8794    28.9033
     intercept  2786.0281    53.5838      51.99     0.0000  2681.0039  2891.0523
---------------------------------End of Summary---------------------------------
Tracer

In [31]:
df = pd.DataFrame({"Rank": rankFiltered, "Tracer": tracerHours})
res = ols(y = df['Rank'], x = df[['Tracer']])
res


Out[31]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Tracer> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0436
Adj R-squared:     0.0427

Rmse:           1471.6655

F-stat (1, 1062):    48.3788, p-value:     0.0000

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
        Tracer    22.2959     3.2055       6.96     0.0000    16.0131    28.5787
     intercept  2639.4012    53.0206      49.78     0.0000  2535.4809  2743.3215
---------------------------------End of Summary---------------------------------
Widowmaker

In [32]:
df = pd.DataFrame({"Rank": rankFiltered, "Widowmaker": widowmakerHours})
res = ols(y = df['Rank'], x = df[['Widowmaker']])
res


Out[32]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Widowmaker> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0522
Adj R-squared:     0.0513

Rmse:           1465.0260

F-stat (1, 1062):    58.4662, p-value:     0.0000

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
    Widowmaker    24.2866     3.1762       7.65     0.0000    18.0611    30.5120
     intercept  2660.3513    50.2763      52.91     0.0000  2561.8097  2758.8929
---------------------------------End of Summary---------------------------------
Winston

In [33]:
df = pd.DataFrame({"Rank": rankFiltered, "Winston": winstonHours})
res = ols(y = df['Rank'], x = df[['Winston']])
res


Out[33]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Winston> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0208
Adj R-squared:     0.0199

Rmse:           1489.0929

F-stat (1, 1062):    22.5405, p-value:     0.0000

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
       Winston    27.8490     5.8658       4.75     0.0000    16.3520    39.3459
     intercept  2739.5144    49.7263      55.09     0.0000  2642.0508  2836.9780
---------------------------------End of Summary---------------------------------
Zarya

In [34]:
df = pd.DataFrame({"Rank": rankFiltered, "Zarya": zaryaHours})
res = ols(y = df['Rank'], x = df[['Zarya']])
res


Out[34]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Zarya> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0584
Adj R-squared:     0.0576

Rmse:           1460.1769

F-stat (1, 1062):    65.9204, p-value:     0.0000

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
         Zarya    34.4953     4.2486       8.12     0.0000    26.1679    42.8226
     intercept  2582.2330    54.3938      47.47     0.0000  2475.6211  2688.8449
---------------------------------End of Summary---------------------------------
Zenyatta

In [35]:
df = pd.DataFrame({"Rank": rankFiltered, "Zenyatta": zenyattaHours})
res = ols(y = df['Rank'], x = df[['Zenyatta']])
res


Out[35]:
-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <Zenyatta> + <intercept>

Number of Observations:         1064
Number of Degrees of Freedom:   2

R-squared:         0.0213
Adj R-squared:     0.0204

Rmse:           1488.7173

F-stat (1, 1062):    23.0879, p-value:     0.0000

Degrees of Freedom: model 1, resid 1062

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
      Zenyatta    24.9214     5.1866       4.80     0.0000    14.7557    35.0871
     intercept  2700.1813    53.3701      50.59     0.0000  2595.5758  2804.7867
---------------------------------End of Summary---------------------------------

Graphs


In [36]:
rankdata=[x for x in data['rank'] if x <1E100]# is x < 'infinity'
ranks = [x for x in rankdata if x > 0]
import matplotlib.pyplot as plt
%matplotlib inline
plt.plot(rankdata)
plt.show()