I am attempting to analyse the World cup data, I want to make a correlation between the times the games start at and the goals scored. Im hoping this shows that a time may produce more goals.
My dataset is in a csv file and contains the following headings and 1 row of data as an example:
I am attempting to write the correlation test in python but am having some problems with it.
My question: How do I prove/disprove there is a correlation between times the matches are played at and the amount of goals scored?
import pandas as pd
from scipy import stats
import numpy as np
#Read the data into a dataframe
df = pd.read_csv("World Cup 2018.csv")
index2 = df.loc[df['start_time']]
print(index2['home_score'])
Test = numpy.corrcoef(index2.start_time, index2.home_score)[0, 1]
print(Test)
