diff --git a/correlation.png b/correlation.png new file mode 100644 index 0000000..3dde2a9 Binary files /dev/null and b/correlation.png differ diff --git a/plot.py b/plot.py new file mode 100644 index 0000000..71c80c9 --- /dev/null +++ b/plot.py @@ -0,0 +1,20 @@ +import pandas as pd +import matplotlib.pyplot as plt +import seaborn as sns + +import scipy.stats + +df = pd.read_csv("istherecorrelation.csv", sep=";", decimal=",") + +r, p = scipy.stats.pearsonr(df["WO [x1000]"], df["NL Beer consumption [x1000 hectoliter]"]) +print(f"The correlation is r = {r:.2f} with p = {p:.2f}") + +sns.regplot(x="WO [x1000]", y="NL Beer consumption [x1000 hectoliter]", data=df, scatter_kws={"alpha":0.7}, line_kws={"color":"orange"}) + +plt.xlabel("WO") +plt.ylabel("NL Beer consumption") +plt.title("WO and NL Beer consumption") + +plt.grid(True) +plt.savefig("correlation.png") +plt.show() \ No newline at end of file diff --git a/solution_.md b/solution_.md new file mode 100644 index 0000000..0bbdde3 --- /dev/null +++ b/solution_.md @@ -0,0 +1,18 @@ +Student Number: 14431394 + +# 1. Title of the papers + +## MCC Van Dyke et al., 2019: +Fantastic yeasts and where to find them: the hidden diversity of dimorphic fungal pathogens + +## JT Harvey, Applied Ergonomics, 2002: +An analysis of the forces required to drag sheep over various surfaces + +## DW Ziegler et al., 2005: +The neurocognitive effects of alcohol on adolescents and college students + +# 2. Plot +![Correlation plot](correlation.png) + +## Interpretation: +The plot displays a positive correlation between WO and beer consumption in the Netherlands. However, it is questionable whether this is association is representative of anything meaningful. \ No newline at end of file