abdullah's picture
Add files using upload-large-folder tool
50deadf verified
raw
history blame
54.7 kB
1
00:00:11,020 --> 00:00:13,920
The last chapter we are going to talk in this
2
00:00:13,920 --> 00:00:17,820
semester is correlation and simple linearization.
3
00:00:18,380 --> 00:00:23,300
So we are going to explain two types in chapter
4
00:00:23,300 --> 00:00:29,280
12. One is called correlation. And the other type
5
00:00:29,280 --> 00:00:33,500
is simple linear regression. Maybe this chapter
6
00:00:33,500 --> 00:00:40,020
I'm going to spend about two lectures in order to
7
00:00:40,020 --> 00:00:45,000
cover these objectives. The first objective is to
8
00:00:45,000 --> 00:00:48,810
calculate the coefficient of correlation. The
9
00:00:48,810 --> 00:00:51,210
second objective, the meaning of the regression
10
00:00:51,210 --> 00:00:55,590
coefficients beta 0 and beta 1. And the last
11
00:00:55,590 --> 00:00:58,710
objective is how to use regression analysis to
12
00:00:58,710 --> 00:01:03,030
predict the value of dependent variable based on
13
00:01:03,030 --> 00:01:06,010
an independent variable. It looks like that we
14
00:01:06,010 --> 00:01:10,590
have discussed objective number one in chapter
15
00:01:10,590 --> 00:01:16,470
three. So calculation of the correlation
16
00:01:16,470 --> 00:01:20,740
coefficient is done in chapter three, but here
17
00:01:20,740 --> 00:01:26,060
we'll give some details about correlation also. A
18
00:01:26,060 --> 00:01:28,480
scatter plot can be used to show the relationship
19
00:01:28,480 --> 00:01:31,540
between two variables. For example, imagine that
20
00:01:31,540 --> 00:01:35,400
we have a random sample of 10 children.
21
00:01:37,800 --> 00:01:47,940
And we have data on their weights and ages. And we
22
00:01:47,940 --> 00:01:51,640
are interested to examine the relationship between
23
00:01:51,640 --> 00:01:58,400
weights and age. For example, suppose child number
24
00:01:58,400 --> 00:02:06,260
one, his
25
00:02:06,260 --> 00:02:12,060
or her age is two years with weight, for example,
26
00:02:12,200 --> 00:02:12,880
eight kilograms.
27
00:02:17,680 --> 00:02:21,880
His weight or her weight is four years, and his or
28
00:02:21,880 --> 00:02:24,500
her weight is, for example, 15 kilograms, and so
29
00:02:24,500 --> 00:02:29,680
on. And again, we are interested to examine the
30
00:02:29,680 --> 00:02:32,640
relationship between age and weight. Maybe they
31
00:02:32,640 --> 00:02:37,400
exist sometimes. positive relationship between the
32
00:02:37,400 --> 00:02:41,100
two variables that means if one variable increases
33
00:02:41,100 --> 00:02:45,260
the other one also increase if one variable
34
00:02:45,260 --> 00:02:47,980
increases the other will also decrease so they
35
00:02:47,980 --> 00:02:52,980
have the same direction either up or down so we
36
00:02:52,980 --> 00:02:58,140
have to know number one the form of the
37
00:02:58,140 --> 00:03:02,140
relationship this one could be linear here we
38
00:03:02,140 --> 00:03:06,890
focus just on linear relationship between X and Y.
39
00:03:08,050 --> 00:03:13,730
The second, we have to know the direction of the
40
00:03:13,730 --> 00:03:21,270
relationship. This direction might be positive or
41
00:03:21,270 --> 00:03:22,350
negative relationship.
42
00:03:25,150 --> 00:03:27,990
In addition to that, we have to know the strength
43
00:03:27,990 --> 00:03:33,760
of the relationship between the two variables of
44
00:03:33,760 --> 00:03:37,320
interest the strength can be classified into three
45
00:03:37,320 --> 00:03:46,480
categories either strong, moderate or there exists
46
00:03:46,480 --> 00:03:50,580
a weak relationship so it could be positive
47
00:03:50,580 --> 00:03:53,320
-strong, positive-moderate or positive-weak, the
48
00:03:53,320 --> 00:03:58,360
same for negative so by using scatter plot we can
49
00:03:58,360 --> 00:04:02,530
determine the form either linear or non-linear,
50
00:04:02,690 --> 00:04:06,130
but here we are focusing on just linear
51
00:04:06,130 --> 00:04:10,310
relationship. Also, we can determine the direction
52
00:04:10,310 --> 00:04:12,870
of the relationship. We can say there exists
53
00:04:12,870 --> 00:04:15,910
positive or negative based on the scatter plot.
54
00:04:16,710 --> 00:04:19,530
Also, we can know the strength of the
55
00:04:19,530 --> 00:04:23,130
relationship, either strong, moderate or weak. For
56
00:04:23,130 --> 00:04:29,810
example, suppose we have again weights and ages.
57
00:04:30,390 --> 00:04:33,590
And we know that there are two types of variables
58
00:04:33,590 --> 00:04:36,710
in this case. One is called dependent and the
59
00:04:36,710 --> 00:04:41,330
other is independent. So if we, as we explained
60
00:04:41,330 --> 00:04:47,890
before, is the dependent variable and A is
61
00:04:47,890 --> 00:04:48,710
independent variable.
62
00:04:52,690 --> 00:04:57,270
Always dependent
63
00:04:57,270 --> 00:04:57,750
variable
64
00:05:00,400 --> 00:05:05,560
is denoted by Y and always on the vertical axis so
65
00:05:05,560 --> 00:05:11,300
here we have weight and independent variable is
66
00:05:11,300 --> 00:05:17,760
denoted by X and X is in the X axis or horizontal
67
00:05:17,760 --> 00:05:26,300
axis now scatter plot for example here child with
68
00:05:26,300 --> 00:05:30,820
age 2 years his weight is 8 So two years, for
69
00:05:30,820 --> 00:05:36,760
example, this is eight. So this star represents
70
00:05:36,760 --> 00:05:42,320
the first pair of observation, age of two and
71
00:05:42,320 --> 00:05:46,820
weight of eight. The other child, his weight is
72
00:05:46,820 --> 00:05:52,860
four years, and the corresponding weight is 15.
73
00:05:53,700 --> 00:05:58,970
For example, this value is 15. The same for the
74
00:05:58,970 --> 00:06:02,430
other points. Here we can know the direction.
75
00:06:04,910 --> 00:06:10,060
In this case they exist. Positive. Form is linear.
76
00:06:12,100 --> 00:06:16,860
Strong or weak or moderate depends on how these
77
00:06:16,860 --> 00:06:20,260
values are close to the straight line. Closer
78
00:06:20,260 --> 00:06:24,380
means stronger. So if the points are closer to the
79
00:06:24,380 --> 00:06:26,620
straight line, it means there exists stronger
80
00:06:26,620 --> 00:06:30,800
relationship between the two variables. So closer
81
00:06:30,800 --> 00:06:34,480
means stronger, either positive or negative. In
82
00:06:34,480 --> 00:06:37,580
this case, there exists positive. Now for the
83
00:06:37,580 --> 00:06:42,360
negative association or relationship, we have the
84
00:06:42,360 --> 00:06:46,060
other direction, it could be this one. So in this
85
00:06:46,060 --> 00:06:49,460
case there exists linear but negative
86
00:06:49,460 --> 00:06:51,900
relationship, and this negative could be positive
87
00:06:51,900 --> 00:06:56,100
or negative, it depends on the points. So it's
88
00:06:56,100 --> 00:07:02,660
positive relationship. The other direction is
89
00:07:02,660 --> 00:07:06,460
negative. So the points, if the points are closed,
90
00:07:06,820 --> 00:07:10,160
then we can say there exists strong negative
91
00:07:10,160 --> 00:07:14,440
relationship. So by using scatter plot, we can
92
00:07:14,440 --> 00:07:17,280
determine all of these.
93
00:07:20,840 --> 00:07:24,460
and direction and strength now here the two
94
00:07:24,460 --> 00:07:27,060
variables we are talking about are numerical
95
00:07:27,060 --> 00:07:30,480
variables so the two variables here are numerical
96
00:07:30,480 --> 00:07:35,220
variables so we are talking about quantitative
97
00:07:35,220 --> 00:07:39,850
variables but remember in chapter 11 We talked
98
00:07:39,850 --> 00:07:43,150
about the relationship between two qualitative
99
00:07:43,150 --> 00:07:47,450
variables. So we use chi-square test. Here we are
100
00:07:47,450 --> 00:07:49,630
talking about something different. We are talking
101
00:07:49,630 --> 00:07:52,890
about numerical variables. So we can use scatter
102
00:07:52,890 --> 00:07:58,510
plot, number one. Next correlation analysis is
103
00:07:58,510 --> 00:08:02,090
used to measure the strength of the association
104
00:08:02,090 --> 00:08:05,190
between two variables. And here again, we are just
105
00:08:05,190 --> 00:08:09,560
talking about linear relationship. So this chapter
106
00:08:09,560 --> 00:08:13,340
just covers the linear relationship between the
107
00:08:13,340 --> 00:08:17,040
two variables. Because sometimes there exists non
108
00:08:17,040 --> 00:08:23,180
-linear relationship between the two variables. So
109
00:08:23,180 --> 00:08:26,120
correlation is only concerned with the strength of
110
00:08:26,120 --> 00:08:30,500
the relationship. No causal effect is implied with
111
00:08:30,500 --> 00:08:35,220
correlation. We just say that X affects Y, or X
112
00:08:35,220 --> 00:08:39,580
explains the variation in Y. Scatter plots were
113
00:08:39,580 --> 00:08:43,720
first presented in Chapter 2, and we skipped, if
114
00:08:43,720 --> 00:08:48,480
you remember, Chapter 2. And it's easy to make
115
00:08:48,480 --> 00:08:52,620
scatter plots for Y versus X. In Chapter 3, we
116
00:08:52,620 --> 00:08:56,440
talked about correlation, so correlation was first
117
00:08:56,440 --> 00:09:00,060
presented in Chapter 3. But here I will give just
118
00:09:00,060 --> 00:09:07,240
a review for computation about correlation
119
00:09:07,240 --> 00:09:11,460
coefficient or coefficient of correlation. First,
120
00:09:12,800 --> 00:09:15,680
coefficient of correlation measures the relative
121
00:09:15,680 --> 00:09:19,920
strength of the linear relationship between two
122
00:09:19,920 --> 00:09:23,740
numerical variables. So here, we are talking about
123
00:09:23,740 --> 00:09:28,080
numerical variables. Sample correlation
124
00:09:28,080 --> 00:09:31,500
coefficient is given by this equation. which is
125
00:09:31,500 --> 00:09:36,180
sum of the product of xi minus x bar, yi minus y
126
00:09:36,180 --> 00:09:41,100
bar, divided by n minus 1 times standard deviation
127
00:09:41,100 --> 00:09:44,960
of x times standard deviation of y. We know that x
128
00:09:44,960 --> 00:09:47,240
bar and y bar are the means of x and y
129
00:09:47,240 --> 00:09:51,360
respectively. And Sx, Sy are the standard
130
00:09:51,360 --> 00:09:55,540
deviations of x and y values. And we know this
131
00:09:55,540 --> 00:09:58,460
equation before. But there is another equation
132
00:09:58,460 --> 00:10:05,330
that one can be used For computation, which is
133
00:10:05,330 --> 00:10:09,290
called shortcut formula, which is just sum of xy
134
00:10:09,290 --> 00:10:15,310
minus n times x bar y bar divided by square root
135
00:10:15,310 --> 00:10:18,690
of this quantity. And we know this equation from
136
00:10:18,690 --> 00:10:23,650
chapter three. Now again, x bar and y bar are the
137
00:10:23,650 --> 00:10:30,060
means. Now the question is, Do outliers affect the
138
00:10:30,060 --> 00:10:36,440
correlation? For sure, yes. Because this formula
139
00:10:36,440 --> 00:10:39,940
actually based on the means and the standard
140
00:10:39,940 --> 00:10:44,300
deviations, and these two measures are affected by
141
00:10:44,300 --> 00:10:47,880
outliers. So since R is a function of these two
142
00:10:47,880 --> 00:10:51,340
statistics, the means and standard deviations,
143
00:10:51,940 --> 00:10:54,280
then outliers will affect the value of the
144
00:10:54,280 --> 00:10:55,940
correlation coefficient.
145
00:10:57,890 --> 00:11:01,170
Some features about the coefficient of
146
00:11:01,170 --> 00:11:09,570
correlation. Here rho is the population
147
00:11:09,570 --> 00:11:13,210
coefficient of correlation, and R is the sample
148
00:11:13,210 --> 00:11:17,730
coefficient of correlation. Either rho or R have
149
00:11:17,730 --> 00:11:21,390
the following features. Number one, unity free. It
150
00:11:21,390 --> 00:11:24,890
means R has no units. For example, here we are
151
00:11:24,890 --> 00:11:28,820
talking about whales. And weight in kilograms,
152
00:11:29,300 --> 00:11:33,700
ages in years. And for example, suppose the
153
00:11:33,700 --> 00:11:37,080
correlation between these two variables is 0.8.
154
00:11:38,620 --> 00:11:41,760
It's unity free, so it's just 0.8. So there is no
155
00:11:41,760 --> 00:11:45,640
unit. You cannot say 0.8 kilogram per year or
156
00:11:45,640 --> 00:11:51,040
whatever it is. So just 0.8. So the first feature
157
00:11:51,040 --> 00:11:53,360
of the correlation coefficient is unity-free.
158
00:11:54,180 --> 00:11:56,340
Number two ranges between negative one and plus
159
00:11:56,340 --> 00:12:00,380
one. So R is always, or rho, is always between
160
00:12:00,380 --> 00:12:04,560
minus one and plus one. So minus one smaller than
161
00:12:04,560 --> 00:12:07,340
or equal to R smaller than or equal to plus one.
162
00:12:07,420 --> 00:12:11,420
So R is always in this range. So R cannot be
163
00:12:11,420 --> 00:12:15,260
smaller than negative one or greater than plus
164
00:12:15,260 --> 00:12:20,310
one. The closer to minus one or negative one, the
165
00:12:20,310 --> 00:12:23,130
stronger negative relationship between or linear
166
00:12:23,130 --> 00:12:26,770
relationship between x and y. So, for example, if
167
00:12:26,770 --> 00:12:33,370
R is negative 0.85 or R is negative 0.8. Now, this
168
00:12:33,370 --> 00:12:39,690
value is closer to minus one than negative 0.8. So
169
00:12:39,690 --> 00:12:43,230
negative 0.85 is stronger than negative 0.8.
170
00:12:44,590 --> 00:12:48,470
Because we are looking for closer to minus 1.
171
00:12:49,570 --> 00:12:55,310
Minus 0.8, the value itself is greater than minus
172
00:12:55,310 --> 00:12:59,610
0.85. But this value is closer to minus 1 than
173
00:12:59,610 --> 00:13:03,790
minus 0.8. So we can say that this relationship is
174
00:13:03,790 --> 00:13:05,070
stronger than the other one.
175
00:13:07,870 --> 00:13:11,730
Also, the closer to plus 1, the stronger the
176
00:13:11,730 --> 00:13:16,040
positive linear relationship. Here, suppose R is 0
177
00:13:16,040 --> 00:13:22,740
.7 and another R is 0.8. 0.8 is closer to plus one
178
00:13:22,740 --> 00:13:26,740
than 0.7, so 0.8 is stronger. This one makes
179
00:13:26,740 --> 00:13:31,800
sense. The closer to zero, the weaker relationship
180
00:13:31,800 --> 00:13:35,420
between the two variables. For example, suppose R
181
00:13:35,420 --> 00:13:40,720
is plus or minus 0.05. This value is very close to
182
00:13:40,720 --> 00:13:44,420
zero. It means there exists weak. relationship.
183
00:13:44,980 --> 00:13:47,960
Sometimes we can say that there exists moderate
184
00:13:47,960 --> 00:13:57,080
relationship if R is close to 0.5. So it could be
185
00:13:57,080 --> 00:14:01,360
classified into these groups closer to minus 1,
186
00:14:01,500 --> 00:14:06,220
closer to 1, 0.5 or 0. So we can know the
187
00:14:06,220 --> 00:14:11,680
direction by the sign of R negative it means
188
00:14:11,680 --> 00:14:14,320
because here our ranges as we mentioned between
189
00:14:14,320 --> 00:14:19,520
minus one and plus one here zero so this these
190
00:14:19,520 --> 00:14:24,560
values it means there exists negative above zero
191
00:14:24,560 --> 00:14:26,760
all the way up to one it means there exists
192
00:14:26,760 --> 00:14:31,020
positive relationship between the two variables so
193
00:14:31,020 --> 00:14:35,520
the sign gives the direction of the relationship
194
00:14:36,720 --> 00:14:40,840
The absolute value gives the strength of the
195
00:14:40,840 --> 00:14:43,500
relationship between the two variables. So the
196
00:14:43,500 --> 00:14:49,260
same as we had discussed before. Now, some types
197
00:14:49,260 --> 00:14:51,880
of scatter plots for different types of
198
00:14:51,880 --> 00:14:54,740
relationship between the two variables is
199
00:14:54,740 --> 00:14:59,100
presented in this slide. For example, if you look
200
00:14:59,100 --> 00:15:03,940
carefully at figure one here, sharp one, this one,
201
00:15:04,720 --> 00:15:13,020
and the other one, In each one, all points are
202
00:15:13,020 --> 00:15:15,820
on the straight line, it means they exist perfect.
203
00:15:16,840 --> 00:15:21,720
So if all points fall exactly on the straight
204
00:15:21,720 --> 00:15:24,220
line, it means they exist perfect.
205
00:15:31,400 --> 00:15:35,160
Here there exists perfect negative. So this is
206
00:15:35,160 --> 00:15:37,740
perfect negative relationship. The other one
207
00:15:37,740 --> 00:15:41,240
perfect positive relationship. In reality you will
208
00:15:41,240 --> 00:15:45,680
never see something
209
00:15:45,680 --> 00:15:49,380
like perfect positive or perfect negative. Maybe
210
00:15:49,380 --> 00:15:53,270
in real situation. In real situation, most of the
211
00:15:53,270 --> 00:15:56,730
time, R is close to 0.9 or 0.85 or something like
212
00:15:56,730 --> 00:16:02,070
that, but it's not exactly equal one. Because
213
00:16:02,070 --> 00:16:05,330
equal one, it means if you know the value of a
214
00:16:05,330 --> 00:16:08,630
child's age, then you can predict the exact
215
00:16:08,630 --> 00:16:13,510
weight. And that never happened. If the data looks
216
00:16:13,510 --> 00:16:18,770
like this table, for example. Suppose here we have
217
00:16:18,770 --> 00:16:25,750
age and weight. H1 for example 3, 5, 7 weight for
218
00:16:25,750 --> 00:16:32,450
example 10, 12, 14, 16 in this case they exist
219
00:16:32,450 --> 00:16:37,610
perfect because x increases by 2 units also
220
00:16:37,610 --> 00:16:41,910
weights increases by 2 units or maybe weights for
221
00:16:41,910 --> 00:16:50,180
example 9, 12, 15, 18 and so on So X or A is
222
00:16:50,180 --> 00:16:53,260
increased by two units for each value for each
223
00:16:53,260 --> 00:16:58,860
individual and also weights are increased by three
224
00:16:58,860 --> 00:17:03,080
units for each person. In this case there exists
225
00:17:03,080 --> 00:17:06,820
perfect relationship but that never happened in
226
00:17:06,820 --> 00:17:13,300
real life. So perfect means all points are lie on
227
00:17:13,300 --> 00:17:16,260
the straight line otherwise if the points are
228
00:17:16,260 --> 00:17:21,230
close Then we can say there exists strong. Here if
229
00:17:21,230 --> 00:17:24,750
you look carefully at these points corresponding
230
00:17:24,750 --> 00:17:30,150
to this regression line, it looks like not strong
231
00:17:30,150 --> 00:17:32,630
because some of the points are not closed, so you
232
00:17:32,630 --> 00:17:35,450
can say there exists maybe moderate negative
233
00:17:35,450 --> 00:17:39,530
relationship. This one, most of the points are
234
00:17:39,530 --> 00:17:42,390
scattered away from the straight line, so there
235
00:17:42,390 --> 00:17:46,930
exists weak relationship. So by just looking at
236
00:17:46,930 --> 00:17:50,290
the scatter path, sometimes you can, sometimes
237
00:17:50,290 --> 00:17:53,290
it's hard to tell, but most of the time you can
238
00:17:53,290 --> 00:17:58,250
tell at least the direction, positive or negative,
239
00:17:59,410 --> 00:18:04,150
the form, linear or non-linear, or the strength of
240
00:18:04,150 --> 00:18:09,100
the relationship. The last one here, now x
241
00:18:09,100 --> 00:18:13,800
increases, y remains the same. For example,
242
00:18:13,880 --> 00:18:18,580
suppose x is 1, y is 10. x increases to 2, y still
243
00:18:18,580 --> 00:18:22,220
is 10. So as x increases, y stays the same
244
00:18:22,220 --> 00:18:26,140
position, it means there is no linear relationship
245
00:18:26,140 --> 00:18:28,900
between the two variables. So based on the scatter
246
00:18:28,900 --> 00:18:33,240
plot you can have an idea about the relationship
247
00:18:33,240 --> 00:18:37,800
between the two variables. Here I will give a
248
00:18:37,800 --> 00:18:41,120
simple example in order to determine the
249
00:18:41,120 --> 00:18:45,160
correlation coefficient. A real estate agent
250
00:18:45,160 --> 00:18:50,380
wishes to examine the relationship between selling
251
00:18:50,380 --> 00:18:54,580
the price of a home and its size measured in
252
00:18:54,580 --> 00:18:57,140
square feet. So in this case, there are two
253
00:18:57,140 --> 00:19:02,400
variables of interest. One is called selling price
254
00:19:02,400 --> 00:19:13,720
of a home. So here, selling price of a home and
255
00:19:13,720 --> 00:19:18,020
its size. Now, selling price in $1,000.
256
00:19:25,360 --> 00:19:29,380
And size in feet squared. Here we have to
257
00:19:29,380 --> 00:19:35,640
distinguish between dependent and independent. So
258
00:19:35,640 --> 00:19:39,740
your dependent variable is house price, sometimes
259
00:19:39,740 --> 00:19:41,620
called response variable.
260
00:19:45,750 --> 00:19:49,490
The independent variable is the size, which is in
261
00:19:49,490 --> 00:19:54,570
square feet, sometimes called sub-planetary
262
00:19:54,570 --> 00:19:54,850
variable.
263
00:19:59,570 --> 00:20:06,370
So my Y is ceiling rise, and size is square feet,
264
00:20:07,530 --> 00:20:12,910
or size of the house. In this case, there are 10.
265
00:20:14,290 --> 00:20:17,890
It's sample size is 10. So the first house with
266
00:20:17,890 --> 00:20:26,850
size 1,400 square feet, it's selling price is 245
267
00:20:26,850 --> 00:20:31,670
multiplied by 1,000. Because these values are in
268
00:20:31,670 --> 00:20:37,950
$1,000. Now based on this data, you can first plot
269
00:20:37,950 --> 00:20:46,590
the scatterplot of house price In Y direction, the
270
00:20:46,590 --> 00:20:51,870
vertical direction. So here is house. And rise.
271
00:20:54,230 --> 00:21:01,470
And size in the X axis. You will get this scatter
272
00:21:01,470 --> 00:21:07,370
plot. Now, the data here is just 10 points, so
273
00:21:07,370 --> 00:21:12,590
sometimes it's hard to tell. the relationship
274
00:21:12,590 --> 00:21:15,510
between the two variables if your data is small.
275
00:21:16,510 --> 00:21:21,170
But just this example for illustration. But at
276
00:21:21,170 --> 00:21:25,370
least you can determine that there exists linear
277
00:21:25,370 --> 00:21:28,810
relationship between the two variables. It is
278
00:21:28,810 --> 00:21:35,490
positive. So the form is linear. Direction is
279
00:21:35,490 --> 00:21:41,880
positive. Weak or strong or moderate. Sometimes
280
00:21:41,880 --> 00:21:45,620
it's not easy to tell if it is strong or moderate.
281
00:21:47,720 --> 00:21:50,120
Now if you look at these points, some of them are
282
00:21:50,120 --> 00:21:53,700
close to the straight line and others are away
283
00:21:53,700 --> 00:21:56,700
from the straight line. So maybe there exists
284
00:21:56,700 --> 00:22:02,720
moderate for example, but you cannot say strong.
285
00:22:03,930 --> 00:22:08,210
Here, strong it means the points are close to the
286
00:22:08,210 --> 00:22:11,890
straight line. Sometimes it's hard to tell the
287
00:22:11,890 --> 00:22:15,230
strength of the relationship, but you can know the
288
00:22:15,230 --> 00:22:20,990
form or the direction. But to measure the exact
289
00:22:20,990 --> 00:22:24,130
strength, you have to measure the correlation
290
00:22:24,130 --> 00:22:29,810
coefficient, R. Now, by looking at the data, you
291
00:22:29,810 --> 00:22:31,430
can compute
292
00:22:33,850 --> 00:22:42,470
The sum of x values, y values, sum of x squared,
293
00:22:43,290 --> 00:22:48,170
sum of y squared, also sum of xy. Now plug these
294
00:22:48,170 --> 00:22:50,610
values into the formula we have for the shortcut
295
00:22:50,610 --> 00:22:58,210
formula. You will get R to be 0.76 around 76.
296
00:23:04,050 --> 00:23:10,170
So there exists positive, moderate relationship
297
00:23:10,170 --> 00:23:13,770
between selling
298
00:23:13,770 --> 00:23:19,850
price of a home and its size. So that means if the
299
00:23:19,850 --> 00:23:24,670
size increases, the selling price also increases.
300
00:23:25,310 --> 00:23:29,550
So there exists positive relationship between the
301
00:23:29,550 --> 00:23:30,310
two variables.
302
00:23:35,800 --> 00:23:40,300
Strong it means close to 1, 0.8, 0.85, 0.9, you
303
00:23:40,300 --> 00:23:44,400
can say there exists strong. But fields is not
304
00:23:44,400 --> 00:23:47,960
strong relationship, you can say it's moderate
305
00:23:47,960 --> 00:23:53,440
relationship. Because it's close if now if you
306
00:23:53,440 --> 00:23:57,080
just compare this value and other data gives 9%.
307
00:23:58,830 --> 00:24:03,790
Other one gives 85%. So these values are much
308
00:24:03,790 --> 00:24:08,550
closer to 1 than 0.7, but still this value is
309
00:24:08,550 --> 00:24:09,570
considered to be high.
310
00:24:15,710 --> 00:24:16,810
Any question?
311
00:24:19,850 --> 00:24:22,810
Next, I will give some introduction to regression
312
00:24:22,810 --> 00:24:23,390
analysis.
313
00:24:26,970 --> 00:24:32,210
regression analysis used to number one, predict
314
00:24:32,210 --> 00:24:35,050
the value of a dependent variable based on the
315
00:24:35,050 --> 00:24:39,250
value of at least one independent variable. So by
316
00:24:39,250 --> 00:24:42,490
using the data we have for selling price of a home
317
00:24:42,490 --> 00:24:48,370
and size, you can predict the selling price by
318
00:24:48,370 --> 00:24:51,510
knowing the value of its size. So suppose for
319
00:24:51,510 --> 00:24:54,870
example, You know that the size of a house is
320
00:24:54,870 --> 00:25:03,510
1450, 1450 square feet. What do you predict its
321
00:25:03,510 --> 00:25:10,190
size, its sale or price? So by using this value,
322
00:25:10,310 --> 00:25:16,510
we can predict the selling price. Next, explain
323
00:25:16,510 --> 00:25:19,890
the impact of changes in independent variable on
324
00:25:19,890 --> 00:25:23,270
the dependent variable. You can say, for example,
325
00:25:23,510 --> 00:25:30,650
90% of the variability in the dependent variable
326
00:25:30,650 --> 00:25:36,790
in selling price is explained by its size. So we
327
00:25:36,790 --> 00:25:39,410
can predict the value of dependent variable based
328
00:25:39,410 --> 00:25:42,890
on a value of one independent variable at least.
329
00:25:43,870 --> 00:25:47,090
Or also explain the impact of changes in
330
00:25:47,090 --> 00:25:49,550
independent variable on the dependent variable.
331
00:25:51,420 --> 00:25:53,920
Sometimes there exists more than one independent
332
00:25:53,920 --> 00:25:59,680
variable. For example, maybe there are more than
333
00:25:59,680 --> 00:26:04,500
one variable that affects a price, a selling
334
00:26:04,500 --> 00:26:10,300
price. For example, beside selling
335
00:26:10,300 --> 00:26:16,280
price, beside size, maybe location.
336
00:26:19,480 --> 00:26:23,580
Maybe location is also another factor that affects
337
00:26:23,580 --> 00:26:27,360
the selling price. So in this case there are two
338
00:26:27,360 --> 00:26:32,240
variables. If there exists more than one variable,
339
00:26:32,640 --> 00:26:36,080
in this case we have something called multiple
340
00:26:36,080 --> 00:26:38,680
linear regression.
341
00:26:42,030 --> 00:26:46,710
Here, we just talk about one independent variable.
342
00:26:47,030 --> 00:26:51,610
There is only, in this chapter, there is only one
343
00:26:51,610 --> 00:26:58,330
x. So it's called simple linear
344
00:26:58,330 --> 00:26:59,330
regression.
345
00:27:02,190 --> 00:27:07,930
The calculations for multiple takes time. So we
346
00:27:07,930 --> 00:27:11,430
are going just to cover one independent variable.
347
00:27:11,930 --> 00:27:14,290
But if there exists more than one, in this case
348
00:27:14,290 --> 00:27:18,250
you have to use some statistical software as SPSS.
349
00:27:18,470 --> 00:27:23,390
Because in that case you can just select a
350
00:27:23,390 --> 00:27:25,970
regression analysis from SPSS, then you can run
351
00:27:25,970 --> 00:27:28,590
the multiple regression without doing any
352
00:27:28,590 --> 00:27:34,190
computations. But here we just covered one
353
00:27:34,190 --> 00:27:36,820
independent variable. In this case, it's called
354
00:27:36,820 --> 00:27:41,980
simple linear regression. Again, the dependent
355
00:27:41,980 --> 00:27:44,600
variable is the variable we wish to predict or
356
00:27:44,600 --> 00:27:50,020
explain, the same as weight. Independent variable,
357
00:27:50,180 --> 00:27:52,440
the variable used to predict or explain the
358
00:27:52,440 --> 00:27:54,000
dependent variable.
359
00:27:57,400 --> 00:28:00,540
For simple linear regression model, there is only
360
00:28:00,540 --> 00:28:01,800
one independent variable.
361
00:28:04,830 --> 00:28:08,450
Another example for simple linear regression.
362
00:28:08,770 --> 00:28:11,590
Suppose we are talking about your scores.
363
00:28:14,210 --> 00:28:17,770
Scores is the dependent variable can be affected
364
00:28:17,770 --> 00:28:21,050
by number of hours.
365
00:28:25,130 --> 00:28:31,030
Hour of study. Number of studying hours.
366
00:28:36,910 --> 00:28:39,810
Maybe as number of studying hour increases, your
367
00:28:39,810 --> 00:28:43,390
scores also increase. In this case, if there is
368
00:28:43,390 --> 00:28:46,330
only one X, one independent variable, it's called
369
00:28:46,330 --> 00:28:51,110
simple linear regression. Maybe another variable,
370
00:28:52,270 --> 00:28:59,730
number of missing classes or
371
00:28:59,730 --> 00:29:03,160
attendance. As number of missing classes
372
00:29:03,160 --> 00:29:06,380
increases, your score goes down. That means there
373
00:29:06,380 --> 00:29:09,400
exists negative relationship between missing
374
00:29:09,400 --> 00:29:13,540
classes and your score. So sometimes, maybe there
375
00:29:13,540 --> 00:29:16,580
exists positive or negative. It depends on the
376
00:29:16,580 --> 00:29:20,040
variable itself. In this case, if there are more
377
00:29:20,040 --> 00:29:23,180
than one variable, then we are talking about
378
00:29:23,180 --> 00:29:28,300
multiple linear regression model. But here, we
379
00:29:28,300 --> 00:29:33,630
have only one independent variable. In addition to
380
00:29:33,630 --> 00:29:37,230
that, a relationship between x and y is described
381
00:29:37,230 --> 00:29:40,850
by a linear function. So there exists a straight
382
00:29:40,850 --> 00:29:46,270
line between the two variables. The changes in y
383
00:29:46,270 --> 00:29:50,210
are assumed to be related to changes in x only. So
384
00:29:50,210 --> 00:29:54,270
any change in y is related only to changes in x.
385
00:29:54,730 --> 00:29:57,810
So that's the simple case we have for regression,
386
00:29:58,890 --> 00:30:01,170
that we have only one independent
387
00:30:03,890 --> 00:30:07,070
Variable. Types of relationships, as we mentioned,
388
00:30:07,210 --> 00:30:12,190
maybe there exist linear, it means there exist
389
00:30:12,190 --> 00:30:16,490
straight line between X and Y, either linear
390
00:30:16,490 --> 00:30:22,050
positive or negative, or sometimes there exist non
391
00:30:22,050 --> 00:30:25,830
-linear relationship, it's called curved linear
392
00:30:25,830 --> 00:30:29,290
relationship. The same as this one, it's parabola.
393
00:30:32,570 --> 00:30:35,150
Now in this case there is no linear relationship
394
00:30:35,150 --> 00:30:39,690
but there exists curved linear or something like
395
00:30:39,690 --> 00:30:45,910
this one. So these types of non-linear
396
00:30:45,910 --> 00:30:49,530
relationship between the two variables. Here we
397
00:30:49,530 --> 00:30:54,070
are covering just the linear relationship between
398
00:30:54,070 --> 00:30:56,570
the two variables. So based on the scatter plot
399
00:30:56,570 --> 00:31:00,620
you can determine the direction. The form, the
400
00:31:00,620 --> 00:31:03,860
strength. Here, the form we are talking about is
401
00:31:03,860 --> 00:31:04,720
just linear.
402
00:31:08,700 --> 00:31:13,260
Now, another type of relationship, the strength of
403
00:31:13,260 --> 00:31:16,940
the relationship. Here, the points, either for
404
00:31:16,940 --> 00:31:20,570
this graph or the other one, These points are
405
00:31:20,570 --> 00:31:24,570
close to the straight line, it means there exists
406
00:31:24,570 --> 00:31:28,210
strong positive relationship or strong negative
407
00:31:28,210 --> 00:31:31,230
relationship. So it depends on the direction. So
408
00:31:31,230 --> 00:31:35,710
strong either positive or strong negative. Here
409
00:31:35,710 --> 00:31:38,850
the points are scattered away from the regression
410
00:31:38,850 --> 00:31:41,790
line, so you can say there exists weak
411
00:31:41,790 --> 00:31:45,090
relationship, either weak positive or weak
412
00:31:45,090 --> 00:31:49,650
negative. It depends on the direction of the
413
00:31:49,650 --> 00:31:54,270
relationship between the two variables. Sometimes
414
00:31:54,270 --> 00:31:59,680
there is no relationship or actually there is no
415
00:31:59,680 --> 00:32:02,340
linear relationship between the two variables. If
416
00:32:02,340 --> 00:32:05,660
the points are scattered away from the regression
417
00:32:05,660 --> 00:32:09,800
line, I mean you cannot determine if it is
418
00:32:09,800 --> 00:32:13,160
positive or negative, then there is no
419
00:32:13,160 --> 00:32:16,220
relationship between the two variables, the same
420
00:32:16,220 --> 00:32:20,580
as this one. X increases, Y stays nearly in the
421
00:32:20,580 --> 00:32:24,540
same position, then there exists no relationship
422
00:32:24,540 --> 00:32:29,280
between the two variables. So, a relationship
423
00:32:29,280 --> 00:32:32,740
could be linear or curvilinear. It could be
424
00:32:32,740 --> 00:32:37,280
positive or negative, strong or weak, or sometimes
425
00:32:37,280 --> 00:32:41,680
there is no relationship between the two
426
00:32:41,680 --> 00:32:49,200
variables. Now the question is, how can we write
427
00:32:51,250 --> 00:32:55,290
Or how can we find the best regression line that
428
00:32:55,290 --> 00:32:59,570
fits the data you have? We know the regression is
429
00:32:59,570 --> 00:33:06,270
the straight line equation is given by this one. Y
430
00:33:06,270 --> 00:33:20,130
equals beta 0 plus beta 1x plus epsilon. This can
431
00:33:20,130 --> 00:33:21,670
be pronounced as epsilon.
432
00:33:24,790 --> 00:33:29,270
It's a great letter, the same as alpha, beta, mu,
433
00:33:29,570 --> 00:33:35,150
sigma, and so on. So it's epsilon. I, it means
434
00:33:35,150 --> 00:33:39,250
observation number I. I 1, 2, 3, up to 10, for
435
00:33:39,250 --> 00:33:42,710
example, is the same for selling price of a home.
436
00:33:43,030 --> 00:33:46,970
So I 1, 2, 3, all the way up to the sample size.
437
00:33:48,370 --> 00:33:54,830
Now, Y is your dependent variable. Beta 0 is
438
00:33:54,830 --> 00:33:59,810
population Y intercept. For example, if we have
439
00:33:59,810 --> 00:34:00,730
this scatter plot.
440
00:34:04,010 --> 00:34:10,190
Now, beta 0 is
441
00:34:10,190 --> 00:34:15,370
this one. So this is your beta 0. So this segment
442
00:34:15,370 --> 00:34:21,550
is beta 0. it could be above the x-axis I mean
443
00:34:21,550 --> 00:34:34,890
beta zero could be positive might be negative now
444
00:34:34,890 --> 00:34:40,270
this beta zero fall below the x-axis so beta zero
445
00:34:40,270 --> 00:34:43,850
could be negative or
446
00:34:46,490 --> 00:34:49,350
Maybe the straight line passes through the origin
447
00:34:49,350 --> 00:34:56,990
point. So in this case, beta zero equals zero. So
448
00:34:56,990 --> 00:34:59,890
it could be positive and negative or equal zero,
449
00:35:00,430 --> 00:35:05,510
but still we have positive relationship. That
450
00:35:05,510 --> 00:35:09,970
means The value of beta zero, the sign of beta
451
00:35:09,970 --> 00:35:13,310
zero does not affect the relationship between Y
452
00:35:13,310 --> 00:35:17,850
and X. Because here in the three cases, there
453
00:35:17,850 --> 00:35:22,390
exists positive relationship, but beta zero could
454
00:35:22,390 --> 00:35:25,370
be positive or negative or equal zero, but still
455
00:35:25,370 --> 00:35:31,720
we have positive relationship. I mean, you cannot
456
00:35:31,720 --> 00:35:35,060
determine by looking at beta 0, you cannot
457
00:35:35,060 --> 00:35:37,940
determine if there is a positive or negative
458
00:35:37,940 --> 00:35:41,720
relationship. The other term is beta 1. Beta 1 is
459
00:35:41,720 --> 00:35:46,900
the population slope coefficient. Now, the sign of
460
00:35:46,900 --> 00:35:50,010
the slope determines the direction of the
461
00:35:50,010 --> 00:35:54,090
relationship. That means if the slope has positive
462
00:35:54,090 --> 00:35:56,570
sign, it means there exists positive relationship.
463
00:35:57,330 --> 00:35:59,370
Otherwise if it is negative, then there is
464
00:35:59,370 --> 00:36:01,390
negative relationship between the two variables.
465
00:36:02,130 --> 00:36:05,310
So the sign of the slope determines the direction.
466
00:36:06,090 --> 00:36:11,290
But the sign of beta zero has no meaning about the
467
00:36:11,290 --> 00:36:15,470
relationship between Y and X. X is your
468
00:36:15,470 --> 00:36:19,630
independent variable, Y is your independent
469
00:36:19,630 --> 00:36:19,630
variable, Y is your independent variable, Y is
470
00:36:19,630 --> 00:36:19,650
your independent variable, Y is your independent
471
00:36:19,650 --> 00:36:21,250
variable, Y is your independent variable, Y is
472
00:36:21,250 --> 00:36:21,250
your independent variable, Y is your independent
473
00:36:21,250 --> 00:36:21,250
variable, Y is your independent variable, Y is
474
00:36:21,250 --> 00:36:21,250
your independent variable, Y is your independent
475
00:36:21,250 --> 00:36:24,370
variable, Y is your independent variable, Y is
476
00:36:24,370 --> 00:36:24,370
your independent variable, Y is your independent
477
00:36:24,370 --> 00:36:24,370
variable, Y is your independent variable, Y is
478
00:36:24,370 --> 00:36:24,370
your independent variable, Y is your independent
479
00:36:24,370 --> 00:36:24,370
variable, Y is your independent variable, Y is
480
00:36:24,370 --> 00:36:24,370
your independent variable, Y is your independent
481
00:36:24,370 --> 00:36:24,370
variable, Y is your independent variable, Y is
482
00:36:24,370 --> 00:36:24,370
your independent variable, Y is your independent
483
00:36:24,370 --> 00:36:24,370
variable, Y is your independent variable, Y is
484
00:36:24,370 --> 00:36:24,370
your independent variable, Y is your independent
485
00:36:24,370 --> 00:36:24,370
variable, Y is your independent variable, Y is
486
00:36:24,370 --> 00:36:24,370
your independent variable, Y is your independent
487
00:36:24,370 --> 00:36:24,430
variable, Y is your independent variable, Y is
488
00:36:24,430 --> 00:36:24,770
your independent variable, Y is your independent
489
00:36:24,770 --> 00:36:27,490
variable, Y is your independent variable, Y is
490
00:36:27,490 --> 00:36:30,110
your independent variable, Y is your It means
491
00:36:30,110 --> 00:36:32,450
there are some errors you don't know about it
492
00:36:32,450 --> 00:36:36,130
because you ignore some other variables that may
493
00:36:36,130 --> 00:36:39,410
affect the selling price. Maybe you select a
494
00:36:39,410 --> 00:36:42,490
random sample, that sample is small. Maybe there
495
00:36:42,490 --> 00:36:46,270
is a random, I'm sorry, there is sampling error.
496
00:36:47,070 --> 00:36:52,980
So all of these are called random error term. So
497
00:36:52,980 --> 00:36:57,420
all of them are in this term. So epsilon I means
498
00:36:57,420 --> 00:37:00,340
something you don't include in your regression
499
00:37:00,340 --> 00:37:03,280
modeling. For example, you don't include all the
500
00:37:03,280 --> 00:37:06,180
independent variables that affect Y, or your
501
00:37:06,180 --> 00:37:09,700
sample size is not large enough. So all of these
502
00:37:09,700 --> 00:37:14,260
measured in random error term. So epsilon I is
503
00:37:14,260 --> 00:37:18,840
random error component, beta 0 plus beta 1X is
504
00:37:18,840 --> 00:37:25,070
called linear component. So that's the simple
505
00:37:25,070 --> 00:37:31,430
linear regression model. Now, the data you have,
506
00:37:32,850 --> 00:37:38,210
the blue circles represent the observed value. So
507
00:37:38,210 --> 00:37:47,410
these blue circles are the observed values. So we
508
00:37:47,410 --> 00:37:49,370
have observed.
509
00:37:52,980 --> 00:37:57,940
Y observed value of Y for each value X. The
510
00:37:57,940 --> 00:38:03,360
regression line is the blue, the red one. It's
511
00:38:03,360 --> 00:38:07,560
called the predicted values. Predicted Y.
512
00:38:08,180 --> 00:38:14,760
Predicted Y is denoted always by Y hat. Now the
513
00:38:14,760 --> 00:38:19,740
difference between Y and Y hat. It's called the
514
00:38:19,740 --> 00:38:20,200
error term.
515
00:38:24,680 --> 00:38:28,000
It's actually the difference between the observed
516
00:38:28,000 --> 00:38:31,600
value and its predicted value. Now, the predicted
517
00:38:31,600 --> 00:38:34,720
value can be determined by using the regression
518
00:38:34,720 --> 00:38:39,180
line. So this line is the predicted value of Y for
519
00:38:39,180 --> 00:38:44,480
XR. Again, beta zero is the intercept. As we
520
00:38:44,480 --> 00:38:46,260
mentioned before, it could be positive or negative
521
00:38:46,260 --> 00:38:52,600
or even equal zero. The slope is changing Y.
522
00:38:55,140 --> 00:38:57,580
Divide by change of x.
523
00:39:01,840 --> 00:39:07,140
So these are the components for the simple linear
524
00:39:07,140 --> 00:39:10,840
regression model. Y again represents the
525
00:39:10,840 --> 00:39:14,960
independent variable. Beta 0 y intercept. Beta 1
526
00:39:14,960 --> 00:39:17,960
is your slope. And the slope determines the
527
00:39:17,960 --> 00:39:20,900
direction of the relationship. X independent
528
00:39:20,900 --> 00:39:25,270
variable epsilon i is the random error term. Any
529
00:39:25,270 --> 00:39:25,650
question?
530
00:39:31,750 --> 00:39:36,610
The relationship may be positive or negative. It
531
00:39:36,610 --> 00:39:37,190
could be negative.
532
00:39:40,950 --> 00:39:42,710
Now, for negative relationship,
533
00:39:57,000 --> 00:40:04,460
Or negative, where beta zero is negative.
534
00:40:04,520 --> 00:40:08,700
Or beta
535
00:40:08,700 --> 00:40:09,740
zero equals zero.
536
00:40:16,680 --> 00:40:20,620
So here there exists negative relationship, but
537
00:40:20,620 --> 00:40:22,060
beta zero may be positive.
538
00:40:25,870 --> 00:40:30,210
So again, the sign of beta 0 also does not affect
539
00:40:30,210 --> 00:40:31,990
the relationship between the two variables.
540
00:40:36,230 --> 00:40:40,590
Now, we don't actually know the values of beta 0
541
00:40:40,590 --> 00:40:44,510
and beta 1. We are going to estimate these values
542
00:40:44,510 --> 00:40:48,110
from the sample we have. So the simple linear
543
00:40:48,110 --> 00:40:50,970
regression equation provides an estimate of the
544
00:40:50,970 --> 00:40:55,270
population regression line. So here we have Yi hat
545
00:40:55,270 --> 00:41:00,010
is the estimated or predicted Y value for
546
00:41:00,010 --> 00:41:00,850
observation I.
547
00:41:03,530 --> 00:41:08,220
The estimate of the regression intercept P0. The
548
00:41:08,220 --> 00:41:11,360
estimate of the regression slope is b1, and this
549
00:41:11,360 --> 00:41:16,680
is your x, all independent variable. So here is
550
00:41:16,680 --> 00:41:20,340
the regression equation. Simple linear regression
551
00:41:20,340 --> 00:41:24,400
equation is given by y hat, the predicted value of
552
00:41:24,400 --> 00:41:29,380
y equals b0 plus b1 times x1.
553
00:41:31,240 --> 00:41:35,960
Now these coefficients, b0 and b1 can be computed
554
00:41:37,900 --> 00:41:43,040
by the following equations. So the regression
555
00:41:43,040 --> 00:41:52,920
equation is
556
00:41:52,920 --> 00:41:57,260
given by y hat equals b0 plus b1x.
557
00:41:59,940 --> 00:42:06,140
Now the slope, b1, is r times standard deviation
558
00:42:06,140 --> 00:42:10,540
of y Times standard deviation of x. This is the
559
00:42:10,540 --> 00:42:13,820
simplest equation to determine the value of the
560
00:42:13,820 --> 00:42:18,980
star. B1r, r is the correlation coefficient. Sy is
561
00:42:18,980 --> 00:42:25,080
xr, the standard deviations of y and x. Where b0,
562
00:42:25,520 --> 00:42:30,880
which is y intercept, is y bar minus b x bar, or
563
00:42:30,880 --> 00:42:38,100
b1 x bar. Sx, as we know, is the sum of x minus y
564
00:42:38,100 --> 00:42:40,460
squared divided by n minus 1 under square root,
565
00:42:40,900 --> 00:42:47,060
similarly for y values. So this, how can we, these
566
00:42:47,060 --> 00:42:52,380
formulas compute the values of b0 and b1. So we
567
00:42:52,380 --> 00:42:54,600
are going to use these equations in order to
568
00:42:54,600 --> 00:42:58,960
determine the values of b0 and b1.
569
00:43:04,670 --> 00:43:07,710
Now, what's your interpretation about the slope
570
00:43:07,710 --> 00:43:13,130
and the intercept? For example, suppose we are
571
00:43:13,130 --> 00:43:18,610
talking about your score Y and
572
00:43:18,610 --> 00:43:22,110
X number of missing classes.
573
00:43:29,210 --> 00:43:35,460
And suppose, for example, Y hat Equal 95 minus 5x.
574
00:43:37,780 --> 00:43:41,420
Now let's see what's the interpretation of B0.
575
00:43:42,300 --> 00:43:45,060
This is B0. So B0 is 95.
576
00:43:47,660 --> 00:43:51,960
And B1 is 5. Now what's your interpretation about
577
00:43:51,960 --> 00:43:57,740
B0 and B1? B0 is the estimated mean value of Y
578
00:43:57,740 --> 00:44:02,560
when the value of X is 0. that means if the
579
00:44:02,560 --> 00:44:08,500
student does not miss any class that means x
580
00:44:08,500 --> 00:44:13,260
equals zero in this case we predict or we estimate
581
00:44:13,260 --> 00:44:19,880
the mean value of his score or her score is 95 so
582
00:44:19,880 --> 00:44:27,500
95 it means when x is zero if x is zero then we
583
00:44:27,500 --> 00:44:35,350
expect his or Here, the score is 95. So that means
584
00:44:35,350 --> 00:44:39,830
B0 is the estimated mean value of Y when the value
585
00:44:39,830 --> 00:44:40,630
of X is 0.
586
00:44:43,370 --> 00:44:46,590
Now, what's the meaning of the slope? The slope in
587
00:44:46,590 --> 00:44:51,290
this case is negative Y. B1, which is the slope,
588
00:44:51,590 --> 00:44:57,610
is the estimated change in the mean of Y. as a
589
00:44:57,610 --> 00:45:03,050
result of a one unit change in x for example let's
590
00:45:03,050 --> 00:45:07,070
compute y for different values of x suppose x is
591
00:45:07,070 --> 00:45:15,510
one now we predict his score to be 95 minus 5
592
00:45:15,510 --> 00:45:25,470
times 1 which is 90 when x is 2 for example Y hat
593
00:45:25,470 --> 00:45:28,570
is 95 minus 5 times 2, so that's 85.
594
00:45:31,950 --> 00:45:39,970
So for each one unit, there is a drop by five
595
00:45:39,970 --> 00:45:43,750
units in his score. That means if number of
596
00:45:43,750 --> 00:45:47,550
missing classes increases by one unit, then his or
597
00:45:47,550 --> 00:45:51,790
her weight is expected to be reduced by five units
598
00:45:51,790 --> 00:45:56,150
because the sign is negative. another example
599
00:45:56,150 --> 00:46:05,910
suppose again we are interested in whales and
600
00:46:05,910 --> 00:46:16,170
angels and imagine that just
601
00:46:16,170 --> 00:46:21,670
for example y equal y hat equals three plus four x
602
00:46:21,670 --> 00:46:29,830
now y hat equals 3 if x equals zero. That has no
603
00:46:29,830 --> 00:46:34,510
meaning because you cannot say age of zero. So
604
00:46:34,510 --> 00:46:40,450
sometimes the meaning of y intercept does not make
605
00:46:40,450 --> 00:46:46,150
sense because you cannot say x equals zero. Now
606
00:46:46,150 --> 00:46:50,690
for the stock of four, that means as his or her
607
00:46:50,690 --> 00:46:55,550
weight increases by one year, Then we expect his
608
00:46:55,550 --> 00:47:00,470
weight to increase by four kilograms. So as one
609
00:47:00,470 --> 00:47:05,130
unit increase in x, y is our, his weight is
610
00:47:05,130 --> 00:47:10,150
expected to increase by four units. So again,
611
00:47:10,370 --> 00:47:16,950
sometimes we can interpret the y intercept, but in
612
00:47:16,950 --> 00:47:18,670
some cases it has no meaning.
613
00:47:24,970 --> 00:47:27,190
Now for the previous example, for the selling
614
00:47:27,190 --> 00:47:32,930
price of a home and its size, B1rSy divided by Sx,
615
00:47:33,790 --> 00:47:43,550
r is computed, r is found to be 76%, 76%Sy divided
616
00:47:43,550 --> 00:47:49,990
by Sx, that will give 0.109. B0y bar minus B1x
617
00:47:49,990 --> 00:47:50,670
bar,
618
00:47:53,610 --> 00:48:00,150
Y bar for this data is 286 minus D1. So we have to
619
00:48:00,150 --> 00:48:03,490
compute first D1 because we use it in order to
620
00:48:03,490 --> 00:48:08,590
determine D0. And calculation gives 98. So that
621
00:48:08,590 --> 00:48:16,450
means based on these equations, Y hat equals 0
622
00:48:16,450 --> 00:48:22,990
.10977 plus 98.248.
623
00:48:24,790 --> 00:48:29,370
times X. X is the size.
624
00:48:32,890 --> 00:48:39,830
0.1 B1
625
00:48:39,830 --> 00:48:45,310
is
626
00:48:45,310 --> 00:48:56,650
0.1, B0 is 98, so 98.248 plus B1. So this is your
627
00:48:56,650 --> 00:49:03,730
regression equation. So again, the intercept is
628
00:49:03,730 --> 00:49:09,750
98. So this amount, the segment is 98. Now the
629
00:49:09,750 --> 00:49:14,790
slope is 0.109. So house price, the expected value
630
00:49:14,790 --> 00:49:21,270
of house price equals B098 plus 0.109 square feet.
631
00:49:23,150 --> 00:49:27,630
So that's the prediction line for the house price.
632
00:49:28,510 --> 00:49:34,370
So again, house price equal B0 98 plus 0.10977
633
00:49:34,370 --> 00:49:36,930
times square root. Now, what's your interpretation
634
00:49:36,930 --> 00:49:41,950
about B0 and B1? B0 is the estimated mean value of
635
00:49:41,950 --> 00:49:46,430
Y when the value of X is 0. So if X is 0, this
636
00:49:46,430 --> 00:49:52,980
range of X observed X values and you have a home
637
00:49:52,980 --> 00:49:57,860
or a house of size zero. So that means this value
638
00:49:57,860 --> 00:50:02,680
has no meaning. Because a house cannot have a
639
00:50:02,680 --> 00:50:06,400
square footage of zero. So B0 has no practical
640
00:50:06,400 --> 00:50:10,040
application in this case. So sometimes it makes
641
00:50:10,040 --> 00:50:17,620
sense, in other cases it doesn't have that. So for
642
00:50:17,620 --> 00:50:21,790
this specific example, B0 has no practical
643
00:50:21,790 --> 00:50:28,210
application in this case. But B1 which is 0.1097,
644
00:50:28,930 --> 00:50:33,050
B1 estimates the change in the mean value of Y as
645
00:50:33,050 --> 00:50:36,730
a result of one unit increasing X. So for this
646
00:50:36,730 --> 00:50:41,640
value which is 0.109, it means This fellow tells
647
00:50:41,640 --> 00:50:46,420
us that the mean value of a house can increase by
648
00:50:46,420 --> 00:50:52,280
this amount, increase by 0.1097, but we have to
649
00:50:52,280 --> 00:50:55,700
multiply this value by a thousand because the data
650
00:50:55,700 --> 00:51:01,280
was in thousand dollars, so around 109, on average
651
00:51:01,280 --> 00:51:05,160
for each additional one square foot of a size. So
652
00:51:05,160 --> 00:51:09,990
that means if a house So if house size increased
653
00:51:09,990 --> 00:51:14,630
by one square foot, then the price increased by
654
00:51:14,630 --> 00:51:19,530
around 109 dollars. So for each one unit increased
655
00:51:19,530 --> 00:51:22,990
in the size, the selling price of a home increased
656
00:51:22,990 --> 00:51:29,590
by 109. So that means if the size increased by
657
00:51:29,590 --> 00:51:35,860
tenth, It means the selling price increased by
658
00:51:35,860 --> 00:51:39,400
1097
659
00:51:39,400 --> 00:51:46,600
.7. Make sense? So for each one unit increase in
660
00:51:46,600 --> 00:51:50,300
its size, the house selling price increased by
661
00:51:50,300 --> 00:51:55,540
109. So we have to multiply this value by the unit
662
00:51:55,540 --> 00:52:02,280
we have. Because Y was 8000 dollars. Here if you
663
00:52:02,280 --> 00:52:06,600
go back to the previous data we have, the data was
664
00:52:06,600 --> 00:52:11,120
house price wasn't thousand dollars, so we have to
665
00:52:11,120 --> 00:52:15,840
multiply the slope by a thousand.
666
00:52:19,480 --> 00:52:23,720
Now we
667
00:52:23,720 --> 00:52:30,380
can use also the regression equation line to make
668
00:52:30,380 --> 00:52:35,390
some prediction. For example, we can predict the
669
00:52:35,390 --> 00:52:42,290
price of a house with 2000 square feet. You just
670
00:52:42,290 --> 00:52:43,590
plug this value.
671
00:52:46,310 --> 00:52:52,210
So we have 98.25 plus 0.109 times 2000. That will
672
00:52:52,210 --> 00:53:01,600
give the house price. for 2,000 square feet. So
673
00:53:01,600 --> 00:53:05,920
that means the predicted price for a house with 2
674
00:53:05,920 --> 00:53:10,180
,000 square feet is this amount multiplied by 1
675
00:53:10,180 --> 00:53:18,260
,000. So that will give $317,850. So that's how
676
00:53:18,260 --> 00:53:24,240
can we make predictions for why I mean for house
677
00:53:24,240 --> 00:53:29,360
price at any given value of its size. So for this
678
00:53:29,360 --> 00:53:36,020
data, we have a house with 2000 square feet. So we
679
00:53:36,020 --> 00:53:43,180
predict its price to be around 317,850.
680
00:53:44,220 --> 00:53:50,920
I will stop at coefficient of correlation. I will
681
00:53:50,920 --> 00:53:54,190
stop at coefficient of determination for next time
682
00:53:54,190 --> 00:53:57,770
that's
683
00:53:57,770 --> 00:53:57,990
all