introduction

This data set helps predict the winner of the 2022 world cup.

  1. Link : https://github.com/fivethirtyeight/data/tree/master/world-cup-2022

first, we are going to load our library and then load the data set

list of team1

head(wcup$team1)
## [1] "Qatar"     "England"   "Senegal"   "USA"       "Argentina" "Denmark"

#list of team2

head(wcup$team2)
## [1] "Ecuador"      "Iran"         "Netherlands"  "Wales"        "Saudi Arabia"
## [6] "Tunisia"

team with highest score

wcup$score1 > 3
##  [1] FALSE  TRUE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE  TRUE FALSE
## [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
## [25] FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
## [37] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
## [49] FALSE FALSE FALSE FALSE FALSE  TRUE FALSE  TRUE FALSE FALSE FALSE FALSE
## [61] FALSE FALSE FALSE FALSE

projected score

wcup$proj_score1
##  [1] 1.13 1.70 0.99 1.42 2.11 1.44 1.37 2.09 1.18 2.14 2.19 1.68 1.53 1.52 2.00
## [16] 2.11 1.20 0.96 1.55 1.73 1.16 1.30 1.60 1.45 1.74 1.41 1.29 1.72 0.94 1.23
## [31] 1.84 1.37 2.60 1.06 1.04 0.70 0.60 0.85 0.71 0.86 0.99 1.38 0.50 0.71 0.68
## [46] 0.86 1.18 0.31 1.42 1.85 1.99 1.47 1.10 1.89 0.65 1.51 0.68 1.04 0.83 1.29
## [61] 1.33 1.38 0.97 1.30

graph score1 over team1

ggplot(wcup= NULL, mapping = aes( wcup$team1, wcup$score1)) + geom_boxplot()

# conclusion # using some r function, we are able to understand the data set to predict the winner of the 2022 world cup