How to Create Linear Models

Students begin in depth work with building and interpreting functions as they transition to High School. They become familiar with the functional notation, judge forms from graphs, and find the range and domain of different types of functions.

Linear modeling continues to be an important component in High School. They make a shift from informally fitting data to linear regression. Students can use the f(x) functionality on Tuva to work with linear models abstractly. This builds on their understanding of fitting data with the Tuva moveable line.

 

Here's a quick snapshot of the mechanics:

 

Step 1: Create the Scatterplot

Drag quantitative attributes to both the x and y axes.

1_attributes.png

Note: If you do not plot both an x and y attribute, the f(x) functionally will not allow you to plot a line.

2_Prompts.png 

 

Step 2: Open the Modeling Card

To model the relationship (which in this context is between CO concentration and time elapsed since 1990), choose f(x) from the toolbar to open the modeling card. The modeling card will appear on the left-hand side of your screen.

3_Modeling_card.png 

 

Step 3: Input Your Function

In the modeling card, you can either enter the function in the editor, or choose the desired function form from the drop-down menu.

Choose the linear form (y = mx +b)  from the menu or type it in.

4_Zoom_in_modeling_card.png

When you have done this, two things happen:

  1. Your function will appear on the graph. If it doesn’t, you will need to estimate the range of the parameter to get it in the viewing window, and/or zoom out. Click here for more detailed instructions.
  2. The parameters (m and b in this case) appear as sliders below the function editor in the modeling card

5_two_things_appear.png

 

Step 4: Tweak the Parameters

You can change the value of a parameter by dragging the slider pointer.  As you do this, the curve will move. The default lower bound of the slider is -10 and the default upper bound is +10.

  • The parameter m is the slope of the line. You can adjust it to change the steepness of the line.
  • The parameter b is the intercept. You can adjust it to translate the line, that is, shift it up or down.

You can tweak the minimum and maximum values by clicking on them and inputting the desired value. Hit enter to submit the maximum and minimum values.

Alternatively, you can type in a new value for the parameter and press enter.

If you feel that you need to make very small or large changes to the parameter value, double click on the upper range of the slider and adjust the steps to the desired value.

6_Tweak_parameter.png 

Try it Yourself!

Practice tweaking the parameter for this dataset, here. See if you can find a good fit. (Note: You will need to open the modeling card by clicking f(x) from toolbar, as shown above).

 

Step 5: Finding the right fit

Continue to tweak the parameter value until you get the closest possible fit. In this case, you get a reasonable fit for m at -0.25 and for b at 6.

7_Final.png 

Once you are happy with your fit, you are free to start making sense of the parameters in the context of the data!

Was this article helpful?
0 out of 0 found this helpful