Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added correlation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions plot.py
Original file line number Diff line number Diff line change
@@ -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()
18 changes: 18 additions & 0 deletions solution_.md
Original file line number Diff line number Diff line change
@@ -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.