Modeling Housing Data with Sinusoidal Functions

Keywords: least squared error, sinusoid, function

Level

Grades 9-12

Algebra 2, PreCalculus, Statistics

Purpose

The purpose of this lesson is for students to use sinusoidal functions to model New Residential Housing data gathered from the U.S. Census Bureau website. Students will analyze the strength of their model by computing, and attempting to minimize, the sum of the squared error between the model and the actual data.

Overview

The 2-3 day lesson has three related components. The first activity teaches students how to create a spreadsheet that will allow them to calculate the least squared error of a sample data set. The second activity will be to ensure that students understand the effect of the constants in a sinusoidal function, Asin(Bx+C)+D, as well as how to incorporate a general trend line with the sinusoidal function. The third activity will involve downloading data from the Census Bureau website, fitting a curve to the data and analyzing the model by examining the sum of the squared errors.

Student Outcomes

●  Students will understand how changes in the constant values A, B, C, and D impact the function Asin(Bx+C)+D.

●  Students will analyze the strength of their model by minimizing the sum of the squared errors.

●  Students will learn how to incorporate a trend line into the sinusoid in the form Asin(Bx+C)+mx+b.

Common Core Math Standards

Interpreting Functions

●  Understand the concept of a function and use function notation

●  Interpret functions that arise in applications in terms of the context

●  analyze functions using different representations

Building Functions

●  Build a function that models a relationship between two quantities

●  Build new functions from existing functions

Linear, Quadratic, and Exponential Models

●  Construct and compare linear, quadratic, and exponential models and solve problems

●  Interpret expressions for functions in terms of the situation they model

Trigonometric Functions

●  model periodic phenomena with trigonometric functions

CT-STEM Skills (from CT-STEM Skills Taxonomy)

Data and Information Skills

●  Collecting Data

●  Manipulating Data

●  Analyzing Data

●  Visualizing Data

●  Creating Generative Descriptions of Data

●  Making Hypotheses and Drawing Conclusions Based on Data

●  Identifying the Limitations of Data

Modeling and Simulation Skills

●  Using Simulations and Models to Find and Test Solutions

●  Assessing Models and Simulations

●  Building New Models and Extending Existing Models

Problem Solving Skills

●  Troubleshooting

●  Decomposing Problems into Subproblems

●  Reframing Problems into Known/Familiar Problems

Time

2-3 class periods

Materials and Tools

Internet access

Spreadsheet software

Activity Sheets

Preparation and Background

Housing-starts data for residential construction is a key leading economic indicator. Declines in the housing market is often used by economists as a signal that economic difficulties are looming. Successfully modeling these trends, both on a short-term and long-term basis, can help people make decisions regarding the economy and financial markets.

Regarding the lesson, teachers should determine the use and/or modification of the activity sheets depending upon the background of the students. In Activity 1, it is assumed that students know how to enter data into their calculator and can find an equation of a line that models the data. Most students will need to be taught how to create a spreadsheet to calculate the sum of the squared errors of a model. Students who have no familiarity with sinusoidal functions may need to spend more time examining the transformations of the sine function (Activity 2).

Activity Sheets and Teaching Notes

The lesson is broken down into 3 different activities.

1  Learning to enter data into a spreadsheet and calculate the sum of the squared errors.

2  Learning about the effect of transformational parameters on sinusoidal functions.

3  Transforming a sinusoidal function to model data gathered from New Residential Construction.

Teachers will need to adjust timing and guidance depending upon the technological and mathematical sophistication of the students.

The Activity Sheets are on the next pages.

Modeling Housing Data

Activity 1: Linear Models and Sum of the Squared Error

Annual housing starts (in thousands) for single family homes are given in the table. In this activity, you will enter the data into a spreadsheet along with an adjustable linear model. You will create the commands necessary to calculate the sum of the squared error of your model.

Table 1: Annual Housing Starts (in thousands) for single-family homes 1990-1999

Year / ‘90 / ‘91 / ‘92 / ‘93 / ‘94 / ‘95 / ‘96 / ‘97 / ‘98 / ‘99
Housing / 895 / 840 / 1030 / 1126 / 1198 / 1076 / 1161 / 1134 / 1271 / 1302

1. Enter the data into your graphing calculator. Determine a linear model for the data. The linear model can be the linear regression determined by your calculator, or your own linear model. Record your model here.

2. Open a spreadsheet, and create column headings like the ones shown here:

3. Enter the Year and Housing Data from Table 1 into your spreadsheet.

4. Enter values into F2 and G2 that you would like to use for the slope and y-intercept of your model.

5. Enter the formula into cell C2 as you see here:

6. Enter the formula into cell D2 that you see here:

7. Auto fill the columns for C and D by selecting and dragging the “Autofill square” as highlighted here:

8. The spreadsheet should automatically calculate the appropriate model values and the squared error.

9. At the bottom of the column of the squared errors, type in the command shown here to calculate the sum.

10. Adjust the values for Slope and Intercept in an attempt to minimize the sum of the squared errors.

Modeling Housing Data

Activity 2: Transformations of Sinusoidal models

The purpose of this activity is to understand how the parameters A, B, C, and D impact the graph of y=Asin(Bx+C)+D. and how replacing D with a linear expression in the form mx+baffect the shape of the curve.

1. Go to the website https://www.desmos.com/calculator. In the upper left hand corner, type in the equation y=Asin(Bx+C)+D. as shown below. Sliders can be created for all the parameters. Change the value of the parameters to see how they affect the shape of the graph. Record your observations in the chart below.

Parameter / A / B / C / D
Impact on graph

2. Replace “D” with the expression “mx + b” into the Desmos calculator as shown below. Adjust the values of “m” and “b” to see the impact of those parameters on the shape of the curve. Record your observations.

Modeling Housing Data

Activity 3: Modeling with Census Data

In this activity, you will download data on New Residential Construction found on the United States Census Bureau website. You will examine the data in a spreadsheet and attempt to create an equation that models the data. You will analyze the strength of your model by examining the sum of the squared errors.

1. Visit this site to gather residential construction data. Examine data from any time period, but you must use a minimum of 5 years worth of data. Make sure that your data is “Not Seasonally Adjusted” as shown in the check box below.

2. You can examine an initial graph of the data before downloading it by selecting the line chart option as shown below.

3. The data can be downloaded into a spreadsheet by selecting the “XLS-V” option.

4. Once the data is downloaded into a spreadsheet, use the spreadsheet software to create a scatter plot of the data.

5. Develop a sinusoidal model of the data, and incorporate that model into the spreadsheet. Plot the actual data and model predictions on the same scatter plot.

6. Calculate the sum of the squared errors and use that value to improve your fit.