Piecewise modeling with multiple functions: Federal Debt

Loose change (toonies, loonies, quarters, ...) on Canadian flagDownloadable versions of this lesson are available in the following formats:

(RTF (text), PDF)



In this lesson, students will extract data on Canada's federal debt from Statistics Canada's E-STAT database. The class will first analyze data on the federal debt from 1867 to 2008 and then model them with a mathematical function. Students will then work in small groups to analyze the data for separate time periods. By applying function models to different periods, students will realize that Canada's federal debt is best modelled by a series of different function types. Students will provide evidence for their choice of function type for each time period using difference tables and analysis of r2 values and residuals.

Contributor: Jennifer Hall, Statistics Canada


Suggested grade levels and subject areas

Grade 11 and 12, (recapitulation of all function types)
Mathematics (Advanced Functions)


Two to three 75 minute periods


Prior knowledge

Classroom instructions

  1. If necessary, review important properties of linear, quadratic, and exponential functions, as well as the topics of difference tables, residuals and the coefficient of determination.
  2. Begin the lesson by showing, with a projector, the Statistics Canada Flash presentation "Time line". This presentation highlights major events that occurred in Canadian history from 1901 to 2001.
  3. Hold a brief class discussion on the topic of the federal debt in Canada to assess students' prior knowledge and share information on the topic. Have students hypothesize how some of the major events mentioned in the presentation would impact the federal debt.
  4. Display the graph of federal debt data from 1867 to 2008, available from E-STAT. Ask students to determine by visual inspection the one type of function they feel would best approximate the data. (Answer should be 'exponential'.)
  5. Import the federal debt data into your dynamic statistical software program using the steps provided in the student instructions. Demonstrate how to fit an exponential function to the data, by altering the variable values. Discuss with the students how they would test which function models best fit the curve. (Answers: difference tables, residuals, r2 values)
  6. Discuss with the students how the data could be better approximated by several different mathematical functions if the data were partitioned into several time periods. Again, ask the students to determine by visual inspection the function types they feel could best approximate the data for different periods. (Answers may vary – e.g., linear until 1945, then exponential until the late 1990s, and then linear after that)
  7. Divide the class into pairs or groups, and have them complete a worksheet for each of the following 10 time periods:
    1. 1867 to 1883 [Linear]
    2. 1884 to 1908 [Linear]
    3. 1909 to 1920 [Quadratic]
    4. 1921 to 1930 [Linear]
    5. 1931 to 1937 [Linear]
    6. 1938 to 1946 [Exponential has R2=0.97. Quadratic has R2=0.998]
    7. 1947 to 1974 [Quadratic]
    8. 1975 to 1988 [Exponential and Quadratic have exactly the same R2]
    9. 1989 to 1997 [Linear]
    10. 1998 to 2008 [Quadratic]
    Listed in square brackets beside the time period is the type of function that best fits the data for that time period. You may divide the class into 10 groups,(one per time period) or assign different time periods to each group to ensure that students will practice modelling different types of functions.
    Note: for Question #9 of the worksheet, the groups assigned to the first and last time periods (1867 to 1883 and 1998 to 2008) will only be able make comparisons with one other group.
  8. Once each group has completed their analysis, you may wish to display all the graphs together (e.g., tape them up on the chalkboard) to better show how the overall data break down into several function types.) Have the students discuss whether some trends are common to multiple time periods, and what historic events occurred during those periods (e.g., World War I and II, the Great Depression).


Have students repeat this process for their province's debt using table 385-0014, which shows provincial data from 1970 onwards. (Note: On the Subset selection page, under 'Government sectors', select 'Provincial and territorial general government' and under 'Balance sheet', select 'Net financial debt'.)

Have students research economic factors that influence the federal debt, such as the role of the Bank of Canada. The references below should get students started:

Challenge students to search for other chronological data that can be modeled by a combination of functions, among the more than 41 million time series in the E-STAT CANSIM database. They can import these data into a statistical software program and attempt to plot functions that fit their data. Note: Several examples of individual and combined functions are provided at Function modelling using secondary data from E-STAT. If your students find something interesting to model, please send us a note. We'd certainly like to read it and may add it to the bank of examples we use!


Students will be informally assessed on their work habits and computer skills throughout this activity. They can be formally assessed via the worksheet, which can be marked using a marking scheme of the teacher's choice. A sample completed worksheet is provided for one time period. Sample graphs are provided for each of the 10 time periods with function models that approximate the data.

Recommend this page
Recommend this page!