LINEAR REGRESSION | PRACTICE PROBLEMS Complete the following to reinforce your understanding of the concept covered in this module.
PROBLEM 1: Given the following data points below, the slope of the regression line using the least square method is most close to: Point 1: (5, 7) Point 2: (3, 8) Point 3: (8, 13) A. 1.01 B. 1.04 C. 1.08 D. None of the above
Made with
by Prepineer | Prepineer.com
SOLUTION 1:
Just like any STRAIGHT LINE, we can use a simple 3 STEP PROCESS to CALCULATE the VALUES we need to WRITE the LEAST SQUARES REGRESSION LINE for a given REGRESSION MODEL. However, as we are ONLY looking to SOLVE for the SLOPE of the REGRESSION LINE, we can STOP at STEP 2. Step 1: Calculate the SUMMATION VALUES of the DATA COORDINATES that REPRESENT the DISPERSION of the DATA relative to the X and Y axes The FORMULAS for the DISPERSION OF OBSERVATIONS are not provided in the NCEES Supplied Reference Handbook, Version 9.4 for Computer Based Testing. We must memorize this formula and understand its application independent of the NCEES Supplied Reference Handbook. The FIRST STEP is to calculate the VARIOUS VALUES shown below that REPRESENT the DIFFERENCE in POSITION of the INDEPENDENT VARIABLES and DEPENDENT VARIABLES for each DATA POINT. βπ₯3 βπ¦3 βπ₯3 π¦3 βπ₯35 βπ¦35 βπ₯3 5 βπ¦3
5
Made with
by Prepineer | Prepineer.com
1 π₯= π
8
8
1 π¦ = π
π₯3 39:
π¦3 39:
Where: β’ π is the sample size β’ (π₯3 , π¦3 ) is the observed values for a data point with values π₯3 and π¦3 for the π ?@ observation Given the VALUES in the PROBLEM STATEMENT, letβs CALCULATE each of the VALUES representing the DISPERSION of the OBSERVATIONS: βπ₯3 = 5 + 3 + 8 = 16 βπ¦3 = 7 + 8 + 13 = 28 βπ₯35 = 5
5
+ 3
5
+ 8
5
= 98
βπ₯3 π¦3 = 5 7 + 3 8 + 8 13 = 163 Step 2: CALCULATE the SLOPE of the REGRESSION LINE (π) In this STEP, we are looking to CALCULATE the SLOPE of the REGRESSION LINE by USING the RELATIONSHIP between the SUM of the SQUARES of βxβ and the SUM of the βx-yβ PRODUCTS.
Made with
by Prepineer | Prepineer.com
The FORMULA for the SUM OF X-Y PRODUCTS can be referenced under the SUBJECT of ENGINEERING PROBABILITY AND STATISTICS on page 40 of the NCEES Supplied Reference Handbook, Version 9.4 for Computer Based Testing. The SUM of the βx-yβ PRODUCTS represents the RISE (πJK ) or VERTICAL CHANGE of the REGRESSION LINE and is calculated as: 8
πJK = 39:
1 π₯3 π¦3 β π
8
8
π₯3
π¦3
39:
39:
PLUGGING in the CALCULATED values, we calculate the SUM of the βx-yβ PRODUCTS as:
πJK = 163 β
1 3
16 28 = 13.67
The FORMULA for the SUM OF SQUARES OF X can be referenced under the SUBJECT of ENGINEERING PROBABILITY AND STATISTICS on page 40 of the NCEES Supplied Reference Handbook, Version 9.4 for Computer Based Testing. The SUM of the βxβ PRODUCTS represents the RUN (πJJ ) or HORIZONTAL CHANGE of the REGRESSION LINE and is calculated as: 8
πJJ = 39:
1 π₯35 β π
5
8
π₯3 39:
Made with
by Prepineer | Prepineer.com
PLUGGING in the CALCULATED values, we calculate the SUM of the βx-yβ products as:
πJJ = 98 β
1 3
16
5
= 12.67
The FORMULA for the SLOPE OF THE LINEAR REGRESSION EQUATION can be referenced under the SUBJECT of ENGINEERING PROBABILITY AND STATISTICS on page 40 of the NCEES Supplied Reference Handbook, Version 9.4 for Computer Based Testing. Just like ANY other SLOPE of a LINE, we can simply CALCULATE the SLOPE of the REGRESSION LINE by CALCULATING the QUOTIENT of the RISE (πJK ) divided by the RUN (πJJ ) as:
π=
πJK πJJ
Where: β’ (π₯3 , π¦3 ) is the OBSERVED VALUES for a DATA POINT with values π₯3 and π¦3 for the π ?@ observation β’ π is the SAMPLE SIZE β’ πJJ is the SUM of SQUARES of π₯ β’ πJK is the SUM of π₯ β π¦ PRODUCTS
Made with
by Prepineer | Prepineer.com
PLUGGING in the CALCULATED VALUES for the SUM of SQUARES of βxβ and SUM of βx-yβ PRODUCTS, we CALCULATE the SLOPE of the REGRESSION LINE is as:
π=
πJK 13.67 = = 1.079 πJJ 12.67
Therefore, the correct answer choice is C. π. ππ
Made with
by Prepineer | Prepineer.com
PROBLEM 2: Given the following data points below, the correlation coefficient using the least square method is most close to: Point 1: (5, 7) Point 2: (3, 8) Point 3: (8, 13) A. 0.50 B. 0.75 C. 0.85 D. 1.00
Made with
by Prepineer | Prepineer.com
SOLUTION 2:
In this problem, we are looking to SOLVE for the CORRELATION COEFFICIENT βRβ of the LEAST SQUARES REGRESSION LINE for the GIVEN set of DATA. The FIRST STEP in this PROBLEM is to CALCULATE the SUMMATION VALUES of the DATA COORDINATES that REPRESENT the DISPERSION of the DATA relative to the X and Y axes The FORMULAS for the DISPERSION OF OBSERVATIONS are not provided in the NCEES Supplied Reference Handbook, Version 9.4 for Computer Based Testing. We must memorize this formula and understand its application independent of the NCEES Supplied Reference Handbook. βπ₯3 βπ¦3 βπ₯3 π¦3 βπ₯35 βπ¦35 βπ₯3 5 βπ¦3 1 π₯= π
8
π₯3 39:
5
1 π¦ = π
8
π¦3 39:
Where: β’ π is the sample size
Made with
by Prepineer | Prepineer.com
β’ (π₯3 , π¦3 ) is the observed values for a data point with values π₯3 and π¦3 for the π ?@ observation As we are ONLY solving for the CORRELATION COEFFICIENT, we should FIRST IDENTIFY which VALUES we NEED TO CALCULATE by looking at the FORMULA for the CORRELATION COEFFICIENT. The FORMULA for the SAMPLE CORRELATION COEFFICIENT (R) can be referenced under the SUBJECT of ENGINEERING PROBABILITY AND STATISTICS on page 40 of the NCEES Supplied Reference Handbook, Version 9.4 for Computer Based Testing. The Sample Correlation Coefficient βRβ is calculated using the following expression:
π
=
πJK πJJ πKK
Looking at the FORMULA for the SAMPLE CORRELATION COEFFICIENT βRβ, we need to SOLVE for any VALUES related to the SUM of SQUARES of βxβ (πJJ ), the SUM of βx-yβ PRODUCTS (πJK ), and the SUM of SQUARES of βyβ πKK . Given the VALUES in the PROBLEM STATEMENT, letβs CALCULATE each of the VALUES representing the DISPERSION of the OBSERVATIONS that we NEED to CALCULATE the CORRELATION COEFFICIENT βRβ: βπ₯3 = 5 + 3 + 8 = 16 βπ¦3 = 7 + 8 + 13 = 28
Made with
by Prepineer | Prepineer.com
βπ₯35 = 5
5
+ 3
5
+ 8
βπ¦35 = 7
5
+ 8
5
+ 13
5
= 98 5
= 282
βπ₯3 π¦3 = 5 7 + 3 8 + 8 13 = 163 Next, we will CALCULATE the VALUES for the SUM of SQUARES of βxβ (πJJ ), the SUM of βx-yβ PRODUCTS (πJK ), and the SUM of SQUARES of βyβ πKK . The FORMULA for the SUM OF X-Y PRODUCTS can be referenced under the SUBJECT of ENGINEERING PROBABILITY AND STATISTICS on page 40 of the NCEES Supplied Reference Handbook, Version 9.4 for Computer Based Testing. The SUM of the βx-yβ PRODUCTS represents the RISE (πJK ) or VERTICAL CHANGE of the REGRESSION LINE and is calculated as: 8
πJK = 39:
1 π₯3 π¦3 β π
8
8
π₯3 39:
π¦3 39:
PLUGGING in the CALCULATED values, we calculate the SUM of the βx-yβ PRODUCTS as:
πJK = 163 β
1 3
16 28 = 13.67
Made with
by Prepineer | Prepineer.com
The FORMULA for the SUM OF SQUARES OF X can be referenced under the SUBJECT of ENGINEERING PROBABILITY AND STATISTICS on page 40 of the NCEES Supplied Reference Handbook, Version 9.4 for Computer Based Testing. The SUM of the βxβ PRODUCTS represents the RUN (πJJ ) or HORIZONTAL CHANGE of the REGRESSION LINE and is calculated as: 8
πJJ = 39:
1 π₯35 β π
5
8
π₯3 39:
PLUGGING in the CALCULATED values, we calculate the SUM of the βx-yβ products as:
πJJ = 98 β
1 3
16
5
= 12.67
The FORMULA for the SUM OF SQUARES OF Y can be referenced under the SUBJECT of ENGINEERING PROBABILITY AND STATISTICS on page 40 of the NCEES Supplied Reference Handbook, Version 9.4 for Computer Based Testing. The SUM OF SQUARES OF Y is given by the expression: 8
πKK = 39:
1 π¦35 β π
5
8
π¦3 39:
Made with
by Prepineer | Prepineer.com
PLUGGING in the CALCULATED values, we calculate the SUM of the βx-yβ products as:
πKK = 282 β
1 3
28
5
= 20.67
PLUGGING in the CALCULATED VALUES for the SUM of SQUARES of βxβ (πJJ ), the SUM of βx-yβ PRODUCTS (πJK ), and the SUM of SQUARES of βyβ πKK , we CALCULATE the SAMPLE CORRELATION COEFFICIENT as:
π
=
πJK πJJ πKK
=
13.67 12.67 (20.67)
= 0.845
Therefore, the correct answer choice is C. π. ππ
Made with
by Prepineer | Prepineer.com
PROBLEM 3: Given the following data points below, the correlation coefficient using the least square method is most close to: i
xi
yi
1
1.2
1.1
2
2.3
2.1
3
3.0
3.1
4
3.8
4.0
5
4.7
4.9
6
5.9
5.9
A. 0.50 B. 0.75 C. 0.85 D. 1.00
Made with
by Prepineer | Prepineer.com
SOLUTION 3:
In this problem, we are looking to SOLVE for the CORRELATION COEFFICIENT βRβ of the LEAST SQUARES REGRESSION LINE for the GIVEN set of DATA. The FIRST STEP in this PROBLEM is to CALCULATE the SUMMATION VALUES of the DATA COORDINATES that REPRESENT the DISPERSION of the DATA relative to the X and Y axes The FORMULAS for the DISPERSION OF OBSERVATIONS are not provided in the NCEES Supplied Reference Handbook, Version 9.4 for Computer Based Testing. We must memorize this formula and understand its application independent of the NCEES Supplied Reference Handbook. βπ₯3 βπ¦3 βπ₯3 π¦3 βπ₯35 βπ¦35 βπ₯3 5 βπ¦3 1 π₯= π
8
π₯3 39:
5
1 π¦ = π
8
π¦3 39:
Where: β’ π is the sample size β’ (π₯3 , π¦3 ) is the observed values for a data point with values π₯3 and π¦3 for the π ?@ observation
Made with
by Prepineer | Prepineer.com
As we are ONLY solving for the CORRELATION COEFFICIENT, we should FIRST IDENTIFY which VALUES we NEED TO CALCULATE by looking at the FORMULA for the CORRELATION COEFFICIENT. The FORMULA for the SAMPLE CORRELATION COEFFICIENT (R) can be referenced under the SUBJECT of ENGINEERING PROBABILITY AND STATISTICS on page 40 of the NCEES Supplied Reference Handbook, Version 9.4 for Computer Based Testing. The Sample Correlation Coefficient βRβ is calculated using the following expression:
π
=
πJK πJJ πKK
Looking at the FORMULA for the SAMPLE CORRELATION COEFFICIENT βRβ, we need to SOLVE for any VALUES related to the SUM of SQUARES of βxβ (πJJ ), the SUM of βx-yβ PRODUCTS (πJK ), and the SUM of SQUARES of βyβ πKK . Given the VALUES in the PROBLEM STATEMENT, letβs CALCULATE each of the VALUES representing the DISPERSION of the OBSERVATIONS that we NEED to CALCULATE the CORRELATION COEFFICIENT βRβ: βπ₯3 = 1.2 + 2.3 + 3.0 + 3.8 + 4.7 + 5.9 = 20.90 βπ¦3 = 1.1 + 2.1 + 3.1 + 4.0 + 4.9 + 5.9 = 21.10 βπ₯35 = 1.2
5
+ 2.3
5
+ 3.0
Made with
5
+ 3.8
5
+ 4.7
5
+ 5.9
5
= 87.07
by Prepineer | Prepineer.com
βπ¦35 = 1.1
5
+ 2.1
5
+ 3.1
5
+ 4.0
5
+ 4.9
5
+ 5.9
5
= 90.05
βπ₯3 π¦3 = 1.2 1.1 + 2.3 2.1 + 3.0 3.1 + 3.8 4.0 + 4.7 4.9 + 5.9 5.9 = 88.49 Next, we will CALCULATE the VALUES for the SUM of SQUARES of βxβ (πJJ ), the SUM of βx-yβ PRODUCTS (πJK ), and the SUM of SQUARES of βyβ πKK . The FORMULA for the SUM OF X-Y PRODUCTS can be referenced under the SUBJECT of ENGINEERING PROBABILITY AND STATISTICS on page 40 of the NCEES Supplied Reference Handbook, Version 9.4 for Computer Based Testing. The SUM of the βx-yβ PRODUCTS represents the RISE (πJK ) or VERTICAL CHANGE of the REGRESSION LINE and is calculated as: 8
πJK = 39:
1 π₯3 π¦3 β π
8
8
π₯3 39:
π¦3 39:
PLUGGING in the CALCULATED values, we calculate the SUM of the βx-yβ PRODUCTS as:
πJK = 88.49 β
1 6
20.90 21.10 = 14.99
The FORMULA for the SUM OF SQUARES OF X can be referenced under the SUBJECT of ENGINEERING PROBABILITY AND STATISTICS on page 40 of the NCEES Supplied Reference Handbook, Version 9.4 for Computer Based Testing.
Made with
by Prepineer | Prepineer.com
The SUM of the βxβ PRODUCTS represents the RUN (πJJ ) or HORIZONTAL CHANGE of the REGRESSION LINE and is calculated as: 8
πJJ = 39:
1 π₯35 β π
5
8
π₯3 39:
PLUGGING in the CALCULATED values, we calculate the SUM of the βx-yβ products as:
πJJ = 87.07 β
1 6
436.81 = 14.27
The FORMULA for the SUM OF SQUARES OF Y can be referenced under the SUBJECT of ENGINEERING PROBABILITY AND STATISTICS on page 40 of the NCEES Supplied Reference Handbook, Version 9.4 for Computer Based Testing. The SUM OF SQUARES OF Y is given by the expression: 8
πKK = 39:
1 π¦35 β π
5
8
π¦3 39:
PLUGGING in the CALCULATED values, we calculate the SUM of the βx-yβ products as:
πKK = 90.05 β
1 (445.21) = 15.85 6 Made with
by Prepineer | Prepineer.com
PLUGGING in the CALCULATED VALUES for the SUM of SQUARES of βxβ (πJJ ), the SUM of βx-yβ PRODUCTS (πJK ), and the SUM of SQUARES of βyβ πKK , we CALCULATE the SAMPLE CORRELATION COEFFICIENT as:
π
=
πJK πJJ πKK
=
14.99 14.27 (15.85)
= 0.996
Therefore, the correct answer choice is D. 1.00
Made with
by Prepineer | Prepineer.com