Student instructions
Piecewise modeling with multiple functions: Federal Debt

Loose change (toonies, loonies, quarters, ...) on Canadian flagIn this activity, you will retrieve data from Statistics Canada's E-STAT database on the federal debt, and fit mathematical function models to particular time periods since Confederation. Mathematical models can be useful in understanding past trends and making future predictions.

Name: (1------)

Time period: (2------)


E-STAT instructions

  1. Go to the E-STAT website.
  2. Click on Search CANSIM in E-STAT on the left sidebar.
  3. Type 385-0010 in the Search box and click on the Search button to retrieve Table 385-0010 –Federal government debt, for fiscal year ending March 31, annual (dollars).
  4. On the Subset selection page:
  5. Click on the Retrieve as individual Time Series button.
  6. On the Output specification page, select one of the following formats: The output selected will depend on your software. Ask your teacher which format works best with your school's software.
  7. Click on the Retrieve now button.

Software instructions

  1. Import the data into your software program. Consult with your teacher or classmates if you have problems importing the data.
  2. Save your file as Federal Debt [Dates]. For example, if you have data from 1867 to 1883, your file name would be: Federal Debt 1867 to 1883.
  3. Create a new variable that represents the number of years since the first data point, using the following formula:

    Years since [First Data Point Year] = Year – [First Data Point Year].

    Using the above example, the formula would be: Years since 1867 = Year - 1867
  4. Create a scatter plot with Years since [First Data Point Year] (e.g., Years since 1867) on the x-axis and Federal debt (Millions of dollars) on the y-axis.
  5. Determine what type of function best models the data in your scatter plot, using a variety of methods (e.g., visual inspection, r2 values, residuals).
  6. Plot that function type on your graph and alter the variable values until you have a close approximation of the function to the data.