Lab 4: Statistics

Historgrams, Barplots, Lineplots


Bogdan G. Popescu

1 Intro

In this lab, we will continue with the basics of ggplot and will focus on barplots and lineplots. We will also conver once again the basics of histograms. As described in class histograms allow us to better understand how frequently or infrequently certain values occur in our dataset.

To unserstand better how histograms work, imagine a set of values that are spaced out along a number line.

To construct a histogram, a section of the number line is divided into equal chunks, called bins. Next, count how many data points sit inside each bin, and draw bars, one for each bin, whose heights correspond to the number of data points.