30 Linear Regression Problem Set

Report 0 Downloads 82 Views
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