0% found this document useful (0 votes)
16 views14 pages

Correlation Regression

The document contains a table with data on the costs of pizza slices and subway fares for 6 observations. It performs a linear regression analysis to determine the correlation between the two variables and estimates the linear regression equation. It finds a very high positive correlation (r=0.988) between the costs, indicating they are strongly linearly related. The regression equation calculated has an intercept of 0.035 and slope of 0.945, meaning as the cost of a pizza slice increases by $1, the estimated cost of subway fare increases by $0.945.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views14 pages

Correlation Regression

The document contains a table with data on the costs of pizza slices and subway fares for 6 observations. It performs a linear regression analysis to determine the correlation between the two variables and estimates the linear regression equation. It finds a very high positive correlation (r=0.988) between the costs, indicating they are strongly linearly related. The regression equation calculated has an intercept of 0.035 and slope of 0.945, meaning as the cost of a pizza slice increases by $1, the estimated cost of subway fare increases by $0.945.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Table 10-2 Costs of a Slice of Pizza and Subway Fare (in dollars)

obs Cost_of_Pizza (x) Subway_Fare (y) x² y² xy


1 0.15 0.15 0.02 0.02 0.0225 x̅
2 0.35 0.35 0.12 0.12 0.1225 y̅
3 1.00 1.00 1.00 1.00 1 Sx
4 1.25 1.35 1.56 1.82 1.6875 Sy
5 1.75 1.50 3.06 2.25 2.625
6 2.00 2.00 4.00 4.00 4
∑ 6.50 6.35 9.77 9.22 9.46

Correlation

n 6

r 0.988

Hypothesis of Correlation

t 12.6920316532464
p-value 0.000027
obs zx zy zx.zy
1.083 1 -1.26 -1.29 1.62
1.058 2 -0.99 -1.00 1.00
0.739 3 -0.11 -0.08 0.01
0.707 4 0.23 0.41 0.09
5 0.90 0.62 0.56
6 1.24 1.33 1.65
∑ 4.94

r ∑(zx.zy)
n-1

r 0.988
Table 10-2 Costs of a Slice of Pizza and Subway Fare (in dollars)

obs Cost_of_Pizza
Subway_Fare
(x) (y) x² y² xy
1 0.15 0.15 0.02 0.02 0.0225 x̅ 1.083
2 0.35 0.35 0.12 0.12 0.1225 y̅ 1.058
3 1.00 1.00 1.00 1.00 1 Sx 0.739
4 1.25 1.35 1.56 1.82 1.6875 Sy 0.707
5 1.75 1.50 3.06 2.25 2.625
6 2.00 2.00 4.00 4.00 4
∑ 6.50 6.35 9.77 9.22 9.46

n 6

r 0.988

y = b0 + b1.x
b1 = r x (Sy/Sx) b1 0.945 ŷ = 0,035 + 0,945x
b0 = y̅ - b1.x̅ b0 0.035

x y ŷ e
0.15 0.15 0.176 0.026
0.35 0.35 0.365 0.015
1.00 1.00 0.980 - 0.020
1.25 1.35 1.216 - 0.134
1.75 1.50 1.688 0.188
2.00 2.00 1.925 - 0.075
Regression
2.50

2.00

1.50

1.00

0.50

0.00
0.00 0.50 1.00 1.50 2.00 2.50

y ŷ Linear (ŷ)

Residual
e
0.250
0.200
0.150
0.100
0.050
-
0.00 0.50 1.00 1.50 2.00 2.50
-0.050
-0.100
-0.150
-0.200
b1
b0
0.945 ŷ = 0,035 + 0,945x
0.035

x y ŷ (y - ŷ)² xy y² x²
0.15 0.15 0.176 0.001 0.0225 0.02 0.02 x̅
0.35 0.35 0.365 0.000 0.1225 0.12 0.12 y̅
1.00 1.00 0.980 0.000 1 1.00 1.00 Sx
1.25 1.35 1.216 0.018 1.6875 1.82 1.56 Sy
1.75 1.50 1.688 0.035 2.625 2.25 3.06
2.00 2.00 1.925 0.006 4 4.00 4.00
Σ 6.50 6.35 6.35 0.061 9.458 9.218 9.770
n 6
se 0.122987

x0 2.25 ŷ 2.161
α 0.05
tα/2 2.776

E 0.441

upper 2.601
lower 1.720
1.083
1.058
0.739
0.707
Table 10-2 Costs of a Slice of Pizza and Subway Fare (in dollars)

obs Cost_of_Pizza (x) Subway_Fare (y) x² y² xy x-x̅ y-y̅


1 0.15 0.15 0.02 0.02 0.0225 -0.933 -0.908
2 0.35 0.35 0.12 0.12 0.1225 -0.733 -0.389
3 1.00 1.00 1.00 1.00 1 -0.083 0.293
4 1.25 1.35 1.56 1.82 1.6875 0.167 1.350
5 1.75 1.50 3.06 2.25 2.625 0.667 1.500
s 2.00 2.00 4.00 4.00 4 0.917 2.000
∑ 6.50 6.35 9.77 9.22 9.46 0.00 3.85

n 6

r 0.988
(x-x̅)^2
0.871 x̅ 1.083
0.538 y̅ 1.058
0.007 Sx 0.739
0.028 Sy 0.707
0.444
0.840
2.73
1 14
3 24
2 18
1 17
3 27
SUMMARY OUTPUT

Regression Statistics
Multiple R 0.9365858116
R Square 0.8771929825
Adjusted R0.8362573099
Standard E0.4046513191
Observatio 5

ANOVA
df SS MS F Significance F
Regression 1 3.508772 3.508772 21.42857 0.018986
Residual 3 0.491228 0.163743
Total 4 4

CoefficientsStandard Error t Stat P-value Lower 95%Upper 95%Lower 95,0%


Upper 95,0%
Intercept -1.50877193 0.779284 -1.936099 0.148277 -3.988803 0.971259 -3.988803 0.971259
X Variable 0.1754385965 0.037899 4.6291 0.018986 0.054827 0.29605 0.054827 0.29605
SUMMARY OUTPUT

Regression Statistics
Multiple R 0.987811
R Square 0.97577
Adjusted R Square 0.969713
Standard Error 0.128556
Observations 6

ANOVA
df SS MS F Significance F
Regression 1 2.662227 2.662227 161.0877 0.000222
Residual 4 0.066106 0.016527
Total 5 2.728333

Coefficients
Standard Error t Stat P-value Lower 95%Upper 95%Lower 95,0%
Upper 95,0%
Intercept -0.009436 0.100834 -0.09358 0.929943 -0.289395 0.270523 -0.289395 0.270523
X Variable 1 1.032538 0.081353 12.69203 0.000222 0.806665 1.258411 0.806665 1.258411
Upper 95,0%
0.15 0.15
0.35 0.35
1.00 1.00
1.25 1.35
1.75 1.50
2.00 2.00

You might also like