CE Board Exam Randomizer

⬅ Back to Data Analytics Topics

Regression and Correlation

Linear regression fits a line $y=a+bx$ to paired data for estimation and prediction.

$$b=\frac{\sum (x-\bar{x})(y-\bar{y})}{\sum (x-\bar{x})^2}, \qquad a=\bar{y}-b\bar{x}$$

Linear Trend Prediction

Fit a line to points $(1,2)$, $(2,5)$, and $(3,7)$. Estimate $y$ when $x=4$.

Using least squares, $\bar{x}=2$ and $\bar{y}=14/3$.

$$b=2.5, \qquad a=\frac{14}{3}-2.5(2)=-0.333$$
$$y=-0.333+2.5x$$

At $x=4$, $y=9.67$.

Problem: Regression Prediction

A fitted line for project cost is y = 120 + 8x, where y is in thousand pesos and x is floor area in 100 m2. Predict y when x = 15.

$$y=120+8(15)=240$$

Answer: The predicted cost is P240,000.

Problem: Slope Interpretation

For the regression line y = 35 + 2.5x, state the change in y for each one-unit increase in x.

The slope gives the predicted change in the response variable.

$$\Delta y=2.5\text{ per }1\text{ unit of }x$$

Answer: y increases by 2.5 units for each additional unit of x.

Problem: Correlation Strength

A data set gives r = -0.86 between compaction delay and achieved density. Interpret the sign and strength.

The negative sign means the variables move in opposite directions, and the magnitude 0.86 is close to 1.

Answer: There is a strong negative linear relationship.

Problem: Residual from a Prediction

A regression model predicts 74.5, but the observed value is 72.0. Find the residual using observed minus predicted.

$$e=y-\hat y=72.0-74.5=-2.5$$

Answer: The residual is -2.5.

Scroll to zoom