Anda di halaman 1dari 7

# for Linear Correlation and Regression Analysis

## ▶ The objective in this example is to see whether there is a correlation

between two variables and to find a model that predicts one variable in
terms of the other variable.
▶ A business man would like to see whether there is a relationship
between the number of soft-drink cases sold and the temperature on a
hot summer’s day based on information taken from thepast.
▶ He also would like to estimate the number cases of soft-drink, which
will be sold in a particular hot summer’s day in a cricket match.
▶ He clearly recorded temperatures and the number of cases of soft-
drink sold on those particular days. The following table shows the
recorded data from June 1 through June 13. The weatherman predicts
a 34°C temperature for June 14. The businessman would like to meet
all demands for the cases of soft-drink s ordered by customers onJune
14.
for Linear Correlation and Regression Analysis
DAY Cases Temp (°C) TEMPERATURE (°C)
01-Jun 57 31 39

02-Jun 59 28
37
03-Jun 65 28
04-Jun 67 28 35

05-Jun 75 29
06-Jun 81 33 33

07-Jun 86 34
31
08-Jun 88 34
09-Jun 88 29 29

10-Jun 84 37
11-Jun 82 37 27

12-Jun 80 34
25
13-Jun 83 37 55 60 65 70 75 80 85 90
for Linear Correlation and Regression Analysis
▶ Step 1. On the Ribbon, select the Data tab then go to the Analysis
section and click on Data Analysis.
▶ Step 2. When Data Analysis dialog box appears, click onCorrelation.
▶Step 3. When correlation dialog box appears, enter B1:C14 in the
input range box. Click on Labels in first row and enter A17 in the
output range box. Click on OK.

## © 2014 Pearson Education 59 1 - 59

for Linear Correlation and Regression Analysis

## Cases of Soft Drinks Temperature (°C)

Cases of Soft Drinks 1
Temperature (°C) 0.81811780 1
4
The correlation between the number of cases of soft-drinks
demanded and the temperature is a very strong positive
correlation. I.e. as the temperature increases the demand for
cases also increases. The linear correlation coefficient is
0.818117804 which is very close to +1.
© 2014 Pearson Education 1 - 60
for Linear Correlation and Regression Analysis
▶Step 1. On the Ribbon, select the Data tab then go to the
Analysis section and click on DataAnalysis.
▶Step 2. When Data Analysis dialog box appears, click on
Regression.
▶Step 3. When Regression dialog box appears, enter B1:B14 in the
y-range box and C1:C14 in the x-range box. Click on Labels in
first row and enter A21 in the output range box. Click on OK.
▶ Step 4: enter the following formula inB41
=CONCATENATE("Y = ", B38, "X + ",B37)

## © 2014 Pearson Education 5 1 - 61

for Linear Correlation and Regression Analysis

Regression Statistics
Multiple R 0.818117804
R Square 0.669316741
Standard Error 1.93909174
Observations 13

df SS MS F Significance F
Regression 1 83.71607855 83.71607855 22.26445989 0.00063095
Residual 11 41.36084453 3.760076775
Total 12 125.0769231

Coefficients Standard Error t Stat P-value Lower 95% Upper 95% Lower 95.0% Upper 95.0%

## Intercept 14.3925144 3.850819107 3.737520251 0.00328029 5.916918687 22.8681101 5.916918687 22.8681101

Cases of Soft Drinks 0.240882917 0.051050491 4.718523062 0.00063095 0.128521545 0.35324429 0.128521545 0.35324429

## © 2014 Pearson Education 6 1 - 62

for Linear Correlation and Regression Analysis
▶The relationship between the number of cans of soft-drink
and the temperature is:
𝒀 = 0.240882917466411𝑿 + 14.3925143953935
The number of cans of soda = 0.2408829*(Temperature) +
14.392514. Referring to this expression we can approximately predict
the number of cases of SDs needed on June 14. The weather forecast
for this is 34°C , hence the number of cans of soda needed is equal
to; The number of cases of SDs= 0.2408829 *(34) + 14.392514 =