You are on page 1of 4

Regression and Correlation

A study was made on the amount of converted sugar in a certain process at various temperatures. The data were
coded and recorded as follows:

Temperature, Converted Sugar,


x y
1 8.1
1.1 7.8
1.2 8.5
1.3 9.8
1.4 9.5
1.5 8.9
1.6 8.6
1.7 10.2
1.8 9.3
1.9 9.2
2 10.5

i. Plot a scatter diagram


ii. Use a calculator to fit the linear and quadratic regression equation to estimate the mean amount of
converted sugar produced when the coded temperature is 1.75. ?
iii. Calculate the value of R2 for both linear and quadratic and tell which model is appropriate and why?
i. Calculate the correlation coefficient between Temperature, x & Converted Sugar, y?
ii. Test the adequacy of the model for both models by the help of ANOVA?

Scatter plot
11

10.5

10

9.5

8.5

7.5

7
0.8 1 1.2 1.4 1.6 1.8 2 2.2
For Linear Regression:

Use calculator option

ModeStatsA +BX

Then input data in column x and y

Press AC (to clear screen of calculator)

Shift 1  REG

Now find values of a, b and r 1 by 1

a 6.41
b 1.809
r 0.707

Regression equation:

̂ = 𝒂 + 𝒃𝒙
𝒚

̂ = 𝟔. 𝟒𝟏 + 𝟏. 𝟖𝟎𝟗 𝒙
𝒚

At x=1.75

̂ = 𝟔. 𝟒𝟏 + 𝟏. 𝟖𝟎𝟗(𝟏. 𝟕𝟓) = 𝟗. 𝟓𝟕𝟔


𝒚

Coefficient of correlation’ r’ = 0.707

R2Linear =r2 =1 – (SSE /SS Total)

R2Linear = r2 = 0.499 = 49.9%

(SSE /SS Total) =1 - R2Linear

SSE = SS Total × (1 - R2Linear)

SS Total = n × variance(y) = n × (y σ n-1)2 = n × (σ y )2 = 7.202

SSE = 7.202 × 0.501 = 3.60

Test the adequacy of the model


ANOVA Table
F = MS Regression /
df SS MS = SS / df MSE
SS Regression = MS Regression =
Regression k = 1 3.60 3.60 8.995
n-k-1 = SS Error = SSE =
Error 9 3.60 MSE = 0.40 ---
Total n-1 = 10 SS Total = 7.20 --- ---
H0 = Linear Regression is insignificant (There is no Linear Regression b/w ‘x’ & ‘y’)

HA = Linear Regression is significant

Critical value of F:

F Table = Fα; k, n-k-1 = F0.05; 1, 9 = 5.12

Conclusion:

Since value of F=8.995 is greater than Table value of F = 5.12 that’s why Reject H0 and conclude that
Linear Regression is significant

For Quadratic Regression:

Use calculator option

Mode  Stats  ___ + CX2

Then input data in column x and y

Press AC (to clear screen of calculator)

Shift 1  REG

Now find values of a, b and c 1 by 1

a 4.23
b 4.85
c -1.01

Regression equation:

̂ = 𝒂 + 𝒃𝒙
𝒚

̂ = 𝟒. 𝟐𝟑 + 𝟒. 𝟖𝟓 𝒙 − 𝟏. 𝟎𝟏𝒙𝟐
𝒚

At x=1.75

̂ = 𝟒. 𝟐𝟑 + 𝟒. 𝟖𝟓(𝟏. 𝟕𝟓) − 𝟏. 𝟎𝟏 (𝟏. 𝟎𝟕𝟓𝟐 ) = 𝟗. 𝟔𝟐


𝒚
̂ of quadratic equation)
(𝒚
Temperature, Converted E = Error =
E2
x Sugar, y 𝒚 − 𝒚̂
̂ = 𝟒. 𝟐𝟑 + 𝟒. 𝟖𝟓𝒙 − 𝟏. 𝟎𝟏𝒙𝟐
𝒚

1 8.1 8.07 0.03 0.0009


1.1 7.8 8.3429 -0.5429 0.29474
1.2 8.5 8.5956 -0.0956 0.009139
1.3 9.8 8.8281 0.9719 0.94459
1.4 9.5 9.0404 0.4596 0.211232
1.5 8.9 9.2325 -0.3325 0.110556
1.6 8.6 9.4044 -0.8044 0.647059
1.7 10.2 9.5561 0.6439 0.414607
1.8 9.3 9.6876 -0.3876 0.150234
1.9 9.2 9.7989 -0.5989 0.358681
2 10.5 9.89 0.61 0.3721
SSE
Total =3.5138

R2Quadratic = 1 – (SSE /SS Total)

SS Total = 7.202 (Same for linear, quadratic or any other model)

SSE = 3.5138

R2 Quadratic = 1 – (3.5138 /7.202) = 0.512 = 51.2%

Test the adequacy of the model


ANOVA Table
F = MS Regression /
df SS MS = SS / df MSE
Regression k = 2 SS Regression = 3.69 MS Regression = 1.844 4.199
Error n-k-1 = 8 SS Error = SSE = 3.51 MSE = 0.439 ---
Total n-1 = 10 SS Total = 7.20 --- ---

H0 = Quadratic Regression is insignificant


(There is no Quadratic Regression b/w ‘x’ & ‘y’)

HA = Quadratic Regression is significant

Critical value of F:

F Table = Fα; k, n-k-1 = F0.05; 2, 8 = 4.46

Conclusion:

Since value of F=4.199 is less than Table value of F = 4.46 that’s why don’t Reject H0 and conclude that
Quadratic Regression is insignificant

You might also like