Lab 12
Lab 12
Lab 12
Q) 11.09
| x y|
1. | 40 385 |
2. | 20 400 |
3. | 25 395 |
4. | 20 365 |
5. | 30 475 |
6. | 50 440 |
7. | 40 490 |
8. | 20 420 |
9. | 50 560 |
10. | 40 525 |
11. | 25 480 |
12. | 50 510 |
+----------+
. rename var1 x
. rename var2 y
. regress y x
-------------+----------------------------------------------------------------
. plot(y x)
560 +
| *
| *
| *
| *
| *
y | *
| *
|*
|*
| *
| *
365 + *
+----------------------------------------------------------------+
20 x 50
=343.706+3.22(35)
=346.4
. correlate x y
(obs=12)
| x y
-------------+------------------
x | 1.0000
y | 0.6348 1.0000
Q) 11.13
list
| x y|
1. | 4.3 126 |
2. | 4.5 121 |
3. | 5.9 116 |
4. | 5.6 118 |
5. | 6.1 114 |
6. | 5.2 118 |
7. | 3.8 132 |
8. | 2.1 141 |
9. | 7.5 108 |
regress y x
------------------------------------------------------------------------------
=153.75-6.324(4.8)
=122.8198
. correlate x y
(obs=9)
| x y
-------------+------------------
x | 1.0000
y | -0.9787 1.0000
Q) 11.11
| x y|
1. | 1760 4300 |
2. | 1652 4650 |
3. | 1485 3200 |
4. | 1390 3150 |
5. | 1820 4950 |
6. | 1665 4010 |
7. | 1550 3810 |
8. | 1700 4500 |
9. | 1270 3008 |
regress y x
-------------+----------------------------------------------------------------
=-1847.633+3.35(X)
correlate x y
(obs=9)
| x y
-------------+------------------
x | 1.0000
y | 0.9251 1.0000
plot y x
4950 +
| *
| *
| *
| *
y |
| *
| *
|
| * *
3008 + *
+----------------------------------------------------------------+
1270 x 1820
Q) 11.12
| x y|
1. | 27 250 |
2. | 45 285 |
3. | 72 320 |
4. | 58 295 |
5. | 31 265 |
6. | 60 298 |
7. | 34 267 |
8. | 74 321|
plot y x
321 +
| *
| *
| **
y |
| *
|
|
| * *
250 + *
+----------------------------------------------------------------+
27 x 74
. regress y x
------------------------------------------------------------------------------
-------------+----------------------------------------------------------------
=218.225+1.384(65)
=308.215
. correlate x y
(obs=8)
| x y
-------------+------------------
x | 1.0000
y | 0.9896 1.0
Q) 11.6
| x y|
1. | 26.8 26.5 |
2. | 25.4 27.3 |
3. | 28.9 24.2 |
4. | 23.6 27.1 |
5. | 27.7 23.6 |
6. | 23.9 25.9 |
7. | 24.7 26.3 |
8. | 28.1 22.5 |
9. | 26.9 21.7 |
. regress y x
------------------------------------------------------------------------------
-------------+----------------------------------------------------------------
(obs=12)
| x y
-------------+------------------
x | 1.0000
y | -0.6556 1.0000
REGRESSION LINE :
Y= a + bx
Y=42.5818 + (- 0.686077)X
PART B
X=24.5
Y= 42.5818 - 0.686077*24.5
Y= 25.77 ANS
Q) 11.7
. list
| x y |
1. | 123 76
2. | 55 62
3. | 100 66 |
4. | 75 58 |
5. | 159 88 |
6. | 109 70 |
7. | 48 37 |
8. | 138 82 |
9. | 164 88 |
10. | 28 43 |
regress y x
Source | SS df MS Number of obs = 10
------------------------------------------------------------------------------
-------------+----------------------------------------------------------------
-----------------------------------------------------------------------------
Y= a + bx
Y= 31.70866 + 0.3532667X
correlate x y
(obs=10)
| x y
-------------+------------------
x | 1.0000
y | 0.9515 1.0000
. plot(y x)
88 +
| * *
|
| *
| *
| *
y | *
| *
| *
|*
37 + *
+----------------------------------------------------------------+
28 x 164
Q) 11.8
. regress y x
------------------------------------------------------------------------------
-------------+----------------------------------------------------------------
Regression equation
Y=a +bx
Y= 34.48044+0.4264786
. correlate x y
(obs=20)
| x y
-------------+------------------
x | 1.0000
y | 0.4312 1.000
. plot(y x)
81 +
| *
| * *
| *
| * *
|*
| * *
| * * *
y | *
| *
|*
| *
11 + *
+----------------------------------------------------------------+
35 x 90
.