5 Bar charts and histograms

5.2 Discrete and continuous variables

You may have been wondering why bar charts are generally drawn with separate bars. There is a reason for this and to discover what it is, you need to look at the nature of the categories of data being used.

5.2.1 Discrete variables

The charts about different modes of transport and that on attendance figures at a range of cultural events all use what might be called ‘word categories’. Each category (e.g. bus, rail, cycle, and walk) is quite distinct from any other in the set of categories. Such distinct categories are known in mathematics as ‘discrete variables’.

Word categories are not the only type of variable that is discrete; numbers can also be discrete. For example, at the beginning of this section, we mentioned that you could use a bar chart to plot the number of families with 0, 1, 2 or more children. Here, the number of children in a family is a discrete variable. So too are the number of goals scored per match by a football team, and the number of bedrooms in a house. Bar charts are normally drawn with separate bars in order to emphasise the discrete nature of the data.

Discrete variables often relate to counted items.

5.2.2 Continuous variables

Not all numbers are discrete. Consider the following measurements:

  • times to run a marathon
  • temperatures recorded at intervals during a day
  • weight of each bunch of grapes sold at a supermarket yesterday.

Time, temperature and weight are all examples of numerical data, but there is not a restricted set of values that they can take. Whereas you can have 2 or 3 children in a family but not 2.5, with temperature it is possible to have not only 22 °C and 23 °C but also 22.1 °C, 22.25 °C, 22.97 °C as well. This type of variable is restricted only by the accuracy with which the measurement can be made. Such variables are known as ‘continuous variables’.

Continuous variables often relate to measured items.

Activity 10

Consider a randomly selected group of students living in the UK and continental Western Europe. You could collect information about, say, their hair colour and their occupation. What other characteristics of this group could you collect information about?

Now read the discussion

Discussion

Here is our list, you may be able to think of others: sex, age, height, number of children, weight, shoe size, year of birth, nearest city, colour of eyes, first language, country of birth. Each of these characteristics or variables will produce different sets of data, and each member of the group of students is likely to be different from at least one other member of the group for each of these variables. Some variables will have very few categories (e.g. sex has only two: male and female) and others too many to list (e.g. nearest city could include any city in Europe).

Activity 11

Now look at your list of variables for the students living in the UK and continental Western Europe and decide which are discrete and which are continuous.

Now read the discussion

Discussion

Here is our list:

  • discrete variables
    • sex
    • number of children
    • shoe size
    • nearest city
    • colour of eyes
    • first language
    • country of birth
    • year of birth
  • continuous variables
    • age
    • height
    • weight.

You might have found it difficult to decide where to put the variable ‘year of birth’. A year is a measurement of time and could be considered as a continuous variable. However, it is usual to consider a year as a whole number and record information relating to a complete year, which is why we have listed ‘year of birth’ as a discrete variable. There are no hard and fast rules about this; you will find the variables ‘year’ and ‘year of birth’ considered as both discrete and continuous variables.

Last modified: Thursday, 2 August 2012, 12:30 PM