Initialisation of Variables

Imports


In [142]:
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")
data = pd.read_json("OverwatchTotal.json")

In [143]:
data = data[pd.notnull(data['rank'])]
len(data)


Out[143]:
7873

Arrays


In [144]:
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', {})]
[len(rank), len(level), len(comp), len(qp), len(heroes)]


Out[144]:
[7873, 7873, 7873, 7873, 7873]

Functions


In [145]:
def getCompWins(x):
    b = x.get('total', {})
    return(b.get('wins', {}))
def getWinRate(x):
    b = x.get('total', {})
    return(b.get('rate', {}))
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)
def filterFloats(x):
    if type(x) == float:
        return(x)
    else:
        return(0)
def filterInts(x):
    if type(x) == int:
        return(x)
    else:
        return(0)

Parameters


In [146]:
compWins = [getCompWins(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]
rank=[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]
avg = [getAvgElims(x) for x in comp]
total = [getTotalElims(x) for x in comp]
most = [getMostElims(x) for x in comp]
avgElims = [filterFloats(x) for x in avg]
totalElims = [filterInts(x) for x in total]
mostElims = [filterInts(x) for x in most]
winRate = [getWinRate(x) for x in comp]

In [147]:
df = pd.DataFrame({"Rank": rank, "Level": level, "Comp Wins": compWins, "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, "Sombra": sombraHours, "Symmetra": symmetraHours, "Torbjorn": torbjornHours, "Tracer": tracerHours, "Widowmaker": widowmakerHours, "Winston": winstonHours, "Zarya": zaryaHours, "Zenyatta": zenyattaHours})
res = ols(y = df['Rank'], x = df[['Level','Comp Wins', 'Quick Games', 'Ana', 'Bastion', 'D.Va', 'Genji', 'Hanzo', 'Junkrat', 'Lucio', 'McCree', 'Mei', 'Mercy', 'Orisa', 'Pharah', 'Reaper', 'Reinhardt', 'Roadhog', 'Soldier76', 'Sombra', 'Symmetra', 'Torbjorn', 'Tracer', 'Widowmaker', 'Winston', 'Zarya', 'Zenyatta']])
res


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

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

Number of Observations:         7870
Number of Degrees of Freedom:   28

R-squared:         0.2326
Adj R-squared:     0.2300

Rmse:           1159.9396

F-stat (27, 7842):    88.0530, p-value:     0.0000

Degrees of Freedom: model 27, resid 7842

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
         Level    -0.4520     0.4642      -0.97     0.3303    -1.3618     0.4579
     Comp Wins     4.0238     0.7309       5.51     0.0000     2.5912     5.4564
   Quick Games     0.7088     0.2249       3.15     0.0016     0.2681     1.1495
           Ana     6.2275     2.3451       2.66     0.0079     1.6311    10.8239
       Bastion    -1.3552     3.3190      -0.41     0.6831    -7.8603     5.1500
--------------------------------------------------------------------------------
          D.Va    -7.4722     2.0624      -3.62     0.0003   -11.5145    -3.4299
         Genji     2.2586     1.9219       1.18     0.2400    -1.5083     6.0256
         Hanzo    -2.2140     2.2461      -0.99     0.3243    -6.6165     2.1884
       Junkrat   -14.6296     2.2933      -6.38     0.0000   -19.1245   -10.1348
         Lucio    -9.8265     1.9875      -4.94     0.0000   -13.7220    -5.9311
--------------------------------------------------------------------------------
        McCree    10.0128     2.3052       4.34     0.0000     5.4946    14.5311
           Mei     0.7309     2.8191       0.26     0.7954    -4.7945     6.2564
         Mercy    -2.8258     1.8143      -1.56     0.1194    -6.3819     0.7303
         Orisa     9.8645    21.4646       0.46     0.6458   -32.2061    51.9351
        Pharah    -4.5233     2.1198      -2.13     0.0329    -8.6781    -0.3686
--------------------------------------------------------------------------------
        Reaper   -16.4491     2.3986      -6.86     0.0000   -21.1505   -11.7478
     Reinhardt    -3.9255     2.1737      -1.81     0.0710    -8.1860     0.3351
       Roadhog     6.2024     2.1809       2.84     0.0045     1.9279    10.4769
     Soldier76    -5.0448     2.2289      -2.26     0.0236    -9.4134    -0.6761
        Sombra    -1.1870     3.4498      -0.34     0.7308    -7.9487     5.5747
--------------------------------------------------------------------------------
      Symmetra    -7.8255     2.5599      -3.06     0.0022   -12.8429    -2.8081
      Torbjorn   -14.8063     2.7577      -5.37     0.0000   -20.2114    -9.4011
        Tracer     3.0980     2.0343       1.52     0.1278    -0.8893     7.0853
    Widowmaker    -0.8882     2.1292      -0.42     0.6766    -5.0614     3.2850
       Winston     1.1421     3.4443       0.33     0.7402    -5.6088     7.8930
--------------------------------------------------------------------------------
         Zarya     2.3474     2.2440       1.05     0.2956    -2.0509     6.7457
      Zenyatta    -6.1863     2.4545      -2.52     0.0117   -10.9971    -1.3755
     intercept  2087.9565    35.5143      58.79     0.0000  2018.3484  2157.5647
---------------------------------End of Summary---------------------------------

Analytics

Sample size of 8630 players

MLS Fit for all set of parameters


In [148]:
df = pd.DataFrame({"Rank": rank, "Level": level, "Comp Wins": compWins, "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, "Sombra": sombraHours, "Symmetra": symmetraHours, "Torbjorn": torbjornHours, "Tracer": tracerHours, "Widowmaker": widowmakerHours, "Winston": winstonHours, "Zarya": zaryaHours, "Zenyatta": zenyattaHours})
res = ols(y = df['Rank'], x = df[['Level','Comp Wins', 'Quick Games', 'Ana', 'Bastion', 'D.Va', 'Genji', 'Hanzo', 'Junkrat', 'Lucio', 'McCree', 'Mei', 'Mercy', 'Orisa', 'Pharah', 'Reaper', 'Reinhardt', 'Roadhog', 'Soldier76', 'Sombra', 'Symmetra', 'Torbjorn', 'Tracer', 'Widowmaker', 'Winston', 'Zarya', 'Zenyatta']])
res


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

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

Number of Observations:         7870
Number of Degrees of Freedom:   28

R-squared:         0.2326
Adj R-squared:     0.2300

Rmse:           1159.9396

F-stat (27, 7842):    88.0530, p-value:     0.0000

Degrees of Freedom: model 27, resid 7842

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
         Level    -0.4520     0.4642      -0.97     0.3303    -1.3618     0.4579
     Comp Wins     4.0238     0.7309       5.51     0.0000     2.5912     5.4564
   Quick Games     0.7088     0.2249       3.15     0.0016     0.2681     1.1495
           Ana     6.2275     2.3451       2.66     0.0079     1.6311    10.8239
       Bastion    -1.3552     3.3190      -0.41     0.6831    -7.8603     5.1500
--------------------------------------------------------------------------------
          D.Va    -7.4722     2.0624      -3.62     0.0003   -11.5145    -3.4299
         Genji     2.2586     1.9219       1.18     0.2400    -1.5083     6.0256
         Hanzo    -2.2140     2.2461      -0.99     0.3243    -6.6165     2.1884
       Junkrat   -14.6296     2.2933      -6.38     0.0000   -19.1245   -10.1348
         Lucio    -9.8265     1.9875      -4.94     0.0000   -13.7220    -5.9311
--------------------------------------------------------------------------------
        McCree    10.0128     2.3052       4.34     0.0000     5.4946    14.5311
           Mei     0.7309     2.8191       0.26     0.7954    -4.7945     6.2564
         Mercy    -2.8258     1.8143      -1.56     0.1194    -6.3819     0.7303
         Orisa     9.8645    21.4646       0.46     0.6458   -32.2061    51.9351
        Pharah    -4.5233     2.1198      -2.13     0.0329    -8.6781    -0.3686
--------------------------------------------------------------------------------
        Reaper   -16.4491     2.3986      -6.86     0.0000   -21.1505   -11.7478
     Reinhardt    -3.9255     2.1737      -1.81     0.0710    -8.1860     0.3351
       Roadhog     6.2024     2.1809       2.84     0.0045     1.9279    10.4769
     Soldier76    -5.0448     2.2289      -2.26     0.0236    -9.4134    -0.6761
        Sombra    -1.1870     3.4498      -0.34     0.7308    -7.9487     5.5747
--------------------------------------------------------------------------------
      Symmetra    -7.8255     2.5599      -3.06     0.0022   -12.8429    -2.8081
      Torbjorn   -14.8063     2.7577      -5.37     0.0000   -20.2114    -9.4011
        Tracer     3.0980     2.0343       1.52     0.1278    -0.8893     7.0853
    Widowmaker    -0.8882     2.1292      -0.42     0.6766    -5.0614     3.2850
       Winston     1.1421     3.4443       0.33     0.7402    -5.6088     7.8930
--------------------------------------------------------------------------------
         Zarya     2.3474     2.2440       1.05     0.2956    -2.0509     6.7457
      Zenyatta    -6.1863     2.4545      -2.52     0.0117   -10.9971    -1.3755
     intercept  2087.9565    35.5143      58.79     0.0000  2018.3484  2157.5647
---------------------------------End of Summary---------------------------------

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


In [149]:
df = pd.DataFrame({"Rank": rank, "Comp Wins": compWins, "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, "Sombra": sombraHours, "Symmetra": symmetraHours, "Torbjorn": torbjornHours, "Tracer": tracerHours, "Widowmaker": widowmakerHours, "Winston": winstonHours, "Zarya": zaryaHours, "Zenyatta": zenyattaHours})
res = ols(y = df['Rank'], x = df[['Comp Wins', 'Ana', 'Bastion', 'D.Va', 'Genji', 'Hanzo', 'Junkrat', 'Lucio', 'McCree', 'Mei', 'Mercy', 'Pharah', 'Reaper', 'Reinhardt', 'Roadhog', 'Soldier76', 'Sombra', 'Symmetra', 'Torbjorn', 'Tracer', 'Widowmaker', 'Winston', 'Zarya', 'Zenyatta']])
res


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

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

Number of Observations:         7870
Number of Degrees of Freedom:   25

R-squared:         0.2315
Adj R-squared:     0.2292

Rmse:           1160.5743

F-stat (24, 7845):    98.4691, p-value:     0.0000

Degrees of Freedom: model 24, resid 7845

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
     Comp Wins     1.8128     0.2220       8.17     0.0000     1.3777     2.2480
           Ana    11.8473     1.5455       7.67     0.0000     8.8180    14.8765
       Bastion     4.5862     2.7488       1.67     0.0953    -0.8015     9.9739
          D.Va    -1.8431     1.0732      -1.72     0.0860    -3.9466     0.2605
         Genji     7.8673     0.7269      10.82     0.0000     6.4426     9.2921
--------------------------------------------------------------------------------
         Hanzo     3.3527     1.4120       2.37     0.0176     0.5852     6.1202
       Junkrat    -9.0719     1.4711      -6.17     0.0000   -11.9552    -6.1886
         Lucio    -4.3774     0.9740      -4.49     0.0000    -6.2865    -2.4684
        McCree    16.1664     1.2260      13.19     0.0000    13.7635    18.5694
           Mei     6.4568     2.1566       2.99     0.0028     2.2299    10.6836
--------------------------------------------------------------------------------
         Mercy     2.6798     0.4891       5.48     0.0000     1.7212     3.6385
        Pharah     1.1240     1.1370       0.99     0.3229    -1.1046     3.3526
        Reaper   -10.8676     1.6303      -6.67     0.0000   -14.0630    -7.6723
     Reinhardt     1.5749     1.3334       1.18     0.2376    -1.0386     4.1884
       Roadhog    11.8586     1.2789       9.27     0.0000     9.3520    14.3652
--------------------------------------------------------------------------------
     Soldier76     0.5599     1.3496       0.41     0.6783    -2.0853     3.2051
        Sombra     4.3221     3.0108       1.44     0.1512    -1.5791    10.2233
      Symmetra    -2.2872     1.8945      -1.21     0.2274    -6.0005     1.4261
      Torbjorn    -9.2162     2.1127      -4.36     0.0000   -13.3571    -5.0753
        Tracer     8.5667     1.0386       8.25     0.0000     6.5311    10.6023
--------------------------------------------------------------------------------
    Widowmaker     4.8999     1.0608       4.62     0.0000     2.8207     6.9792
       Winston     7.0895     2.9003       2.44     0.0145     1.4049    12.7741
         Zarya     8.0909     1.3296       6.09     0.0000     5.4848    10.6970
      Zenyatta    -0.5345     1.6852      -0.32     0.7511    -3.8375     2.7684
     intercept  2101.2480    23.0972      90.97     0.0000  2055.9776  2146.5184
---------------------------------End of Summary---------------------------------

MLS Fit for Low Ranked Players 0 - 1666 SR


In [150]:
df = pd.DataFrame({"Rank": lowRank, "Comp Wins": compWins, "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, "Sombra": sombraHours, "Symmetra": symmetraHours, "Torbjorn": torbjornHours, "Tracer": tracerHours, "Widowmaker": widowmakerHours, "Winston": winstonHours, "Zarya": zaryaHours, "Zenyatta": zenyattaHours})
res = ols(y = df['Rank'], x = df[['Comp Wins', 'Ana', 'Bastion', 'D.Va', 'Genji', 'Hanzo', 'Junkrat', 'Lucio', 'McCree', 'Mei', 'Mercy', 'Pharah', 'Reaper', 'Reinhardt', 'Roadhog', 'Soldier76', 'Sombra', 'Symmetra', 'Torbjorn', 'Tracer', 'Widowmaker', 'Winston', 'Zarya', 'Zenyatta']])
res


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

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

Number of Observations:         7870
Number of Degrees of Freedom:   25

R-squared:         0.0607
Adj R-squared:     0.0579

Rmse:            382.7377

F-stat (24, 7845):    21.1387, p-value:     0.0000

Degrees of Freedom: model 24, resid 7845

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
     Comp Wins    -0.4124     0.0732      -5.63     0.0000    -0.5559    -0.2689
           Ana     0.2039     0.5097       0.40     0.6891    -0.7951     1.2029
       Bastion     1.0935     0.9065       1.21     0.2277    -0.6833     2.8703
          D.Va     1.8390     0.3539       5.20     0.0000     1.1453     2.5327
         Genji    -0.8122     0.2397      -3.39     0.0007    -1.2820    -0.3423
--------------------------------------------------------------------------------
         Hanzo    -0.4495     0.4657      -0.97     0.3344    -1.3622     0.4631
       Junkrat     2.4632     0.4851       5.08     0.0000     1.5124     3.4141
         Lucio    -0.0544     0.3212      -0.17     0.8655    -0.6840     0.5752
        McCree    -2.2380     0.4043      -5.54     0.0000    -3.0304    -1.4455
           Mei    -1.4594     0.7112      -2.05     0.0402    -2.8533    -0.0654
--------------------------------------------------------------------------------
         Mercy    -0.5015     0.1613      -3.11     0.0019    -0.8177    -0.1854
        Pharah    -0.3590     0.3750      -0.96     0.3384    -1.0939     0.3760
        Reaper    -1.3405     0.5376      -2.49     0.0127    -2.3943    -0.2868
     Reinhardt    -0.4657     0.4397      -1.06     0.2897    -1.3275     0.3962
       Roadhog    -1.3491     0.4218      -3.20     0.0014    -2.1758    -0.5225
--------------------------------------------------------------------------------
     Soldier76     0.6024     0.4451       1.35     0.1760    -0.2700     1.4747
        Sombra    -0.2526     0.9929      -0.25     0.7992    -2.1987     1.6935
      Symmetra     0.1097     0.6248       0.18     0.8606    -1.1148     1.3343
      Torbjorn    -0.9654     0.6967      -1.39     0.1659    -2.3310     0.4002
        Tracer    -1.9572     0.3425      -5.71     0.0000    -2.6285    -1.2859
--------------------------------------------------------------------------------
    Widowmaker    -0.6036     0.3498      -1.73     0.0845    -1.2893     0.0820
       Winston    -1.9281     0.9565      -2.02     0.0438    -3.8028    -0.0535
         Zarya    -1.3318     0.4385      -3.04     0.0024    -2.1912    -0.4724
      Zenyatta     0.0929     0.5558       0.17     0.8673    -0.9964     1.1822
     intercept   237.2287     7.6171      31.14     0.0000   222.2992   252.1581
---------------------------------End of Summary---------------------------------

MLS Fit for Medium Ranked Players 1666 - 3332 SR


In [151]:
df = pd.DataFrame({"Rank": medRank, "Comp Wins": compWins, "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, "Sombra": sombraHours, "Symmetra": symmetraHours, "Torbjorn": torbjornHours, "Tracer": tracerHours, "Widowmaker": widowmakerHours, "Winston": winstonHours, "Zarya": zaryaHours, "Zenyatta": zenyattaHours})
res = ols(y = df['Rank'], x = df[['Comp Wins', 'Ana', 'Bastion', 'D.Va', 'Genji', 'Hanzo', 'Junkrat', 'Lucio', 'McCree', 'Mei', 'Mercy', 'Pharah', 'Reaper', 'Reinhardt', 'Roadhog', 'Soldier76', 'Sombra', 'Symmetra', 'Torbjorn', 'Tracer', 'Widowmaker', 'Winston', 'Zarya', 'Zenyatta']])
res


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

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

Number of Observations:         7870
Number of Degrees of Freedom:   25

R-squared:         0.0864
Adj R-squared:     0.0836

Rmse:           1229.7668

F-stat (24, 7845):    30.9214, p-value:     0.0000

Degrees of Freedom: model 24, resid 7845

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
     Comp Wins    -1.9140     0.2352      -8.14     0.0000    -2.3750    -1.4529
           Ana     4.4979     1.6377       2.75     0.0060     1.2880     7.7077
       Bastion     8.2434     2.9127       2.83     0.0047     2.5345    13.9523
          D.Va     5.7805     1.1372       5.08     0.0000     3.5516     8.0094
         Genji    -4.1078     0.7702      -5.33     0.0000    -5.6174    -2.5981
--------------------------------------------------------------------------------
         Hanzo     2.3268     1.4962       1.56     0.1199    -0.6057     5.2593
       Junkrat     2.7787     1.5588       1.78     0.0747    -0.2765     5.8339
         Lucio    -2.4478     1.0321      -2.37     0.0177    -4.4707    -0.4249
        McCree   -11.4782     1.2991      -8.84     0.0000   -14.0244    -8.9320
           Mei     1.2401     2.2851       0.54     0.5874    -3.2388     5.7189
--------------------------------------------------------------------------------
         Mercy    -3.1541     0.5183      -6.09     0.0000    -4.1699    -2.1382
        Pharah    -2.0997     1.2048      -1.74     0.0814    -4.4612     0.2618
        Reaper     1.4412     1.7275       0.83     0.4041    -1.9446     4.8271
     Reinhardt     7.8135     1.4129       5.53     0.0000     5.0442    10.5828
       Roadhog    -6.3360     1.3551      -4.68     0.0000    -8.9920    -3.6800
--------------------------------------------------------------------------------
     Soldier76     1.3807     1.4301       0.97     0.3343    -1.4223     4.1836
        Sombra    17.2410     3.1903       5.40     0.0000    10.9880    23.4940
      Symmetra     3.3530     2.0075       1.67     0.0949    -0.5816     7.2877
      Torbjorn    -7.4256     2.2387      -3.32     0.0009   -11.8134    -3.0379
        Tracer    -4.8701     1.1005      -4.43     0.0000    -7.0271    -2.7131
--------------------------------------------------------------------------------
    Widowmaker    -6.8672     1.1241      -6.11     0.0000    -9.0703    -4.6640
       Winston   -13.2531     3.0732      -4.31     0.0000   -19.2766    -7.2296
         Zarya    -3.5868     1.4089      -2.55     0.0109    -6.3482    -0.8253
      Zenyatta     8.3514     1.7857       4.68     0.0000     4.8515    11.8513
     intercept  1384.3714    24.4742      56.56     0.0000  1336.4020  1432.3409
---------------------------------End of Summary---------------------------------

MLS Fit for High Ranked Players 3332 - 5000 SR


In [152]:
df = pd.DataFrame({"Rank": highRank, "Comp Wins": compWins, "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, "Sombra": sombraHours, "Symmetra": symmetraHours, "Torbjorn": torbjornHours, "Tracer": tracerHours, "Widowmaker": widowmakerHours, "Winston": winstonHours, "Zarya": zaryaHours, "Zenyatta": zenyattaHours})
res = ols(y = df['Rank'], x = df[['Comp Wins', 'Ana', 'Bastion', 'D.Va', 'Genji', 'Hanzo', 'Junkrat', 'Lucio', 'McCree', 'Mei', 'Mercy', 'Pharah', 'Reaper', 'Reinhardt', 'Roadhog', 'Soldier76', 'Sombra', 'Symmetra', 'Torbjorn', 'Tracer', 'Widowmaker', 'Winston', 'Zarya', 'Zenyatta']])
res


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

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

Number of Observations:         7870
Number of Degrees of Freedom:   25

R-squared:         0.2819
Adj R-squared:     0.2797

Rmse:           1673.1881

F-stat (24, 7845):   128.3151, p-value:     0.0000

Degrees of Freedom: model 24, resid 7845

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
     Comp Wins     4.1392     0.3201      12.93     0.0000     3.5118     4.7665
           Ana     7.1455     2.2282       3.21     0.0013     2.7782    11.5127
       Bastion    -4.7508     3.9630      -1.20     0.2306   -12.5182     3.0167
          D.Va    -9.4626     1.5473      -6.12     0.0000   -12.4952    -6.4299
         Genji    12.7873     1.0480      12.20     0.0000    10.7333    14.8413
--------------------------------------------------------------------------------
         Hanzo     1.4755     2.0357       0.72     0.4686    -2.5144     5.4653
       Junkrat   -14.3138     2.1208      -6.75     0.0000   -18.4706   -10.1570
         Lucio    -1.8752     1.4042      -1.34     0.1818    -4.6275     0.8771
        McCree    29.8826     1.7675      16.91     0.0000    26.4183    33.3469
           Mei     6.6761     3.1091       2.15     0.0318     0.5823    12.7699
--------------------------------------------------------------------------------
         Mercy     6.3354     0.7052       8.98     0.0000     4.9533     7.7175
        Pharah     3.5826     1.6393       2.19     0.0289     0.3697     6.7956
        Reaper   -10.9683     2.3503      -4.67     0.0000   -15.5750    -6.3616
     Reinhardt    -5.7730     1.9224      -3.00     0.0027    -9.5408    -2.0052
       Roadhog    19.5437     1.8437      10.60     0.0000    15.9300    23.1575
--------------------------------------------------------------------------------
     Soldier76    -1.4232     1.9457      -0.73     0.4645    -5.2368     2.3904
        Sombra   -12.6663     4.3406      -2.92     0.0035   -21.1739    -4.1586
      Symmetra    -5.7500     2.7313      -2.11     0.0353   -11.1034    -0.3966
      Torbjorn    -0.8252     3.0459      -0.27     0.7865    -6.7951     5.1447
        Tracer    15.3940     1.4973      10.28     0.0000    12.4593    18.3288
--------------------------------------------------------------------------------
    Widowmaker    12.3707     1.5294       8.09     0.0000     9.3732    15.3683
       Winston    22.2708     4.1813       5.33     0.0000    14.0754    30.4662
         Zarya    13.0095     1.9169       6.79     0.0000     9.2523    16.7667
      Zenyatta    -8.9789     2.4295      -3.70     0.0002   -13.7408    -4.2170
     intercept   479.6479    33.2989      14.40     0.0000   414.3820   544.9138
---------------------------------End of Summary---------------------------------

MLS Fit for Elimations


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


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

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

Number of Observations:         7873
Number of Degrees of Freedom:   4

R-squared:         0.0948
Adj R-squared:     0.0945

Rmse:           1258.5762

F-stat (3, 7869):   274.8611, p-value:     0.0000

Degrees of Freedom: model 3, resid 7869

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
     Avg Elims    38.1039     2.4664      15.45     0.0000    33.2698    42.9381
   Total Elims     0.0661     0.0054      12.16     0.0000     0.0555     0.0768
    Most Elims     1.2263     1.4681       0.84     0.4035    -1.6510     4.1037
     intercept  1627.8030    63.4139      25.67     0.0000  1503.5117  1752.0943
---------------------------------End of Summary---------------------------------

MLS Fit for Elimations against Role (Offense)


In [154]:
df = pd.DataFrame({"Avg Elims": avgElims, "Genji": genjiHours, "McCree": mccreeHours, "Pharah": pharahHours, "Reaper": reaperHours, "Soldier76": soldier76Hours, "Sombra": sombraHours, "Tracer": tracerHours})
res = ols(y = df['Avg Elims'], x = df[['Genji', 'McCree', 'Pharah', 'Reaper', 'Soldier76', 'Sombra', 'Tracer']])
res


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

Formula: Y ~ <Genji> + <McCree> + <Pharah> + <Reaper> + <Soldier76> + <Sombra>
             + <Tracer> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   8

R-squared:         0.1173
Adj R-squared:     0.1165

Rmse:              6.9353

F-stat (7, 7865):   149.3331, p-value:     0.0000

Degrees of Freedom: model 7, resid 7865

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
         Genji     0.0396     0.0042       9.50     0.0000     0.0314     0.0477
        McCree     0.0904     0.0068      13.28     0.0000     0.0771     0.1038
        Pharah     0.0244     0.0066       3.69     0.0002     0.0114     0.0373
        Reaper     0.0025     0.0094       0.27     0.7875    -0.0158     0.0209
     Soldier76     0.0761     0.0077       9.82     0.0000     0.0609     0.0913
--------------------------------------------------------------------------------
        Sombra    -0.1662     0.0169      -9.81     0.0000    -0.1994    -0.1330
        Tracer     0.0350     0.0060       5.82     0.0000     0.0232     0.0467
     intercept    19.4793     0.1144     170.29     0.0000    19.2551    19.7035
---------------------------------End of Summary---------------------------------

MLS Fit for Elimations against Role (Defense)


In [155]:
df = pd.DataFrame({"Avg Elims": avgElims, "Bastion": bastionHours, "Hanzo": hanzoHours, "Junkrat": junkratHours, "Mei": meiHours, "Torbjorn": torbjornHours, "Widowmaker": widowmakerHours, })
res = ols(y = df['Avg Elims'], x = df[['Bastion', 'Hanzo', 'Junkrat', 'Mei', 'Torbjorn', 'Widowmaker']])
res


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

Formula: Y ~ <Bastion> + <Hanzo> + <Junkrat> + <Mei> + <Torbjorn> + <Widowmaker>
             + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   7

R-squared:         0.0296
Adj R-squared:     0.0288

Rmse:              7.2714

F-stat (6, 7866):    39.9288, p-value:     0.0000

Degrees of Freedom: model 6, resid 7866

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
       Bastion     0.0555     0.0167       3.31     0.0009     0.0227     0.0883
         Hanzo     0.0818     0.0081      10.09     0.0000     0.0659     0.0977
       Junkrat    -0.0506     0.0090      -5.63     0.0000    -0.0682    -0.0330
           Mei    -0.0734     0.0124      -5.92     0.0000    -0.0976    -0.0491
      Torbjorn     0.0057     0.0128       0.45     0.6554    -0.0194     0.0308
--------------------------------------------------------------------------------
    Widowmaker     0.0418     0.0061       6.82     0.0000     0.0298     0.0538
     intercept    21.1374     0.1171     180.58     0.0000    20.9079    21.3668
---------------------------------End of Summary---------------------------------

MLS Fit for Eliminations against Role (Tank)


In [156]:
df = pd.DataFrame({"Avg Elims": avgElims, "D.Va": dvaHours, "Reinhardt": reinhardtHours, "Roadhog": roadhogHours, "Winston": winstonHours, "Zarya": zaryaHours})
res = ols(y = df['Avg Elims'], x = df[['D.Va', 'Reinhardt', 'Roadhog', 'Winston', 'Zarya']])
res


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

Formula: Y ~ <D.Va> + <Reinhardt> + <Roadhog> + <Winston> + <Zarya>
             + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   6

R-squared:         0.0543
Adj R-squared:     0.0537

Rmse:              7.1776

F-stat (5, 7867):    90.3517, p-value:     0.0000

Degrees of Freedom: model 5, resid 7867

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
          D.Va    -0.0598     0.0061      -9.75     0.0000    -0.0718    -0.0477
     Reinhardt    -0.0569     0.0081      -7.06     0.0000    -0.0727    -0.0411
       Roadhog     0.1018     0.0074      13.75     0.0000     0.0873     0.1163
       Winston     0.0259     0.0175       1.48     0.1387    -0.0084     0.0601
         Zarya     0.0681     0.0078       8.75     0.0000     0.0528     0.0833
--------------------------------------------------------------------------------
     intercept    21.0640     0.1105     190.66     0.0000    20.8474    21.2805
---------------------------------End of Summary---------------------------------

MLS Fit for Eliminations against Role (Support)


In [157]:
df = pd.DataFrame({"Avg Elims": avgElims, "Ana": anaHours, "Lucio": lucioHours, "Mercy": mercyHours, "Symmetra": symmetraHours, "Zenyatta": zenyattaHours})
res = ols(y = df['Avg Elims'], x = df[['Ana', 'Lucio', 'Mercy', 'Symmetra', 'Zenyatta']])
res


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

Formula: Y ~ <Ana> + <Lucio> + <Mercy> + <Symmetra> + <Zenyatta> + <intercept>

Number of Observations:         7870
Number of Degrees of Freedom:   6

R-squared:         0.1359
Adj R-squared:     0.1353

Rmse:              6.8576

F-stat (5, 7864):   247.2766, p-value:     0.0000

Degrees of Freedom: model 5, resid 7864

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
           Ana     0.0040     0.0085       0.47     0.6376    -0.0126     0.0206
         Lucio    -0.0548     0.0056      -9.85     0.0000    -0.0657    -0.0439
         Mercy    -0.0805     0.0028     -28.85     0.0000    -0.0860    -0.0750
      Symmetra    -0.0273     0.0105      -2.59     0.0096    -0.0479    -0.0066
      Zenyatta     0.0089     0.0096       0.93     0.3536    -0.0099     0.0278
--------------------------------------------------------------------------------
     intercept    22.8473     0.0979     233.40     0.0000    22.6554    23.0392
---------------------------------End of Summary---------------------------------

Individual Hero Playtime vs Rank

Ana

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


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

Formula: Y ~ <Ana> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0625
Adj R-squared:     0.0624

Rmse:           1280.7261

F-stat (1, 7871):   524.4768, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
           Ana    32.7604     1.4305      22.90     0.0000    29.9566    35.5642
     intercept  2520.2980    16.4500     153.21     0.0000  2488.0560  2552.5400
---------------------------------End of Summary---------------------------------
Bastion

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


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

Formula: Y ~ <Bastion> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0061
Adj R-squared:     0.0060

Rmse:           1318.6717

F-stat (1, 7871):    48.2585, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
       Bastion    20.3431     2.9284       6.95     0.0000    14.6034    26.0827
     intercept  2635.3458    17.6126     149.63     0.0000  2600.8252  2669.8664
---------------------------------End of Summary---------------------------------
D.Va

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


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

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

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0030
Adj R-squared:     0.0028

Rmse:           1320.7405

F-stat (1, 7871):    23.4681, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
          D.Va     5.3461     1.1036       4.84     0.0000     3.1831     7.5091
     intercept  2665.0936    16.6287     160.27     0.0000  2632.5013  2697.6859
---------------------------------End of Summary---------------------------------
Genji

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


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

Formula: Y ~ <Genji> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0889
Adj R-squared:     0.0887

Rmse:           1262.5723

F-stat (1, 7871):   767.6393, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
         Genji    18.5524     0.6696      27.71     0.0000    17.2400    19.8648
     intercept  2486.8636    16.1930     153.58     0.0000  2455.1254  2518.6019
---------------------------------End of Summary---------------------------------
Hanzo

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


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

Formula: Y ~ <Hanzo> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0490
Adj R-squared:     0.0489

Rmse:           1289.8937

F-stat (1, 7871):   405.5637, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
         Hanzo    27.2234     1.3518      20.14     0.0000    24.5738    29.8729
     intercept  2524.2063    16.9825     148.64     0.0000  2490.9206  2557.4920
---------------------------------End of Summary---------------------------------
Junkrat

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


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

Formula: Y ~ <Junkrat> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0000
Adj R-squared:    -0.0001

Rmse:           1322.6993

F-stat (1, 7871):     0.1042, p-value:     0.7469

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
       Junkrat    -0.4946     1.5321      -0.32     0.7469    -3.4974     2.5083
     intercept  2703.5029    16.7957     160.96     0.0000  2670.5833  2736.4225
---------------------------------End of Summary---------------------------------
Lucio

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


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

Formula: Y ~ <Lucio> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0014
Adj R-squared:     0.0013

Rmse:           1321.7714

F-stat (1, 7871):    11.1584, p-value:     0.0008

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
         Lucio     3.3443     1.0011       3.34     0.0008     1.3820     5.3065
     intercept  2673.6827    16.9944     157.33     0.0000  2640.3737  2706.9917
---------------------------------End of Summary---------------------------------
McCree

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


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

Formula: Y ~ <McCree> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.1241
Adj R-squared:     0.1240

Rmse:           1237.9241

F-stat (1, 7871):  1115.0714, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
        McCree    33.2418     0.9955      33.39     0.0000    31.2906    35.1929
     intercept  2400.5641    16.6011     144.60     0.0000  2368.0260  2433.1023
---------------------------------End of Summary---------------------------------
Mei

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


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

Formula: Y ~ <Mei> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0249
Adj R-squared:     0.0248

Rmse:           1306.1066

F-stat (1, 7871):   201.3622, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
           Mei    30.0298     2.1162      14.19     0.0000    25.8820    34.1776
     intercept  2577.5312    17.0995     150.74     0.0000  2544.0163  2611.0462
---------------------------------End of Summary---------------------------------
Mercy

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


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

Formula: Y ~ <Mercy> + <intercept>

Number of Observations:         7872
Number of Degrees of Freedom:   2

R-squared:         0.0084
Adj R-squared:     0.0083

Rmse:           1316.9037

F-stat (1, 7870):    66.5478, p-value:     0.0000

Degrees of Freedom: model 1, resid 7870

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
         Mercy     4.0307     0.4941       8.16     0.0000     3.0623     4.9991
     intercept  2661.2665    15.6344     170.22     0.0000  2630.6230  2691.9099
---------------------------------End of Summary---------------------------------
Orisa

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


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

Formula: Y ~ <Orisa> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0060
Adj R-squared:     0.0059

Rmse:           1318.7434

F-stat (1, 7871):    47.3971, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
         Orisa   155.3470    22.5646       6.88     0.0000   111.1205   199.5735
     intercept  2672.5276    15.4273     173.23     0.0000  2642.2901  2702.7652
---------------------------------End of Summary---------------------------------
Pharah

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


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

Formula: Y ~ <Pharah> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0173
Adj R-squared:     0.0171

Rmse:           1311.2359

F-stat (1, 7871):   138.3303, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
        Pharah    14.1374     1.2020      11.76     0.0000    11.7814    16.4933
     intercept  2602.6242    16.9810     153.27     0.0000  2569.3415  2635.9069
---------------------------------End of Summary---------------------------------
Reaper

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


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

Formula: Y ~ <Reaper> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0079
Adj R-squared:     0.0077

Rmse:           1317.4951

F-stat (1, 7871):    62.4089, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
        Reaper    13.0869     1.6566       7.90     0.0000     9.8400    16.3338
     intercept  2625.9272    17.6293     148.95     0.0000  2591.3738  2660.4807
---------------------------------End of Summary---------------------------------
Reinhardt

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


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

Formula: Y ~ <Reinhardt> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0148
Adj R-squared:     0.0147

Rmse:           1312.8863

F-stat (1, 7871):   118.2063, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
     Reinhardt    14.1923     1.3054      10.87     0.0000    11.6338    16.7508
     intercept  2600.9169    17.4265     149.25     0.0000  2566.7610  2635.0727
---------------------------------End of Summary---------------------------------
Roadhog

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


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

Formula: Y ~ <Roadhog> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0679
Adj R-squared:     0.0677

Rmse:           1277.0356

F-stat (1, 7871):   573.0711, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
       Roadhog    28.2518     1.1802      23.94     0.0000    25.9387    30.5649
     intercept  2481.4778    17.0656     145.41     0.0000  2448.0292  2514.9264
---------------------------------End of Summary---------------------------------
Soldier76

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


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

Formula: Y ~ <Soldier76> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0282
Adj R-squared:     0.0281

Rmse:           1303.9184

F-stat (1, 7871):   228.4783, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
     Soldier76    20.0646     1.3274      15.12     0.0000    17.4629    22.6664
     intercept  2532.4655    18.4466     137.29     0.0000  2496.3101  2568.6209
---------------------------------End of Summary---------------------------------
Sombra

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


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

Formula: Y ~ <Sombra> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0149
Adj R-squared:     0.0147

Rmse:           1312.8395

F-stat (1, 7871):   118.7757, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
        Sombra    33.9474     3.1149      10.90     0.0000    27.8423    40.0526
     intercept  2648.7650    15.5530     170.31     0.0000  2618.2812  2679.2489
---------------------------------End of Summary---------------------------------
Symmetra

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


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

Formula: Y ~ <Symmetra> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0033
Adj R-squared:     0.0031

Rmse:           1320.5400

F-stat (1, 7871):    25.8662, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
      Symmetra     9.6245     1.8924       5.09     0.0000     5.9154    13.3336
     intercept  2672.9061    15.8751     168.37     0.0000  2641.7909  2704.0213
---------------------------------End of Summary---------------------------------
Torbjorn

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


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

Formula: Y ~ <Torbjorn> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0003
Adj R-squared:     0.0002

Rmse:           1322.5163

F-stat (1, 7871):     2.2822, p-value:     0.1309

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
      Torbjorn     3.3079     2.1897       1.51     0.1309    -0.9839     7.5997
     intercept  2689.7508    16.6630     161.42     0.0000  2657.0913  2722.4104
---------------------------------End of Summary---------------------------------
Tracer

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


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

Formula: Y ~ <Tracer> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0532
Adj R-squared:     0.0531

Rmse:           1287.0509

F-stat (1, 7871):   442.1663, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
        Tracer    21.8761     1.0403      21.03     0.0000    19.8371    23.9152
     intercept  2534.7976    16.5190     153.45     0.0000  2502.4203  2567.1750
---------------------------------End of Summary---------------------------------
Widowmaker

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


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

Formula: Y ~ <Widowmaker> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0492
Adj R-squared:     0.0491

Rmse:           1289.7504

F-stat (1, 7871):   407.4023, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
    Widowmaker    20.9521     1.0380      20.18     0.0000    18.9175    22.9867
     intercept  2562.5056    16.0739     159.42     0.0000  2531.0008  2594.0104
---------------------------------End of Summary---------------------------------
Winston

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


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

Formula: Y ~ <Winston> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0283
Adj R-squared:     0.0281

Rmse:           1303.8862

F-stat (1, 7871):   228.8782, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
       Winston    40.8878     2.7027      15.13     0.0000    35.5906    46.1850
     intercept  2579.7288    16.7393     154.11     0.0000  2546.9198  2612.5378
---------------------------------End of Summary---------------------------------
Zarya

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


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

Formula: Y ~ <Zarya> + <intercept>

Number of Observations:         7873
Number of Degrees of Freedom:   2

R-squared:         0.0527
Adj R-squared:     0.0526

Rmse:           1287.3746

F-stat (1, 7871):   437.9859, p-value:     0.0000

Degrees of Freedom: model 1, resid 7871

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
         Zarya    26.7804     1.2796      20.93     0.0000    24.2723    29.2885
     intercept  2521.0245    16.8662     149.47     0.0000  2487.9668  2554.0821
---------------------------------End of Summary---------------------------------
Zenyatta

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


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

Formula: Y ~ <Zenyatta> + <intercept>

Number of Observations:         7871
Number of Degrees of Freedom:   2

R-squared:         0.0113
Adj R-squared:     0.0112

Rmse:           1314.6808

F-stat (1, 7869):    90.3112, p-value:     0.0000

Degrees of Freedom: model 1, resid 7869

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
      Zenyatta    15.9872     1.6823       9.50     0.0000    12.6899    19.2845
     intercept  2624.1335    16.9166     155.12     0.0000  2590.9771  2657.2900
---------------------------------End of Summary---------------------------------

Graphs


In [182]:
import matplotlib.pyplot as plt
%matplotlib inline
# bar = plt.bar(rank, avgElims)
plt.hist(rank, 100)
# plt.plot(rank)
plt.show()
# bar
# plt.show(bar)