Boxplots

As we can also notice from the scatterplot, whereas most of the samples have a relatively balanced proportion of red or even numbers, these proportions are very small or large in some cases. We could examine the dispersion of those values using a histogram again, but the boxplot is much more interesting, so we will use it instead. Boxplots are representations of the distribution of an attribute. We could have a look at only one attribute by specifying its name as an argument from the boxplot() function. We will instead look at all the arguments at once by giving the data frame as an argument:

boxplot(samples)
Boxplots

Boxplots of all the attributes

As can be seen from the boxplots, the proportions of red, black, odd, even, numbers below 18, and numbers higher than 18 are a little below 50% on average, which is what is expected as 18 of 37 numbers are in each of these categories. We can also notice that the average proportion of numbers between 1 and 12, 13 and 24, 25 and 36, as well as numbers on columns 1, 2 and 3 are a bit below 33%, which is expected as well. What might surprise us is that there is a huge variation around these average values. On each boxplot, the bottom box represents the data points that are in the second quartile. The top box represents data points that are in the third quartile. Thus, 50% of our data points fit in the two boxes. The space between the whiskers represents 150% of the interquartile range (the distance between the third and first quartile, or Q3-Q1). Finally, outliers are displayed as separate points on the boxplots. We can visually notice that the space between the whiskers it is about as large for the attributes on the right large of the graph as for attributes on the left side, even though the median proportion is much lower.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.253.210