We can see here that the variables feetSize and mistakes are both quantitative variables, and we will treat them as continous variables.

The data will be illustrated using a histogram, with 11 bins corresponding to the following intervals : ]17., 18], ..., ]28,29]. The y axis for each bins represents the average amounts of mistakes by students whose foot size lies in the corresponding interval.

```{r, echo=FALSE}

library(ggplot2)

ggplot(data=data_used, aes(x=feetSize, y=mistakes)) + stat_summary_bin(fun = "mean",geom="bar",binwidth=1,fill="blue",colour="black") + labs(title = "Average number of mistakes in a dictation by foot size\n", x = "foot size (in cm)", y = "Average number of mistakes") +

plot.title = element_text(size = 16, face = "bold"))

```

This graph clearly shows a correlation between the students' feet size and their results during the dictation. It looks like students with larger feet make less mistakes.

## Summary of the variables

To make a summary of the relationship between these two variables, we will use a linear regression, to compute the number of errors as a linear function applied to the foot size.

```{r, echo=FALSE}

reg<-lm(mistakes ~.,data_used)

summary(reg)

```

The result is once more extremely clear, with an extremely low p-value: the number of errors seems to be negatively correlated with the feet size.

## Taking a step back

Of course, it seems utterly absurd that having huge feet would prevent a student from making mistakes in a dictation. However, the graphic we obtained using the collected data would make us think otherwise.

As said before, it seems that there is a negative correlation between the two variables. On the other hand, **it does not mean that there exists a causal link**.

As both the graph and the data analysis give the same absurd result, the issue should stem from the data itself. It is either incorrect, or does not capture enough factors (it only contains two variables after all) to allow us to reach correct conclusions.