Difference between revisions of "SOCR EduMaterials AnalysisActivities SLR"

From SOCR
Jump to: navigation, search
(SOCR Analysis Example on Simple Linear Regression)
m
 
(51 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== SOCR Analysis Example on Simple Linear Regression ==
+
== [[SOCR_EduMaterials_AnalysesActivities | SOCR Analysis]] Example on Simple Linear Regression ==
  
 +
=== This SOCR Activity demonstrates the utilization of the SOCR Analyses package for statistical Computing. In particular, it shows how to use Simple Linear Regression and how to interpret the results. ===
  
This example is taken from "An Introduction to computational statistics: regression analyses" by Robert Jennrich, Prentice Hall, 1995.
+
==Simple Linear Regression Background==
 +
[http://en.wikipedia.org/wiki/Linear_regression Simple Linear Regression] (SLR) is a class of statistical analysis models and procedures, which takes one independent variable and one dependent variable, both being quantitative, and models the relationship between them.
  
'''1.''' As you start the SOCR Analyes Applet, click on "Simple Linear Regression" from the combo box in the left panel.  
+
The model form is: '''y = intercept + slope * x + error''', where x denotes the independent variable and y denotes the dependent variable. So it is linear. The error is assumed to follow a standard normal distribution.
  
[[Image:SOCR_AnalysisActivities_SLR_Chu_051707_Fig4.jpg|400px]]
+
The goal of the Simple Linear Regression computing procedure is to estimate the intercept and the slope, based on the data. Least Squares Fitting is used.
  
Then click on the "Example" button and then "Data" button in the right panel. You should see the data displayed in two columns. They are named as VarA and VarB here.
+
In this activity, the students can learn about:
  
[[Image:SOCR_AnalysisActivities_SLR_Chu_051707_Fig1.jpg|600px]]
+
* Reading results of Simple Linear Regression;
 +
* Making interpretation of the slope and intercept;
 +
* Observing and interpreting various data and resulting plots
 +
** Scatter plots of the dependent vs. independent variables
 +
** Diagnostic plots such as the Residual on Fit plot
 +
** Normal QQ plot, etc.
  
'''2.''' We'd like to use VarA as the regressor (that is, 'x', the independent variable); and use VarB as the response (that is, 'y', the dependent variable). To tell the computer which variables are assigned to be the regressor and response, we have to do a "Mapping." This is done by clicking on the "Mapping" button first to get to the Mapping Panel, and then map the variables.
+
==[[EBook#Chapter_X:_Correlation_and_Regression| SOCR Simple Linear Regression]]==
 +
Go to [http://www.socr.ucla.edu/htmls/ana/SimpleRegression_Analysis.html SOCR Analyses and select '''Simple Linear Regression'''] from the drop-down list of SOCR analyses, in the left panel. There are three ways to enter data in the SOCR Simple Linear Regression applet:
 +
* Click on the '''Example''' button on the top of the right panel.
 +
* Generate random data by clicking on the '''Random Example''' button.
 +
* Paste your own data from a spreadsheet into SOCR Simple Linear Regression data table.
  
[[Image:SOCR_AnalysisActivities_SLR_Chu_051707_Fig2.jpg|600px]]
+
==SOCR Simple Linear Regression Example==
 +
We will demonstrate SLR with some SOCR built-in examples. The first example (EXAMPLE 1) is based on the data taken from "An Introduction to Computational Statistics: Regression Analyses" by Robert Jennrich, Prentice Hall, 1995 (Page 4). The data describe exam and home scores of a class of students, where '''M''' stands for midterm, '''F''' for final, and '''H''' for homework.
  
(Note that, since the columns C3 through C10 do not have data and they are not used, just ignore them.)
+
* As you [http://socr.ucla.edu/htmls/exp/ start the SOCR Analyses Applet], click on '''Simple Linear Regression''' from the combo box in the left panel. Here's what the screen should look like.
 +
<center>[[Image:SOCR_AnalysisActivities_SLR_Chu_072607_Fig1.gif|700px]]</center>
  
'''3.''' After we do the "Mapping" to assign variables, now we can let the computer calculate the regression results by click on the "Result" button.
+
* The left part of the panel looks like this (make sure that the "Simple Linear Regression" is showing in the drop-down list of analyses, otherwise you won't be able to find the correct dataset and will not be able to reproduce the results!)
 +
<center>[[Image:SOCR_AnalysisActivities_SLR_Chu_051707_Fig4.gif|450px]]</center>
  
[[Image:SOCR_AnalysisActivities_SLR_Chu_051707_Fig6.jpg|600px]]
+
* in the SOCR SLR analysis, there are several SOCR built-in examples. In this activity, we'll be using '''Example 3'''. Click on the "'''Example 3'''" button and next, click on the "'''Data'''" button in the right panel. You should see the data displayed in two columns. There are three columns here, '''M''', '''F''' and '''H'''.
 +
<center>[[Image:SOCR_AnalysisActivities_SLR_Chu_051707_Fig1.gif|700px]]</center>
  
The text in the Result Panel summarize the results of this simple linear regression analysis.
+
* Use column '''M''' as the regressor (that is, 'x', the independent variable) and column '''F''' as the response (that is, 'y', the dependent variable). So you can simply ignore the column '''H''' for this activity. To tell the computer which variables are assigned to be the regressor and response, we have to do a "Mapping." This is done by clicking on the "'''Mapping'''" button first to get to the Mapping Panel, and then map the variables. For this Simple Linear Regression activity, there are two places the variables can be mapped to. The top part says '''DEPENDENT''' that you'll need to '''map''' the dependent variable you want here. Just click on '''ADD''' under '''DEPENDENT''' and that will do it. If you change your mind, you can click on '''REMOVE'''. Similar for the '''INDEPENDENT''' variable. Once you get the screen to look like the screenshot below, you're done with the '''Mapping''' step. (Note that, since the columns C3 through C16 do not have data and they are not used, just ignore them.)
 +
<center>[[Image:SOCR_AnalysisActivities_SLR_Chu_051707_Fig2.gif|700px]]</center>
  
'''4.''' If you'd like to see graphical analyses, click on the "Graph" button. You'll then see the graph panel that displays scatter plot, as well as diagnostic plots of "residual on fit", "Normal QQ" plots, etc.
+
* After we do the "Mapping" to assign variables, now we use the computer to calculate the regression results -- click on the "'''Calculate'''" button. Then select the "'''Result'''" panel to see the output.
 +
<center>[[Image:SOCR_AnalysisActivities_SLR_Chu_051707_Fig6.gif|700px]]</center>
  
[[Image:SOCR_AnalysisActivities_SLR_Chu_051707_Fig7.jpg|500px]]
+
The text in the Result Panel summarizes the results of this simple linear regression analysis. The regression line is displayed. At this point, you can think about how the '''dependent variable''' changes, on average, in response to changes of the '''independent variable'''.
  
[[Image:SOCR_AnalysisActivities_SLR_Chu_051707_Fig5.jpg|500px]]
+
* If you'd like to see graphical component of this analysis, click on the "'''Graph'''" panel. You'll then see the graph panel that displays scatter plot, as well as diagnostic plots of "residual on fit", "Normal QQ" plots, etc. The plot titles indicate plot types.
 +
<center>[[Image:SOCR_AnalysisActivities_SLR_Chu_051707_Fig7.gif|700px]]</center>
  
[[Image:SOCR_AnalysisActivities_SLR_Chu_051707_Fig3.jpg|500px]]
+
<center>[[Image:SOCR_AnalysisActivities_SLR_Chu_051707_Fig5.gif|700px]]</center>
 +
 
 +
<center>[[Image:SOCR_AnalysisActivities_SLR_Chu_051707_Fig3.gif|700px]]</center>
 +
 
 +
<center>[[Image:SOCR_AnalysisActivities_SLR_Chu_051707_Fig10.gif|700px]]</center>
 +
 
 +
'''Note''': If you happen to click on the "'''Clear'''" button in the middle of the procedure, '''all the data will be cleared out'''. Simply start over from step 1.
 +
 
 +
==See also==
 +
* [[AP_Statistics_Curriculum_2007_GLM_Regress|Simple Linear regression EBook Section]]
 +
 
 +
<hr>
 +
 
 +
{{translate|pageName=http://wiki.stat.ucla.edu/socr/index.php?title=SOCR_EduMaterials_AnalysisActivities_SLR}}

Latest revision as of 14:24, 13 August 2012

SOCR Analysis Example on Simple Linear Regression

This SOCR Activity demonstrates the utilization of the SOCR Analyses package for statistical Computing. In particular, it shows how to use Simple Linear Regression and how to interpret the results.

Simple Linear Regression Background

Simple Linear Regression (SLR) is a class of statistical analysis models and procedures, which takes one independent variable and one dependent variable, both being quantitative, and models the relationship between them.

The model form is: y = intercept + slope * x + error, where x denotes the independent variable and y denotes the dependent variable. So it is linear. The error is assumed to follow a standard normal distribution.

The goal of the Simple Linear Regression computing procedure is to estimate the intercept and the slope, based on the data. Least Squares Fitting is used.

In this activity, the students can learn about:

  • Reading results of Simple Linear Regression;
  • Making interpretation of the slope and intercept;
  • Observing and interpreting various data and resulting plots
    • Scatter plots of the dependent vs. independent variables
    • Diagnostic plots such as the Residual on Fit plot
    • Normal QQ plot, etc.

SOCR Simple Linear Regression

Go to SOCR Analyses and select Simple Linear Regression from the drop-down list of SOCR analyses, in the left panel. There are three ways to enter data in the SOCR Simple Linear Regression applet:

  • Click on the Example button on the top of the right panel.
  • Generate random data by clicking on the Random Example button.
  • Paste your own data from a spreadsheet into SOCR Simple Linear Regression data table.

SOCR Simple Linear Regression Example

We will demonstrate SLR with some SOCR built-in examples. The first example (EXAMPLE 1) is based on the data taken from "An Introduction to Computational Statistics: Regression Analyses" by Robert Jennrich, Prentice Hall, 1995 (Page 4). The data describe exam and home scores of a class of students, where M stands for midterm, F for final, and H for homework.

  • As you start the SOCR Analyses Applet, click on Simple Linear Regression from the combo box in the left panel. Here's what the screen should look like.
SOCR AnalysisActivities SLR Chu 072607 Fig1.gif
  • The left part of the panel looks like this (make sure that the "Simple Linear Regression" is showing in the drop-down list of analyses, otherwise you won't be able to find the correct dataset and will not be able to reproduce the results!)
SOCR AnalysisActivities SLR Chu 051707 Fig4.gif
  • in the SOCR SLR analysis, there are several SOCR built-in examples. In this activity, we'll be using Example 3. Click on the "Example 3" button and next, click on the "Data" button in the right panel. You should see the data displayed in two columns. There are three columns here, M, F and H.
SOCR AnalysisActivities SLR Chu 051707 Fig1.gif
  • Use column M as the regressor (that is, 'x', the independent variable) and column F as the response (that is, 'y', the dependent variable). So you can simply ignore the column H for this activity. To tell the computer which variables are assigned to be the regressor and response, we have to do a "Mapping." This is done by clicking on the "Mapping" button first to get to the Mapping Panel, and then map the variables. For this Simple Linear Regression activity, there are two places the variables can be mapped to. The top part says DEPENDENT that you'll need to map the dependent variable you want here. Just click on ADD under DEPENDENT and that will do it. If you change your mind, you can click on REMOVE. Similar for the INDEPENDENT variable. Once you get the screen to look like the screenshot below, you're done with the Mapping step. (Note that, since the columns C3 through C16 do not have data and they are not used, just ignore them.)
SOCR AnalysisActivities SLR Chu 051707 Fig2.gif
  • After we do the "Mapping" to assign variables, now we use the computer to calculate the regression results -- click on the "Calculate" button. Then select the "Result" panel to see the output.
SOCR AnalysisActivities SLR Chu 051707 Fig6.gif

The text in the Result Panel summarizes the results of this simple linear regression analysis. The regression line is displayed. At this point, you can think about how the dependent variable changes, on average, in response to changes of the independent variable.

  • If you'd like to see graphical component of this analysis, click on the "Graph" panel. You'll then see the graph panel that displays scatter plot, as well as diagnostic plots of "residual on fit", "Normal QQ" plots, etc. The plot titles indicate plot types.
SOCR AnalysisActivities SLR Chu 051707 Fig7.gif
Error creating thumbnail: File missing
SOCR AnalysisActivities SLR Chu 051707 Fig3.gif
SOCR AnalysisActivities SLR Chu 051707 Fig10.gif

Note: If you happen to click on the "Clear" button in the middle of the procedure, all the data will be cleared out. Simply start over from step 1.

See also




Translate this page:

(default)
Uk flag.gif

Deutsch
De flag.gif

Español
Es flag.gif

Français
Fr flag.gif

Italiano
It flag.gif

Português
Pt flag.gif

日本語
Jp flag.gif

България
Bg flag.gif

الامارات العربية المتحدة
Ae flag.gif

Suomi
Fi flag.gif

इस भाषा में
In flag.gif

Norge
No flag.png

한국어
Kr flag.gif

中文
Cn flag.gif

繁体中文
Cn flag.gif

Русский
Ru flag.gif

Nederlands
Nl flag.gif

Ελληνικά
Gr flag.gif

Hrvatska
Hr flag.gif

Česká republika
Cz flag.gif

Danmark
Dk flag.gif

Polska
Pl flag.png

România
Ro flag.png

Sverige
Se flag.gif