In Week 1 we discovered data and explored basic functions with data. Let’s take a look at how we can visually represent data.
The most useful way to do so is by using a histogram.
In a histogram, we simply make a graph of the numbers that occur in a data set. In the above example image, we have different numbers of cups of coffee plotted on the (x)-axis and the height of the bar tells us how many people have that score. For instance, we can easily see in this graph that one is the most common number consumed.
We can also indicate ranges along the (x)-axis. This is useful when we have a large set of numbers that we want to plot. For example, instead of laying out our axis with 0, 1, 2, 3, 4, etc., we might choose to lay it out with ranges such as 0 – 10, 11 – 20, 21 – 30, etc.