2
$\begingroup$

I need to verify if win/draw/loss results (home results) are independent from country/league where football games take place. I have the following data table:

League              win draw loss
Premier League      193 96  91
LaLiga              194 95  91
Bundesliga          125 86  95
Serie A             108 65  67

I need to assign alpha of 0.05 significance to verify hypothesis. Do I need to perform Shapiro tests for each vector (win/draw/loss), Kolmogorov-Smirnov test, or some embedded t.test in R?

$\endgroup$
4
  • 2
    $\begingroup$ Can you clarify how the w/d/l are derived; for every winner, there is a looser; but the # of wins is not the same as the losses? Same for draws; should be even #, but some of the counts are odd. So what exactly is being counted? $\endgroup$
    – jginestet
    Commented 23 hours ago
  • $\begingroup$ I realized I answered this before querying whether it was homework -- oops. I'm curious if you give more context -- is this homework /self-study/ a project ...? $\endgroup$
    – Ben Bolker
    Commented 7 hours ago
  • $\begingroup$ @jginestet I think the clue may be in the phrase (home results). $\endgroup$
    – mdewey
    Commented 5 hours ago
  • $\begingroup$ @mdewey, yes indeed. Thanks. And in which case, indeed this is a 4x3 contingency table, and one can use a $\chi^2$ test, or a Fisher-exact (given the large number of counts in all cells, they should give very similar answers) $\endgroup$
    – jginestet
    Commented 56 mins ago

1 Answer 1

8
$\begingroup$

This looks like a chi-squared test setup to me:

dd <- read.table(header = TRUE, text = "
League              win draw loss
Premier_League      193 96  91
LaLiga              194 95  91
Bundesliga          125 86  95
Serie_A             108 65  67
")


## apply test to data (not including league name):
c1 <- chisq.test(as.matrix(dd[, -1]))
print(c1)
    Pearson's Chi-squared test

data:  as.matrix(dd[, -1])
X-squared = 10.325, df = 6, p-value = 0.1116

(i.e., you can't reject the null hypothesis of equal win/draw/loss proportions across leagues at the $\alpha = 0.05$ level, since $p>0.05$)

To get a slightly better idea of what the test is doing: it's computing the expected number of counts (win/draw/loss) for each league under the assumption of independence, based on the marginal row and column totals:

c1$expected

         win     draw      loss
[1,] 180.3982 99.50995 100.09188
[2,] 180.3982 99.50995 100.09188
[3,] 145.2680 80.13170  80.60031
[4,] 113.9357 62.84839  63.21593

and then comparing these expected counts with the observed values.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.