Fitting Linear Data using the Equation Editor
Lesson
One of the main goals of modeling is finding reasonably good values for the parameters of your equation. What are parameters? They are symbols for the constants in an equation. For example, in the linear function y = mx +b, the constants are m and b. You know them as the slope and the intercept. The constants in any function, linear or nonlinear, are the parameters of that function. So what difference does it make whether we call them constants or parameters? From a modeling perspective, a world of difference! If the values of the parameters change, the line or curve would still be a linear or nonlinear function but its details would be different. In the context of a linear function, the line may be steeper or shallower or in a different location depending on the values of the parameters. Tuva allows you to tweak the parameters of your linear equation to manipulate the parameters, that is, the slope and intercept of the line. Here's a quick snapshot of how to do it: Step 1: Create the Scatterplot Drag and drop quantitative attributes on both the x and y axes. ![]700 !--- Note: If you do not plot both an x and y attribute, the f(x) functionally will not allow you to plot a line. ---!{border-color:#008000;text-align:left;} Step 2: Open the Modeling Card To model the relationship, choose :ti[ti-f-of-x] from the toolbar to open the modeling card. The modeling card will appear on the left-hand side of your screen. ![]700 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. ![]700 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. 2. The parameters (m and b in this case) appear as sliders below the function editor in the modeling card ![]700 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. ![]700 Step 5: Finding the Right Fit Continue to tweak the parameter value until you get the closest possible fit! Once you are happy with your fit, you are free to start making sense of the parameters in the context of the data! ![]700 In the interactive tutorial that follows, you will learn to create your own linear models using the Modeling Card. You will also learn to bring the function in the graphing area if it does not appear after inputting the equation in the editor.
Topics and standards: Tutorial