Unit 6: Simple Linear Regression Lecture : Introduction to SLR
Statistics 101
Thomas Leininger
Unit 6: Simple Linear Regression Lecture : Introduction to SLR - - PowerPoint PPT Presentation
Unit 6: Simple Linear Regression Lecture : Introduction to SLR Statistics 101 Thomas Leininger June 17, 2013 Recap: Chi-square test of independence Recap: Chi-square test of independence 1 Ball throwing Expected counts in two-way tables
Thomas Leininger
Recap: Chi-square test of independence
1
2
3
4
Statistics 101 U6 - L1: Introduction to SLR Thomas Leininger
Recap: Chi-square test of independence Ball throwing
1
2
3
4
Statistics 101 U6 - L1: Introduction to SLR Thomas Leininger
Recap: Chi-square test of independence Ball throwing
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 2 / 35
Recap: Chi-square test of independence Ball throwing
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 2 / 35
Recap: Chi-square test of independence Ball throwing
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 2 / 35
Recap: Chi-square test of independence Ball throwing
Note: I multiplied the numbers by 10 to meet our expected cell counts conditions.
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 2 / 35
Recap: Chi-square test of independence Ball throwing
df = k
Note: We calculate df differently for one-way and two-way tables.
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 3 / 35
Recap: Chi-square test of independence Ball throwing
df = k
Note: We calculate df differently for one-way and two-way tables.
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 3 / 35
Recap: Chi-square test of independence Expected counts in two-way tables
1
2
3
4
Statistics 101 U6 - L1: Introduction to SLR Thomas Leininger
Recap: Chi-square test of independence Expected counts in two-way tables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 4 / 35
Recap: Chi-square test of independence Expected counts in two-way tables
df = k
Upper tail 0.3 0.2 0.1 0.05 0.02 0.01 0.005 0.001 df 1 1.07 1.64 2.71 3.84 5.41 6.63 7.88 10.83 2 2.41 3.22 4.61 5.99 7.82 9.21 10.60 13.82 3 3.66 4.64 6.25 7.81 9.84 11.34 12.84 16.27 4 4.88 5.99 7.78 9.49 11.67 13.28 14.86 18.47 5 6.06 7.29 9.24 11.07 13.39 15.09 16.75 20.52
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 4 / 35
Recap: Chi-square test of independence Expected counts in two-way tables
df = k
Upper tail 0.3 0.2 0.1 0.05 0.02 0.01 0.005 0.001 df 1 1.07 1.64 2.71 3.84 5.41 6.63 7.88 10.83 2 2.41 3.22 4.61 5.99 7.82 9.21 10.60 13.82 3 3.66 4.64 6.25 7.81 9.84 11.34 12.84 16.27 4 4.88 5.99 7.78 9.49 11.67 13.28 14.86 18.47 5 6.06 7.29 9.24 11.07 13.39 15.09 16.75 20.52
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 4 / 35
Recap: Chi-square test of independence Expected counts in two-way tables
df = k
25.7
22.857
Upper tail 0.3 0.2 0.1 0.05 0.02 0.01 0.005 0.001 df 1 1.07 1.64 2.71 3.84 5.41 6.63 7.88 10.83 2 2.41 3.22 4.61 5.99 7.82 9.21 10.60 13.82 3 3.66 4.64 6.25 7.81 9.84 11.34 12.84 16.27 4 4.88 5.99 7.78 9.49 11.67 13.28 14.86 18.47 5 6.06 7.29 9.24 11.07 13.39 15.09 16.75 20.52
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 4 / 35
Recap: Chi-square test of independence Expected counts in two-way tables
df = k
25.7
22.857
Upper tail 0.3 0.2 0.1 0.05 0.02 0.01 0.005 0.001 df 1 1.07 1.64 2.71 3.84 5.41 6.63 7.88 10.83 2 2.41 3.22 4.61 5.99 7.82 9.21 10.60 13.82 3 3.66 4.64 6.25 7.81 9.84 11.34 12.84 16.27 4 4.88 5.99 7.78 9.49 11.67 13.28 14.86 18.47 5 6.06 7.29 9.24 11.07 13.39 15.09 16.75 20.52
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 4 / 35
Modeling numerical variables
1
2
3
4
Statistics 101 U6 - L1: Introduction to SLR Thomas Leininger
Modeling numerical variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 5 / 35
Modeling numerical variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 5 / 35
Modeling numerical variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 5 / 35
Modeling numerical variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 5 / 35
Modeling numerical variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 5 / 35
Modeling numerical variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 5 / 35
Modeling numerical variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 5 / 35
Modeling numerical variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 6 / 35
Modeling numerical variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 6 / 35
Modeling numerical variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 6 / 35
Modeling numerical variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 6 / 35
Modeling numerical variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 6 / 35
Modeling numerical variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 6 / 35
Modeling numerical variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 6 / 35
Correlation
1
2
3
4
Statistics 101 U6 - L1: Introduction to SLR Thomas Leininger
Correlation
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 7 / 35
Correlation
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 7 / 35
Correlation
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 7 / 35
Correlation
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 8 / 35
Correlation
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 8 / 35
Correlation
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 9 / 35
Correlation
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 9 / 35
Correlation
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 10 / 35
Correlation
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 10 / 35
Fitting a line by least squares regression
1
2
3
4
Statistics 101 U6 - L1: Introduction to SLR Thomas Leininger
Fitting a line by least squares regression Residuals
1
2
3
4
Statistics 101 U6 - L1: Introduction to SLR Thomas Leininger
Fitting a line by least squares regression Residuals
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 11 / 35
Fitting a line by least squares regression Residuals
DC RI Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 12 / 35
Fitting a line by least squares regression Residuals
DC RI
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 12 / 35
Fitting a line by least squares regression Residuals
DC RI
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 12 / 35
Fitting a line by least squares regression Best line
1
2
3
4
Statistics 101 U6 - L1: Introduction to SLR Thomas Leininger
Fitting a line by least squares regression Best line
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 13 / 35
Fitting a line by least squares regression Best line
1
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 13 / 35
Fitting a line by least squares regression Best line
1
2
1 + e2 2 + · · · + e2 n
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 13 / 35
Fitting a line by least squares regression Best line
1
2
1 + e2 2 + · · · + e2 n
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 13 / 35
Fitting a line by least squares regression Best line
1
2
1 + e2 2 + · · · + e2 n
1
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 13 / 35
Fitting a line by least squares regression Best line
1
2
1 + e2 2 + · · · + e2 n
1
2
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 13 / 35
Fitting a line by least squares regression Best line
1
2
1 + e2 2 + · · · + e2 n
1
2
3
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 13 / 35
Fitting a line by least squares regression Best line
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 14 / 35
Fitting a line by least squares regression The least squares line
1
2
3
4
Statistics 101 U6 - L1: Introduction to SLR Thomas Leininger
Fitting a line by least squares regression The least squares line
85 90 6 8 10 12 14 16 18 % HS grad % in poverty
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 15 / 35
Fitting a line by least squares regression The least squares line
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 16 / 35
Fitting a line by least squares regression The least squares line
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 16 / 35
Fitting a line by least squares regression The least squares line
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 16 / 35
Fitting a line by least squares regression The least squares line
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 17 / 35
Fitting a line by least squares regression The least squares line
40 60 80 100 10 20 30 40 50 60 70 % HS grad % in poverty intercept Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 17 / 35
Fitting a line by least squares regression The least squares line
40 60 80 100 10 20 30 40 50 60 70 % HS grad % in poverty intercept
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 17 / 35
Fitting a line by least squares regression The least squares line
40 60 80 100 10 20 30 40 50 60 70 % HS grad % in poverty intercept
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 18 / 35
Fitting a line by least squares regression The least squares line
40 60 80 100 10 20 30 40 50 60 70 % HS grad % in poverty intercept
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 18 / 35
Fitting a line by least squares regression The least squares line
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 19 / 35
Fitting a line by least squares regression The least squares line
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 20 / 35
Fitting a line by least squares regression Prediction & extrapolation
1
2
3
4
Statistics 101 U6 - L1: Introduction to SLR Thomas Leininger
Fitting a line by least squares regression Prediction & extrapolation
85 90 6 8 10 12 14 16 18 % HS grad % in poverty
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 21 / 35
Fitting a line by least squares regression Prediction & extrapolation
40 60 80 100 10 20 30 40 50 60 70 % HS grad % in poverty intercept
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 22 / 35
Fitting a line by least squares regression Prediction & extrapolation
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 23 / 35
Fitting a line by least squares regression Prediction & extrapolation
1
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 24 / 35
Fitting a line by least squares regression Prediction & extrapolation
1
2
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 24 / 35
Fitting a line by least squares regression Prediction & extrapolation
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 25 / 35
Fitting a line by least squares regression Conditions for the least squares line
1
2
3
4
Statistics 101 U6 - L1: Introduction to SLR Thomas Leininger
Fitting a line by least squares regression Conditions for the least squares line
1
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 26 / 35
Fitting a line by least squares regression Conditions for the least squares line
1
2
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 26 / 35
Fitting a line by least squares regression Conditions for the least squares line
1
2
3
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 26 / 35
Fitting a line by least squares regression Conditions for the least squares line
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 27 / 35
Fitting a line by least squares regression Conditions for the least squares line
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 27 / 35
Fitting a line by least squares regression Conditions for the least squares line
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 27 / 35
Fitting a line by least squares regression Conditions for the least squares line
% HS grad % in poverty 80 85 90 5 10 15 −5 5
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 28 / 35
Fitting a line by least squares regression Conditions for the least squares line
% HS grad % in poverty 80 85 90 5 10 15 −5 5
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 28 / 35
Fitting a line by least squares regression Conditions for the least squares line
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 29 / 35
Fitting a line by least squares regression Conditions for the least squares line
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 29 / 35
Fitting a line by least squares regression Conditions for the least squares line
residuals frequency −4 −2 2 4 6 2 4 6 8 10 12
−1 1 2 −4 −2 2 4
Normal Q−Q Plot
Theoretical Quantiles Sample Quantiles Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 29 / 35
Fitting a line by least squares regression Conditions for the least squares line
85 90 6 8 10 12 14 16 18 % HS grad % in poverty
90 −4 4
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 30 / 35
Fitting a line by least squares regression Conditions for the least squares line
85 90 6 8 10 12 14 16 18 % HS grad % in poverty
90 −4 4
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 30 / 35
Fitting a line by least squares regression Conditions for the least squares line
85 90 6 8 10 12 14 16 18 % HS grad % in poverty
90 −4 4
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 30 / 35
Fitting a line by least squares regression Conditions for the least squares line
85 90 6 8 10 12 14 16 18 % HS grad % in poverty
90 −4 4
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 30 / 35
Fitting a line by least squares regression Conditions for the least squares line
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 31 / 35
Fitting a line by least squares regression Conditions for the least squares line
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 31 / 35
Fitting a line by least squares regression Conditions for the least squares line
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 32 / 35
Fitting a line by least squares regression Conditions for the least squares line
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 32 / 35
Fitting a line by least squares regression R2
1
2
3
4
Statistics 101 U6 - L1: Introduction to SLR Thomas Leininger
Fitting a line by least squares regression R2
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 33 / 35
Fitting a line by least squares regression R2
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 33 / 35
Fitting a line by least squares regression R2
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 33 / 35
Fitting a line by least squares regression R2
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 33 / 35
Fitting a line by least squares regression R2
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 33 / 35
Fitting a line by least squares regression R2
85 90 6 8 10 12 14 16 18 % HS grad % in poverty
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 34 / 35
Fitting a line by least squares regression R2
85 90 6 8 10 12 14 16 18 % HS grad % in poverty
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 34 / 35
Fitting a line by least squares regression Categorical explanatory variables
1
2
3
4
Statistics 101 U6 - L1: Introduction to SLR Thomas Leininger
Fitting a line by least squares regression Categorical explanatory variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 35 / 35
Fitting a line by least squares regression Categorical explanatory variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 35 / 35
Fitting a line by least squares regression Categorical explanatory variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 35 / 35
Fitting a line by least squares regression Categorical explanatory variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 35 / 35
Fitting a line by least squares regression Categorical explanatory variables
Statistics 101 (Thomas Leininger) U6 - L1: Introduction to SLR June 17, 2013 35 / 35