Page 1 of 2 12 LastLast
Results 1 to 20 of 36

Thread: Possession and Points - the Correlation

  1. #1
    .h.'s Avatar
    Join Date
    08 Jun 05
    Posts
    19,419
    Thanked
    19,150 times
    Old name
    browha

    Europe

    25 Forum Supporter 10 years of FIF

    Possession and Points - the Correlation

    So after an argument in the Catania thread, I thought I should look into this conclusively.


    For league laliga the correlation is 0.581455779911
    For league bundesliga the correlation is 0.817586468667
    For league seriea the correlation is 0.720374529315
    For league premiership the correlation is 0.668207509533
    For league all_leagues the correlation is 0.667903561653


    Note that anything above 0.5 implies strong correlation - 0.816 is VERY VERY strong correlation. 0 implies 'no correlation'

    All Leagues



    Bundesliga


    Serie A


    La Liga


    Premiership



    The code I used to calculate this

    Code:
    from array import *
    from math import *
    from ROOT import *
    
    laliga_file = open("laliga.txt")
    premiership_file = open("premiership.txt")
    seriea_file = open("seriea.txt")
    bundesliga_file = open("bundesliga.txt")
    
    c1 = TCanvas("c1","c1",1920,1080)
    
    def plot_histo(x,y,league,names,correlation):
        active_hist=TH2F(league,league,100,-0.5,99.5,100,-0.5,99.5)
        active_hist.SetMarkerSize(10)
        for i in range(len(x)):
            active_hist.Fill(x[i],y[i])
        save_name = league
        save_name+=".png"
        active_hist.Draw("colz")
        c1.SaveAs(save_name)
    
    def calculate_correlation(x,y,names,league_name):
        xsquared=[]
        ysquared=[]
        xy=[]
        for i in range(len(x)):
            xsquared.append(x[i]*x[i])
            ysquared.append(y[i]*y[i])
            xy.append(x[i]*y[i])
        SSX=sum(xsquared)-sum(x)*sum(x)/len(x)
        SSY=sum(ysquared)-sum(y)*sum(y)/len(y)
        SSXY=sum(xy)-sum(x)*sum(y)/len(y)
        coeff = SSXY/(sqrt(SSX)*sqrt(SSY))
        plot_histo(x,y,league_name,names,coeff)
        print "For league ", league_name," the correlation is ", coeff
        return coeff
    
    
    #file_array = [laliga_file, premiership_file, seriea_file, bundesliga_file]
    file_array = [laliga_file, bundesliga_file, seriea_file, premiership_file]
    league_names = ["laliga","bundesliga","seriea","premiership"]
    club_name_array=[]
    club_possession_array=[]
    club_points_array=[]
    
    i=0
    for file in file_array:
        league_club_name = []
        league_club_possession = []
        league_club_points = []
        for line in file:
            tokens=line.split()
            club_name_array.append(tokens[0])
            club_points_array.append(float(tokens[1]))
            club_possession_array.append(float(tokens[2]))
            league_club_name.append(tokens[0])
            league_club_points.append(float(tokens[1]))
            league_club_possession.append(float(tokens[2]))
        calculate_correlation(league_club_possession,league_club_points,league_club_name,league_names[i])
        i+=1
    
    
    calculate_correlation(club_possession_array,club_points_array,club_name_array,"all_leagues")


    La Liga Data Sample
    Code:
    Barcelona 68 69.6
    Atletico 57 47.1
    RealMadrid 55 55.3
    Malaga 43 53.3
    Valencia 42 52.3
    RealSociedad 41 53.4
    RealBetis 40 47
    Getafe 38 45
    RayoVallecano 38 56.7
    Levante 35 36.4
    RealValladolid 34 50.7
    Sevilla 32 50.7
    Espanyol 32 47.8
    Bilbao 29 57.1
    Osasuna 28 47.9
    Granada 26 42.9
    Zaragoza 25 46.6
    Celta 23 49.3
    Mallorca 21 41.6
    Deportivo 17 48.3

    Serie A
    Code:
    Juventus 59 57.9
    Napoli 53  53.4
    AC 48 58.1
    Inter 47 51.3
    Lazio 47 52.1
    Fiorentina 45 56
    Roma 43 56
    Catania 42 45.8
    Udinese 40 47.3
    Sampdoria 35 44.9
    Bologna 32 47.7
    Torino 32 49.6
    Parma 32 49.7
    Cagliari 31 51.9
    Atalanta 30 47.6
    Chievo 29 46.2
    Genoa 26 44.6
    Siena 21 43.2
    Palermo 21 51.2
    Pescara 21 45.5
    Premiership
    Code:
    ManUtd 71 56.5
    ManCity 56 58.1
    Spurs 54 52
    Chelsea 52 55.5
    Arsenal 47 58.8
    Everton 45 53.2
    Liverpool 42 57.8
    Swansea 40 55.8
    WBA 40 44.9
    Fulham 33 50.3
    Stoke 33 42.8
    WestHam 33 45.5
    Norwich 32 43.4
    Sunderland 30 43.3
    Newcastle 30 48.1
    Southampton 27 51.1
    Wigan 24 54.7
    Villa 24 43.7
    Reading 23 39.6
    QPR 20 44.9
    Bundesliga
    Code:
    BayernMunich 63 64.4
    BorussiaDortmund 46 55.1
    BayerLeverkusen 45 48.1
    EintrachtFrankfurt 38 54
    Freiburg 36 52.8
    Schalke 36 53.7
    Hamburg 34 53.7
    Mainz 34 49.5
    Monchengladbach 34 48.7
    Hannover 33 46.5
    Stuttgart 29 49.4
    FortunaDusseldorf 28 42
    Nuremberg 28 45.7
    WerderBremen 28 51.1
    Wolfsburg 27 50.4
    Augsburg 21 47.6
    Hoffenheim 16 44.9
    GreutherFurth 14 42.4
    - - - Updated - - -

    To add: Calculate the "most significant" outliers


  2. #2
    jmaster's Avatar
    Join Date
    31 Oct 09
    Posts
    6,174
    Thanked
    2,801 times
    Fav. Player
    Il Capitano

    Albania

    TI TE DOMINET MILAN


  3. #3
    .h.'s Avatar
    Join Date
    08 Jun 05
    Posts
    19,419
    Thanked
    19,150 times
    Old name
    browha

    Europe

    25 Forum Supporter 10 years of FIF
    Forgot to add axis labels

    X-axis is 'Possession', Y-axis is 'Points'

  4. Thanks (3): Devious, Dylan, Ffi201zi002tlis

  5. #4
    Bzzlightyear's Avatar
    Join Date
    16 Mar 12
    Posts
    4,373
    Thanked
    1,010 times

    Armenia

    Noticed i had statistics at univercity and had similar calculation with weather pattern, and yes it looks promising, you could say from this point that you had a lot of data and you made some " residual plot " and out from all x,y you did get decent amount of " 0,80+ correlation, so forth you could say the probability is well approved. i would say the Statistical significance is with in 5 % so that means 95 % that teams that have position have 95 % of winning each game. Well done Browha

  6. #5
    .h.'s Avatar
    Join Date
    08 Jun 05
    Posts
    19,419
    Thanked
    19,150 times
    Old name
    browha

    Europe

    25 Forum Supporter 10 years of FIF
    all i can think to that, tbh, is

  7. Thanks (1): spork

  8. #6
    Bzzlightyear's Avatar
    Join Date
    16 Mar 12
    Posts
    4,373
    Thanked
    1,010 times

    Armenia

    Quote Originally Posted by browha View Post
    all i can think to that, tbh, is
    Well It looks something c= speed of light right " and it looks like Planck constant and background radiation

  9. #7
    .h.'s Avatar
    Join Date
    08 Jun 05
    Posts
    19,419
    Thanked
    19,150 times
    Old name
    browha

    Europe

    25 Forum Supporter 10 years of FIF
    It's black body emission. You can derive it from nothing but a few simple statements, a couple of laws about how fermions or bosons interact (dont remember which), and about half an hour.

    I had to do it in an exam once. It was quite interesting.

  10. #8
    Bzzlightyear's Avatar
    Join Date
    16 Mar 12
    Posts
    4,373
    Thanked
    1,010 times

    Armenia

    Quote Originally Posted by browha View Post
    It's black body emission. You can derive it from nothing but a few simple statements, a couple of laws about how fermions or bosons interact (dont remember which), and about half an hour.

    I had to do it in an exam once. It was quite interesting.
    Thats particle physics, and yes very interesting, have you been near to a Particle acceleration " CERN "

  11. #9
    .h.'s Avatar
    Join Date
    08 Jun 05
    Posts
    19,419
    Thanked
    19,150 times
    Old name
    browha

    Europe

    25 Forum Supporter 10 years of FIF
    heh, yes

  12. #10
    Shaun's Avatar
    Join Date
    04 Mar 04
    Posts
    13,956
    Thanked
    17,836 times
    Fav. Player
    Kovacic

    Macau

    57 Forum Supporter 10 years of FIF Best Overall Poster
    This is common sense.
    Quote Originally Posted by DM_ View Post
    Then we'll just buy the federation and create our own rules.
    Quote Originally Posted by Pimpin View Post
    I dont think juventus are willing to sell

  13. #11
    Bzzlightyear's Avatar
    Join Date
    16 Mar 12
    Posts
    4,373
    Thanked
    1,010 times

    Armenia

    Quote Originally Posted by browha View Post
    heh, yes
    Last year were i had Physics i had a teacher who was at CERN, " the time when he study " told that most of the time he drank

  14. #12
    .h.'s Avatar
    Join Date
    08 Jun 05
    Posts
    19,419
    Thanked
    19,150 times
    Old name
    browha

    Europe

    25 Forum Supporter 10 years of FIF
    agreed, but i'm quite amazed by how strngly correlated it is. 0.81 correlation is not far off perfect correlation - which means if you want to succeed in the bundesliga the only thing you have to do is keep the ball.

  15. #13
    Bzzlightyear's Avatar
    Join Date
    16 Mar 12
    Posts
    4,373
    Thanked
    1,010 times

    Armenia

    Quote Originally Posted by browha View Post
    agreed, but i'm quite amazed by how strngly correlated it is. 0.81 correlation is not far off perfect correlation - which means if you want to succeed in the bundesliga the only thing you have to do is keep the ball.
    I like the way you proved your point with facts, but otherwise to be honest i was surprised that the correlation is 0,81 and by that you could say its not far off perfect

    - - - Updated - - -

    Quote Originally Posted by Shaun View Post
    This is common sense.
    what is common sense

  16. #14
    .h.'s Avatar
    Join Date
    08 Jun 05
    Posts
    19,419
    Thanked
    19,150 times
    Old name
    browha

    Europe

    25 Forum Supporter 10 years of FIF
    Quote Originally Posted by bzzdk View Post
    I like the way you proved your point with facts, but otherwise to be honest i was surprised that the correlation is 0,81 and by that you could say its not far off perfect

    - - - Updated - - -



    what is common sense
    Well, thats why I work in science... thesis->search for evidence/anti-evidence->conclusion/re-dress thesis.

    I think Shaun is saying it is common sense that teams that keep the ball do better. Clearly you cant win a match if you never have the ball, and you cant lose a match if you always have it.

  17. Thanks (1): Shaun

  18. #15
    I'm better than Icardi Pimpin's Avatar
    Join Date
    13 Jul 11
    Posts
    14,127
    Thanked
    13,674 times
    Fav. Player
    22IcardiBroHand
    Old name
    DomesticatedPimp

    Albania

    59
    man i had enough of this BS in school today..

    also browha u should update ur signature with your most recent fights/arguments,itd be way more interesting
    Quote Originally Posted by bandiera View Post
    referees 'without question' favour juve? i think youre overstating the effect of buying out the refs.
    Quote Originally Posted by bandiera View Post
    I did some thinking over the bench issue. I think when a player is benched, it can make them think more.

  19. #16
    .h.'s Avatar
    Join Date
    08 Jun 05
    Posts
    19,419
    Thanked
    19,150 times
    Old name
    browha

    Europe

    25 Forum Supporter 10 years of FIF
    Quote Originally Posted by PimpinAintEasy View Post
    man i had enough of this BS in school today..

    also browha u should update ur signature with your most recent fights/arguments,itd be way more interesting
    hahaha. it'd take too much time, i'd have to change my sig every few hours

  20. #17
    Bzzlightyear's Avatar
    Join Date
    16 Mar 12
    Posts
    4,373
    Thanked
    1,010 times

    Armenia

    Quote Originally Posted by browha View Post
    Well, thats why I work in science... thesis->search for evidence/anti-evidence->conclusion/re-dress thesis.

    I think Shaun is saying it is common sense that teams that keep the ball do better. Clearly you cant win a match if you never have the ball, and you cant lose a match if you always have it.
    Perfect: logic VS Common sense

  21. #18
    victor_inter's Avatar
    Join Date
    08 Jan 12
    Posts
    1,129
    Thanked
    503 times
    Fav. Player
    samuel etoo

    Australia

    browha did u use matlab to plot these graphs? i use a similar one for mechanical engineering.

  22. #19
    rockball's Avatar
    Join Date
    23 Apr 05
    Posts
    10,094
    Thanked
    2,473 times
    Fav. Player
    NOT Il Capitano

    Falkland Islands

    0 Forum Supporter 10 years of FIF
    I thought browha was getting trolled in the match thread, and then ignored the conversation there. It is obvious that most of the time the team with higher possession does better. There are exceptions, and that's what they are.
    IO SONO INTERISTA

  23. #20
    Wallace
    Join Date
    18 Jun 05
    Posts
    11,214
    Thanked
    10,241 times
    Fav. Player
    Wallace
    Old name
    Wallace

    Brazil

    88 Forum Supporter 10 years of FIF
    Unfortunately, most people in that thread didn't seem to understand the difference between correlation and causation.

    Think you'd be better of opening up a thread explaining these concepts than to try to convince them there's correlation. They'll just reply: "No, X team played with 90% possession every game but didn't beat Y team and failed win Z league".
    Wallace

  24. Thanks (5): .h., Bluenine, Bzzlightyear, Earth, spork

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •