You are on page 1of 5

Krisha Meah A.

Marte
BS Psychology 1A

ACTIVITY 7: REGRESSION

Problem. A dietetics student wants to look at the relationship between calcium intake and
knowledge about calcium in sports science students. Also, she wants to know if knowledge
about calcium can be used to predict calcium intake of the students. Table 1 shows the data
she collected.
Research question: How can knowledge about calcium predict calcium intake in sports science
students?
In this example there is a single predictor variable (knowledge about calcium) for one response
variable (calcium intake).

Find the following:


1. Plot the scatter diagram for the given data.
2. Find the equation of the regression line.

Respondent Knowledge Calcium XY 𝒙𝟐 𝒚𝟐


Number on Calcium intake
(Out of 50) (mg/day)
X Y
1 10 450 4500 100 202500
2 42 1050 44100 1764 1102500
3 38 900 34200 1444 810000
4 15 525 7875 225 275625
5 22 710 15620 484 504100
6 32 854 27328 1024 729316
7 40 800 32000 1600 640000
8 14 493 6902 196 243049
9 26 730 18980 676 532900
10 32 894 28608 1024 799236
11 38 940 35720 1444 883600
12 25 733 18325 625 537289
13 48 985 47280 2304 970225
14 28 763 21364 784 582169
15 22 583 12826 484 339889
16 45 850 38250 2025 722500
17 18 798 14364 324 636804
18 24 754 18096 576 568516
19 30 805 24150 900 648025
20 43 1085 46655 1849 1177225

TOTAL ∑ 𝒙= 592 ∑ 𝒚= 15,702 ∑ 𝒙𝒚= 497,143 ∑ 𝒙𝟐= 19,852 ∑ 𝒚𝟐= 1,2905,468

Solution:

1
𝑦̅ = ∑𝑛𝑖=1 𝑦𝑖 = 15,702 = 𝟕𝟖𝟓. 𝟏
𝑛 20

1
𝑥̅ = ∑𝑛𝑖=1 𝑥𝑖 = 592 = 𝟐𝟗. 𝟔
𝑛 20
𝑛 ∑𝑖𝑛=1 𝑥𝑖𝑦𝑖−∑𝑛𝑖=1𝑥𝑖 ∑𝑛 𝑖=1𝑦𝑖 20 (497,143)−(592)(15,702) 647,296
𝑏= 𝑛 ∑𝑖𝑛=1 𝑥𝑖2−(∑𝑛𝑖=1𝑥𝑖)2
= 20 (19,852)−(592)2
= 46,576
= 𝟏𝟑.
𝟗𝟎
𝛼 = 𝑌̅ − 𝑏𝑥̅ = 785.1 − (13.90)(29.6) = 373.66
The regression line is:

𝑦̂ = 𝛼 + 𝑏𝑋
𝒚̂ = 𝟑𝟕𝟑. 𝟔𝟔 + 𝟏𝟑. 𝟗𝟎𝑿

3. Find the point estimate of the Calcium Intake when the Knowledge on Calcium is 40.

𝑦̂ = 𝛼 + 𝑏𝑋
𝑦̂ = 373.66 + (13.90)(40)
𝒚̂ = 𝟗𝟐𝟗. 𝟔𝟔 𝒐𝒓 𝟗𝟑𝟎

4. Conduct a hypothesis test on β.

1. 𝑯𝟎: 𝜷 = 𝟎 𝒗𝒔 𝑯𝟏: 𝜷 ≠ 𝟎
2. 𝛼 = 0.05
3. 𝑠𝑥√𝑛−1 (𝑏−𝛽0)
𝑡=
𝑆𝑒
where:
𝑛 ∑𝑛 𝑥𝑖2−(∑𝑛 𝑥 𝑖 )2 𝑛 ∑𝑛 𝑦𝑖2−(∑𝑛 𝑦𝑖)2 𝑛−1
𝑖=1 𝑖=1 𝑖=1 𝑖=1
𝑠𝑥 =
2
𝑛(𝑛−1) 𝑠𝑦 =
2
𝑛(𝑛−1) 𝑠 𝑒
2
= 𝑛−2 (𝑠𝑦2 − 𝑏2𝑠𝑥2

4. 𝑡 > 𝑡𝛼, 𝑛 − 2
𝑡 > 0.05, 18
𝑡 > 2.101

5. 𝑠𝑥2 = 𝑛 ∑𝑛 2 𝑛 2
𝑖=1 𝑥𝑖 −(∑ 𝑖=1 𝑥𝑖) 20 (19,852)−(592)2 46,576
𝑛(𝑛−1) = = 380
= 122.57
20(20−1)
𝑠𝑥 = √122.57= 11.07

𝑠 𝑦2 = 𝑛
𝑛 ∑𝑖=1 𝑦𝑖2−(∑𝑛 𝑖=1 𝑦𝑖)2 11,556,556
20 (12,905,468)−(15,702)2 = 30,411.99
𝑛(𝑛−1) = 20 (20−1) = 380
𝑛−1 20−1
𝑠2= (𝑠 2
− 𝑏2𝑠 2 = (30,411.99 − (13.90)2(122.57) = 7,104.14
𝑒 𝑛−2 𝑦 𝑥 20−2
𝑠𝑒 = √7,104.44= 84.29
𝑠𝑥√𝑛−1 (𝑏−𝛽0) 122.57√20−1(13.90−0)
𝑡= = = 𝟐. 𝟏𝟑4
𝑆𝑒 84.29

6. 𝑡 > 2.101
2.134 > 2.101, True, reject the null hypothesis

7. Therefore, 𝜷 ≠ 𝟎
Krisha Meah A. Marte
BS Psychology 1A

ACTIVITY 8: CORRELATION

1.) What is the relationship between the student’s GPA and Motivation? Compute r and
r2 and interpret the results.

Student Student GPA Motivation XY 𝒚𝟐 𝒙𝟐


Y X
Joe 2 50 100 4 2500
Lisa 2 48 96 4 2304
Mary 2 100 200 4 10000
Sam 2 12 24 4 144
Deana 2.3 34 78.2 5.29 1156
Sarah 2.6 30 78 6.76 900
Jennifer 2.6 78 202.8 6.76 6084
Gregory 3 87 261 9 7569
Thomas 3.1 84 260.4 9.61 7056
Cindy 3.2 75 240 10.24 5625
Martha 3.6 83 298.8 12.96 6889
Steve 3.8 90 342 14.44 8100
Jamell 3.8 90 342 14.44 8100
Tammie 4 98 392 16 9604

TOTAL ∑ 𝒚= 40 ∑ 𝒙= 959 ∑ 𝒙𝒚= 2,915.2 ∑ 𝒚𝟐= 121.5 ∑ 𝒙𝟐= 76,031

Solution:

𝑛 ∑𝑖𝑛= 1 𝑥𝑖𝑦𝑖 − ∑𝑛𝑖=1 𝑥𝑖 ∑𝑛 𝑖1= 𝑦𝑖


𝑟=
√[𝑛 ∑𝑛𝑖=1 𝑥𝑖2 − (∑𝑛𝑖=1 𝑥𝑖)2][𝑛 ∑𝑛
𝑖=1 𝑦𝑖 − (∑𝑛𝑖=1 𝑦𝑖) ]
2 2

14 (2,915.2) − (959)(40) 40,812.8 − 38,360


= =
√[14(76,031) − (952)2][14(121.5) − (40)2 √(1,064,434 − 906,304)(1,701 − 1,600)
2,452.8 2,452.8
=
√15,971,130
= 3,996.39
= 0.61

𝒓𝟐 = (𝟎. 𝟔𝟏)𝟐 = 𝟎. 𝟑𝟕 𝒐𝒓
𝟑𝟕%

Note:
The value of r indicates that Motivation and Student’s GPA has a moderate to good
relationship, in other words higher Motivation leads to higher Student GPA.
The value of r2 indicates that the value of Motivation could be determined by its linear
relationship with Student’s GPA, 37% of the time.
2.) Suppose we wish to test Ho:ρ = 0.70 against H1 :ρ ≠ 0.70 at 0.05 level of significance,
refer to the problem below.

1. 𝑯𝟎: 𝝆 = 𝟎. 𝟕𝟎 𝒂𝒈𝒂𝒊𝒏𝒔𝒕 𝑯𝟏: 𝝆 ≠ 𝟎. 𝟕𝟎


2. 𝛼 = 𝑍0.05
𝑟−𝑍𝜌
3. 𝑧 =
𝜎̂ 𝜌
where: 1 1+𝜌0 1
1 1+𝑟
𝑍𝑟 = 𝐼𝑛 ( ) 𝑍𝜌 = 𝐼𝑛 ( ) 𝜎̂� =
2 1−𝑟 2 1−𝜌0 � √𝑛−3
4. 𝑧 < −𝑧𝛼/2 𝑜𝑟 𝑧 > 𝑧𝑎/2
𝑧 < −0.05/2 𝑜𝑟 𝑧 > 0.05/2
𝑧 < −1.960 𝑜𝑟 𝑧 > 1.960

5. 𝑍𝑟 = 1 1+𝑟
𝐼𝑛 ( )= 1
𝐼𝑛 1+0.61 1
𝐼𝑛 ( 1.61 ) = 0.71
2 1−𝑟
( 1−0.61 ) = 2 0.39
0 2
1 1+𝜌 1 1.70
𝑍𝜌 = 𝐼𝑛 ( )= 1
𝐼𝑛 1+0.70 𝐼𝑛 ( ) = 0.87
2 1−𝜌0
( 1−0.70 ) = 2 0.30
2
𝜎̂ 𝜌 1 1
= √𝑛−3 = √14−3 = 0.30

𝑧 = 𝑍𝑟 − 𝑍𝜌 0.71 − 0.87
= = -𝟎. 53
𝜎̂ 𝜌 0.30

6. 𝑧 < −1.960 𝑜𝑟 𝑧 > 1.960


-0.53 < −1.960 𝑜𝑟 -0.53 > 1.960
False or False, fail to reject the null hypothesis

7. Therefore, 𝝆 ≠ 𝟎. 𝟕𝟎

You might also like