The histogram is a concise summary for a single variable.
We get a complete picture of the univariate data vector.
The important point is that a histogram indicates the long-term expectation
of a variable.
For example, the histogram of the numbers thrown
from a fair dice should show roughly equal bars for all values on the dice.
This histogram then gives you an idea of the long-term expectation
of the values from that variable.
Let's say your boss asked you to prepare a histogram that shows the production yield
from the reactor, and you used data from the last two years.
If the histogram looks like this, then it's easy to infer
that the batch yield you might get tomorrow will be somewhere near 160 grams per litre,
+/- 20 grams per litre.
That last example illustrates the importance of a histogram.
If I just told my boss the average yield is 160 g/L,
that single number only gives some idea of the centre value.
But it is not a complete description.
The boss's next question should be "what is the minimum or the maximum?"
that could be produced, or "what is the typical spread or range of the data?".
In the next video, we show some interesting questions that can be answered
from a histogram.If I gave a histogram right away,
then the boss wouldn't need to ask those questions.
We must be asking these questions and not just relying on the average.
Any person that works with data and numbers, especially engineers,
really should be asking for more than just the average.
To continue the prior example, if the histogram looked like the one shown now on the right,
then the interpretation about how our reactor is operating is quite different.
On the left we see fairly consistent production, producing high quality product.
On the right we see poor quality, high variability from our reactor;
even if the averages are the same.
Software tools we have available today can quickly draw a histogram for us.
Sadly, the average is often the only number given to us in many applications.
What is worse, is that the average can be distorted by just one single number.
We will see that in the next video.
Let's learn about some technical details now.
The horizontal axis of a histogram always shows us the univariate variable divided into bins.
Let's look at one case where the bins are category variables.
Here's an example from Statistics Canada.
Our categories here are males and females on the horizontal axis.
These are people aged 15 and over who do between 30 and 59 hours per week of unpaid housework.
We see there are about 15,000 males and 41,000 females.
We can redraw this as a relative frequency histogram by dividing both bars
by the total number of subjects, in this case 55,840.
We will often see histograms with either of these y-axis representations.
The benefit of using a relative frequency, as shown here on the right,
is that we can make quick comparisons between different data sources.
For example if we found the data from Toronto it is hard to compare Toronto to Hamilton
because of the different number of subject.
However, when we show the relative frequency for Hamilton we can compare it easily
with Toronto side-by-side, and we see the proportions are almost the same.
It is important to note that the area under a relative frequency plot will add up to 1,
or another way of saying that is 100%.
Let's consider the case now when the x-axis is a continuous variable or an interval variable.
We can divide that variable up into a certain number of bins.
And usually we will use at least 4 or more bins, often more.
Let's use another Statistics Canada dataset.
These data shown as a histogram here reveal the spread in the data,
they point to an eyeball average of $30,000 of income.
And you can see the asymmetry.
There is a very long tail on the right hand side, pointing to the high-income earners.
We use the term "skewed right" to describe this; the mass of the distribution is
to the left with a tail over onto the right.
What would a box plot of these data look like?
We will see more on this in the next video as we focus on the concepts
of means and medians in the data.