Correlation and Regression Analysis

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

Name: Vaishnavi peddineni

Class: BS-Biology New 1-1 (summer)


Date: 08 July 2021
Student id:20201513

Seatwork 6 (Correlation and regression


Analysis)
Section Exercise 10.3

1. AUS Rural Bank is studying the relationship between the mean


account balance for individual accounts and the number of
transactions per month. A sample of eight accounts revealed:
Customer 1 2 3 4 5 6 7 8
(x)Mean 27 32 50 24 53 10 16 15
Balance
(₱000s)
(y)No. of 11 2 5 9 7 2 4 10
Transaction
s
Find the coefficient of correlation. Determine at the 0.01
significance level whether the correlation in the population is
greater than zero.

Solution:

Step 1: State the hypotheses.

𝐻0= The correlation in the population is not greater than zero, 𝜇 ≯0

𝐻1= The correlation in the population is greater than zero, 𝜇>0

Step 2: The level of significance and critical region.

𝜶 =0.01, n=8, df = n-1=8-1=7 and 𝒕𝒄𝒓𝒊𝒕𝒊𝒄𝒂𝒍 = +2.998


Step 3: Complete the table and compute for the value of r and t.
Customer x y 𝒙𝟐 𝒚𝟐 xy
1 27 11 729 121 297
2 32 2 1024 4 64
3 50 5 2500 25 250
4 24 9 576 81 216
5 53 7 2809 49 371
6 10 2 100 4 20
7 16 4 256 16 64
8 15 10 225 100 150
Total(n=8) 𝜮(𝒙) = 𝟐𝟐𝟕 𝜮(𝒚)= 50 𝜮𝒙 = 8219
𝟐
𝜮𝒚 = 400
𝟐
𝜮𝒙𝒚 = 1432
𝐧𝚺𝐱𝐲−𝚺(𝐱).𝚺(𝐲) r =
(8)(1432)−(227).(50)

r= 227) 2][8(400)−(50)2]
√[8(8219)−

( 11456−11350

r=
√[65752−51529][3200−2500]
106

r=
√[14196][700] 106

r=
√9937200 106
r=
3152.3324
106
r=
3152.3324

r = 0.0336
= 𝐫×√𝐧−𝟐
𝐭𝐜𝐨𝐦𝐩𝐮𝐭𝐞𝐝 √𝟏−𝐫𝟐

tcomputed = √1−(0.0336)0.0336×√8−22
= √1−0.00112896
0.0336×√6
0.0336×2.4494
tcomputed =
√0.99887104

tcomputed tcomputed
𝐭𝐜𝐨𝐦𝐩𝐮𝐭𝐞𝐝 = 0.0823

Step 4: Decision rule.

Reject the null hypothesis, if 𝒕𝒄𝒐𝒎𝒑𝒖𝒕𝒆𝒅 is greater than the 𝒕𝒄𝒓𝒊𝒕𝒊𝒄𝒂𝒍

Here, 𝒕𝒄𝒐𝒎𝒑𝒖𝒕𝒆𝒅 < 𝒕𝒄𝒓𝒊𝒕𝒊𝒄𝒂𝒍 = 0.0823 < 2.998

So, we do not have enough evidence against 𝐻0 to reject it, so we

fail to reject the null hypothesis.

Step 5: Conclusion.

At 0.01, significance level we can conclude that the correlation in the


population is not greater than zero.

2. SJS Company has been selling to retail customers in the


Metro Manila area. They advertise extensively on radio, print
ads, and in the internet. The Owner would to relationship
between the amount spent on advertising expense and sales
for the last 9 months.
Months Jan Feb Mar Apr May June July Aug Sept
Advertising 10 8 12 11 13 15 14 13 16
Expense
Sales 190 215 190 210 235 208 170 175 250
Reven
ue
Find the coefficient of correlation. Determine at the 0.10
significance level whether the correlation in the population
is greater than zero.

Solution:

Step 1: State the hypotheses.

𝐻0= The correlation in the population is not greater than zero, 𝜇 ≯0

𝐻1= The correlation in the population is greater than zero, 𝜇>0

Step 2: The level of significance and critical region.

𝜶 =0.10, n=9, df = n-1=9-1=8 and 𝒕𝒄𝒓𝒊𝒕𝒊𝒄𝒂𝒍 = +1.397


Step 3: Complete the table and compute for the value of r and t.
Months x y 𝒙𝟐 𝒚𝟐 xy
Jan 10 190 100 36100 1900
Feb 8 215 64 46225 1720
Mar 12 190 144 36100 2280
Apr 11 210 121 44100 2310
May 13 235 169 55225 3055
Jun 15 208 225 43264 3120
Jul 14 170 196 28900 2380
Aug 13 175 169 30625 2275
Sept 16 250 256 62500 4000
Total(n=9 𝜮(𝒙) = 𝟏𝟏𝟐 𝜮(𝒚)= 1843 𝜮𝒙𝟐 = 1444 𝜮𝒚𝟐 = 383039 𝜮𝒙𝒚 = 23040
)
𝐧𝚺𝐱𝐲−𝚺(𝐱).𝚺(𝐲) r =
(9)(23040)−(112).(1843)

r= 112) 2][9(383039)−(1843)2]
√[9(1444)−(
207360−206416
r=
√[12996−12544][3447351−3396649]
944
r=
√[452][50702] 944

r=
√22917304
944 r
=
4787.2021

r = 0.1971

𝐭𝐜𝐨𝐦𝐩𝐮𝐭𝐞𝐝 = 𝐫×√𝟏−𝐫
√𝐧−𝟐
𝟐

tcompute =
d √1−(0.1971)0.1971×√9−
22
= √1−0.03884841
0.1971×√7
tcompute 0.1971×2.6457
d
=
√0.96115159

tcomputed tcomputed
𝐭𝐜𝐨𝐦𝐩𝐮𝐭𝐞𝐝 = 0.5319
Step 4: Decision rule.

Reject the null hypothesis, if 𝒕𝒄𝒐𝒎𝒑𝒖𝒕𝒆𝒅 is greater than the 𝒕𝒄𝒓𝒊𝒕𝒊𝒄𝒂𝒍

Here, 𝒕𝒄𝒐𝒎𝒑𝒖𝒕𝒆𝒅 < 𝒕𝒄𝒓𝒊𝒕𝒊𝒄𝒂𝒍 = 0.5319 < 1.397

So, we do not have enough evidence against 𝐻0 to reject it, so we

fail to reject the null hypothesis.

Step 5: Conclusion.

At 0.01, significance level we can conclude that the correlation in the


population is not greater than zero.

Section Exercise 10.4


1. The production department of WSS Electronics wants to
explore the relationship between the number of employees
who assemble a certain product and the number of units
produced per hour. The complete set of paired observations
follows:
No. of 9 5 12 8 4 2 10 6
Employees
Production(units) 40 22 30 28 15 20 35 25
Determine the coefficient of correlation using spearman rank
correlation and test the significance at 0.05.

Solution:

Step 1: State the hypotheses.

𝐻0= There is no significant correlation between the number of employees


who assemble a certain product and the number of units produced per
hour.
𝜇 =0
𝐻1= There is a significant correlation between the number of employees
who assemble a certain product and the number of units produced per
hour. 𝜇 ≠0

Step 2: The level of significance and critical region.

𝜶 =0.05, n=8, df = n-1=8-1=7 and 𝒕𝒄𝒓𝒊𝒕𝒊𝒄𝒂𝒍 = ±1.895

Step 3: Complete the table and compute for the value of 𝝆 and

t-test.

Pair x y 𝑹𝒙 𝑹𝒚 D 𝑫𝟐
1 9 40 3 1 2 4
2 5 22 6 6 0 0
3 12 30 1 3 2 4
4 8 28 4 4 0 0
5 4 15 7 8 1 1
6 2 20 8 7 1 1
7 10 35 2 2 0 0
8 6 25 5 5 0 0
Total(n=8 Σ𝑫𝟐= 10
)
𝝆= 1- 𝟔𝚺 𝐃𝟐
𝐧(𝐧 𝟐−𝟏)

𝜌 = 1- 8(86(10) 2−1)

𝜌 = 1-

𝜌 = 1- 60

504
ρ = 1- 0.1190

𝝆 = 0.8809

= 𝐫×√𝐧−𝟐
𝐭𝐜𝐨𝐦𝐩𝐮𝐭𝐞𝐝 √𝟏−𝐫𝟐

tcomputed = √1−(0.8809)0.8809×√8−22
= √1−0.77598481
0.809×√6
0.8809×2.4494
tcomputed = √0.22401519

tcomputed tcomputed
𝐭𝐜𝐨𝐦𝐩𝐮𝐭𝐞𝐝 = 4.5587

Step 4: Decision rule.

Reject the null hypothesis, if 𝒕𝒄𝒐𝒎𝒑𝒖𝒕𝒆𝒅 is greater than the 𝒕𝒄𝒓𝒊𝒕𝒊𝒄𝒂𝒍

Here, 𝒕𝒄𝒐𝒎𝒑𝒖𝒕𝒆𝒅 > 𝒕𝒄𝒓𝒊𝒕𝒊𝒄𝒂𝒍 = 4.5587 > 1.895

So, we have enough evidence to reject 𝐻0 , so reject the null

hypothesis.

Step 5: Conclusion
We can conclude that, at 0.05, significance level, there is a significant
correlation between the number of employees who assemble a
certain product and the number of units produced per hour. 𝜇 ≠0

2. A used car depot wants to study the relationship between the


age of a car and its selling price. Listed below is a random
sample of 9 cars sold at the depot during the last 3 months.
Car 1 2 3 4 5 6 7 8 9
Age 2.5 4 5.5 7 6 10 5.5 4 3
(years)
Selling 400 300 250 190 280 120 170 320 350
Price
((₱000s)
Determine the coefficient of correlation using spearman rank
correlation and test the significance at 0.01.

Solution:

Step 1: State the hypotheses.

𝐻0= There is no significant correlation between the age of a car


and its selling price. 𝜇 =0 𝐻1= There is a significant correlation
between the age of a car and its selling price. 𝜇 ≠0

Step 2: The level of significance and critical region.

𝜶 =0.01, n=8, df = n-1=8-1=7 and 𝒕𝒄𝒓𝒊𝒕𝒊𝒄𝒂𝒍 = ±2.998

Step 3: Complete the table and compute for the value of 𝝆 and

t-test.
Car x y 𝑹𝒙 𝑹𝒚 D 𝑫𝟐
1 2.5 400 9 1 8 64
2 4 300 6.5 4 2.5 6.25
3 5.5 250 5 6 1 1
4 7 190 3 7 4 16
5 6 280 4 5 1 1
6 10 120 1 9 8 64
7 8 170 2 8 6 36
8 4 320 6.5 3 3.5 12.25
9 3 350 8 2 6 36
Total(n=9) Σ𝑫𝟐= 236.5
𝒎𝟏= 2 (as 4 years repeated 2 times)
𝟏(𝒎𝟏𝟑−𝒎𝟏) 𝟏(𝒎𝟐𝟑−𝒎𝟐)

𝝆 = 1-𝟔[ 𝚺𝐃𝟐+ 𝟏𝟐 + 𝟏𝟐 + …… ]
𝒏(𝒏𝟐−𝟏)

1(23−2)
12
𝜌
= 6[ 236.5 + ]
9(92−1)

6[ 236.5 + 1(8−2) ]

𝜌 = 1- 12
9(81−1)

6[ 236.5 + 1(6) ]

𝜌 = 1- 12
9(80)

𝜌 = 1- 9(80) 6[ 237 ]
𝜌 = 1-7201422

𝜌 = 1- 1.975

𝝆 = 0.975
= 𝐫×√𝐧−𝟐
𝐭𝐜𝐨𝐦𝐩𝐮𝐭𝐞𝐝 √𝟏−𝐫𝟐

tcomputed

= √1−0.9506250.975×√7

tcomputed 0.975×2.6457
=
√0.049375

tcomputed tcomputed
𝐭𝐜𝐨𝐦𝐩𝐮𝐭𝐞𝐝 = 11.6089

Step 4: Decision rule.

Reject the null hypothesis, if 𝒕𝒄𝒐𝒎𝒑𝒖𝒕𝒆𝒅 is greater than the 𝒕𝒄𝒓𝒊𝒕𝒊𝒄𝒂𝒍

Here, 𝒕𝒄𝒐𝒎𝒑𝒖𝒕𝒆𝒅 > 𝒕𝒄𝒓𝒊𝒕𝒊𝒄𝒂𝒍 = 11.6089 > 2.998

So, we have enough evidence to reject 𝐻0 , so reject the null

hypothesis.

Step 5: Conclusion
We can conclude that, at 0.01, significance level, there is a significant
correlation between the age of a car and its selling price. 𝜇 ≠0

Thank you

You might also like