Lecture 29

IIT Kanpur July 201
20 followers
Mar 1, 2024
[Music]
hello friend welcome to the course
multivar procedure with r so you can
recall that in the last lecture we had
talked about the estimation of
parameters and we had uh uh seen that
how to use the method of Maximum
likelihood for estimating the unknown
parameters which can be univariate or
which can be
multivariate
now you have seen that when we try to
obtain the estimates of the parameter or
the value of the parameter Theta based
on any sample then as the sample will
change the value of the parameter will
also change how for example we had
obtain in the case of normal
distribution that the maximum likel
estimator of mean is sample mean
so that means you are going to collect a
sample and then you are trying to find
out the mean of those observation now
definitely you can once you take another
sample the sample values are going to be
changed and then the sample will also
change so when you try to draw different
samples the sample values will be
changing now how to ensure that which
value is correct or which value is the
correct value of the Theta or which
value is representing the value of theta
correctly the representative value of
theta is the value of theta which is
prevailing in the population not in the
sample so one idea is that if uh there
is not much difference
between the values of
uh parameter which are obtained from
different samples possibly we can say
that okay uh they are okay and they are
representing the good value for example
suppose if I make here a claim that my
age is 5
years will you believe on it certainly
no and if I say my age is 20
years you will say no it is not like
this but if I say my age is
suppose 55
years then
possibly you cannot say no
but the question
is you don't need to know my age but my
question is that when I said 5 years 15
years 20 years then you said no but as
soon as I said 55 years you could not
say
no so what is happening that as soon as
I say my age is suppose 5 years then you
try to
compare my structure my face etc etc and
you try to compare it with someone who
is already 5 years old or you try to
compare it with the data which you have
stored in your mind about the 5-year-old
child and there is a huge difference
between the two values and that is why
you say yeah I'm not 5 years old but
when I say that I am 55 years old then
you try to compare my
data with someone who is 55 years older
maybe in your family Maybe your friend
Circle
Etc and then you say
yeah my body structure
my my eyes my hands my skin hairs on my
head Etc they resemble more with a 55
year old person and that is why you
believe on my
statement so if you try to see this
whole process was believing or not on a
statement and this belief or the
decision to believe or not is based on
certain
data I say a statement you try to create
another statement in your mind and you
try to compare it on the basis of some
data set and then whatever is the
outcome based on that you try to say
whether I am correct or you are correct
if I uh correct then you cannot be
correct if I am not correct then you are
correct so what is happening in between
that how you are trying to manipulate
this data inside your mind so that you
can come to a conclusion that uh whether
I am right or you are
right this is the job which is done by
test of hypothesis what is hypothesis
hypothesis is only a
statement so whenever we are dealing in
statistics all our statistical
procedures they are based on the random
sample the random samples vary and
consequently the values of those
parameters meters values of those
statistics they also vary and we want to
test whether the values which you have
obtained on the basis of given sample of
data are they Dependable or not on the
basis of certain
criteria so now this test of hypothesis
can be done on a univariate random
variable on a multivariate random Vector
also means including the multivariate
random Matrix
also
so now from this lecture and in the next
couple of lecture we are going to talk
about the test of hypothesis and
confidence interval
estimation why confidence interval
estimation that you will see that uh the
results of test of hypothesis and
confidence interval estimation they are
inter related once you know the result
of test of hypothesis then you can also
get the result about confidence interval
estimation or by looking at the result
of the confidence interval estimation
you can also take the conclusion about
the test of hypothesis So based on
different types of situation we have
different types of test of hypothesis
but uh surely as I say always my
objective is not here to teach you the
test of hypothesis and confidence
interval estimation my objective is that
I want to give you here the sufficient
knowledge about these topic so that when
we are trying to go further and when we
try to use that concept of test of
hypothesis and confidence interval
estimation in our multivariate procedure
then you understand
it so with this objective in this
lecture I am going to give you here a
brief overview about this procedure that
how do we conduct the test of hypothesis
and in the next lecture we will take
specific examples to conduct the test of
hypothesis particularly about the mean
in the normal population and the mean
Vector in the multivari normal
population so let us begin our lecture
and try to understand about the test of
hypothesis so in this lecture now we are
going to talk about the basic of test of
hypothesis some definition some
terminologies and how do we conduct it
right so as I explain you that we have
noticed that when we try to draw
different types of sample they will give
us the different values of estimates and
the value of these estimates may or may
not be the same as of the unknown value
of the parameters in the population
right so this difference in the
estimated value may be due to some
random variation or there may be some
assignable cost right for example in the
example which I just took about my age
when I said my age is 5 years you can
say that okay there is a assignable call
there is a reason and you cannot believe
on my statement but uh when I said 55
years can you accepted it on the other
hand if I say okay my age is 54 years 6
months then once again you cannot uh
okay that it is not my correct age but
the difference between 55 years and 54
years 6 months or 55 years 6 month is
only a matter of six month which hardly
makes any difference on anything so this
uh variation can be caused it can be
said as if this is a random variation
right so the value which we want to know
is unknown that is the unknown parameter
so we want to check if the estimated
value differs from some other reasonable
value or not so if I try to it in very
simple words then we would like to test
the closeness of the estimated value
with some hypothetical value what is
this hypothetical value suppose in the
same example of my age as soon as I say
or make a statement that my age is 5
years you always try to assume a value
inside your mind that if there is
someone whose body structure looks like
as of mine the age cannot be 5 years or
the age should be more than 5 years or
the age could be close to 54 years 55
years 50 years and so on so this is
hypothetical value which is existing
inside your mind so what are we trying
to do we try to find out the difference
between the estimated value and the
hypothetical value and if this
difference comes out to be less then we
can expect that this is going to be
accepted and we would say that there is
not much significant difference between
the two values right for example and I
say my age is 54 years 6 months and and
55 years then you say there there is not
much significant difference between the
two values right and if this difference
increases then we can expect to reject
it and we would say that there is a
significant difference between the two
values for example if I make a statement
my age is 5 years and you make a
statement that my age is 55 years then
the difference is pretty high and we see
that okay there is a significant
difference between the two values but
the question now here is how to decide
scientifically that the difference
between the two values is significant or
not right so we try to take the help of
this the tool or the statistical
technique of test of hypothesis so
what's a hypothesis a statistical
hypothesis is usually a statement about
a set of parameters of a population
distribution it is called a hypothesis
because it is not known whether or not
it is true for example if I say uh my
age is 52 years now whether my statement
is true or not that you don't know so
that is why it's a hypothesis and a
primary problem in such a case is to
develop a procedure for determining
whether or not the values of a random
sample from this population are
consistent with the hypothesis right
because as soon as I say my age is 55
years you try to do some calculations in
your mind and you try to get an answer
yes my age cannot be 55 years or my age
can be 55 years because it depends on
certain body characteristics so what is
that procedure so this is a
challenge right so basically when we try
to develop such a procedure then we have
to make a rule right and this rule is
going to be dependent on the random
sample what we are observing from a
given population so a test of a
statistical hypothesis is a rule or
procedure for deciding whether to reject
the hypothesis or not right now in case
if I try to take the example of a
normally distributed population which
has got an unknown mean value suppose
here mu and some known variance here one
now in this case variance is known so
I'm not bothered about it but the mean
is unknown so we would like to know its
value on the basis of the given sample
of data so now if I try to create here a
statement that mu is less than 17
right that this mean it is a statal
hypothesis and we could try to test by
observing a random sample from this
population whether mu is less than 177
or not and if the random sample is
deemed to be consistent with the
hypothesis under consideration then we
say that the hypothesis has been
accepted right for example if I say my
age is 55 years and you say my age is 55
years 2 months there is not much
difference between that two values and
who can say that okay there is so my
value is accepted and in case not
accepted then we say that this
hypothesis has been rejected so accepted
and rejected these are the two
terminologies that we use to decide the
outcome of a test on the basis of given
sample of data now this test of
hypothesis can be conducted in different
scenarios based on different types of
sample so when we are working only with
one sample to conclude about a value the
problem is termed as one sample problem
for example if I try to take a sample
from a class to determine that that what
is the age of the student in that class
so I can have a sample based on that I
can compute the sample mean and then I
will conduct the test of hypothesis so
there is only one sample and we want to
make a conclusion only about the
parameter based on one sample so this is
one sample problem now on the other hand
if I try to compare the average ages of
two different classes then what will I
do I will try to take one sample from
class number one and say another sample
from class number two and then I will
try to compare their ages on the basis
of given sample of data so now in this
case particularly we are observing two
samples to make a comparison and a
conclusion about the value then this
type of problem is termed as two sample
problem and if I try to extend it when
we are working with more than two
samples to make a comparison and
conclusion about a value the problem is
termed as multivariate sample problem
right for example if I say a school has
10 section in say class 10 so now there
are 10 sections so now in an exam
suppose I want to compare the average
marks of the students obtained in every
section so now there will be section one
section two section 10 so we will try to
draw here 10 different sample from each
of the section and then we will have
here a problem which is multivariate
sample problem where we will be
comparing the means of 10 samples right
so now the question comes here how to
construct that the decision rule so let
me try to give you here uh this brief
background that when we construct the
test then we simply try to partition the
sample space of X1 X2 xn into two
disjoint subsets for example say CN C
Star right suppose this is my here this
sample space and I try to divide this
into set C and C star and then we try to
obtain here a sample X1 X2 xn and then
we try to compute H 6 based on on that
we try to take a decision that X1 X2 xn
is belonging to suppose here C then we
suppose we decide that if my sample
values are belonging to the Region C
then we will reject the H not H not is a
hypothesis which we call as null
hypothesis that I will try to discuss
soon right and on the other hand in case
if I say that X1 X2 xn ask us that that
this point belong to C star that mean
this region here then then we can say
that we shall accept the null hypothesis
H not right so based on this
classification this C here is
called as critical region or the region
of rejection that means the sample
values are going to lie in this region
and we are going to reject the
hypothesis on the other hand uh this
region here C star this is call here as
a acceptance region or the region of
acceptance that means if the sample
values are going to lie in this region
we are going to accept the hypothesis
and in order to avoid any confusion
ambiguity we say that there is no common
region between C and C Star right they
are his joint there is no region where I
can say that X1 X2 X1 will belong to C
as well as C Star right now the question
comes here what is the statistical
hypothesis in terms of the parameters
right so as I said that hypothesis is a
statement about the parameter and this
is Tal hypothesis has two part which is
called here null hypothesis and
alternative hypothesis so what does this
mean suppose I try to take the same
example that I try to make a statement
that my age is 20 years and now you have
to test it on the basis of sample of
data whether my statement is correct or
not in order to compare it you have to
create one more statement now you create
a statement here my age is suppose 55
years so I want to test my statement
that my age is 20 years in comparison to
your statement that my age is 55 years
right so that is why I'm saying that
here we have two parts one is here uh
called as null hypothesis which is
denoted by H not and this is a statement
which is to be tested or that we want to
test and other part is alternative
hypothesis which is denoted as here H1
or say h and it is just opposite to the
null hypothesis and this is a statement
against which the null hypothesis is
tested right both this null and
alternative hypothesis they are mutually
exclusive and only one of them can be
true at a time either hot can be true or
H1 can be true if hot is true then H1
cannot be true and if H1 is true then s
not cannot be true right and whenever we
are trying to test any hypothesis then
we have to take a decision now this
decision can have different situation
and different out so let us try to
understand it suppose in the actual
situation there are two option that the
null hypothesis can be true or the null
hypothesis can be false now when you try
to talk about the decisions what are the
possible decisions one possible decision
is that we try to accept the H not or we
try to do not accept that is reject H
not so these are the only two option
whether you're trying to accept or not
so now if you try to see what are the
possible decisions so let me call it say
here box number one box number here two
in this way box number here three and
box number here
four right and let us try to analyze the
decision each of the box so let us try
to concentrate on box number one so when
I'm saying that H not is true and we are
going to accept it absolutely no issue
there is no error that is what we want
to do now you come to box number two we
are trying to say that s not is false
and we are going to reject it like is
here like this right I can say here like
this in that case absolutely there is no
issue so now I come to here now we come
to box number here three so you can see
here s not is here false and we are
saying that it's not is accepted that
means we are trying to make a mistake on
the other hand if you come to here box
number here four four you are trying to
say that hn is true and you are not
accepting it so that means we are trying
to make here mistake so you can see here
in box number three and box number four
we are trying to make two possible
mistakes in making a correct decisions
so these are two types of Errors which
are happening in a decision making so
the error which is happening in box
number four that H not is true and we
are not accepting it this is called as
type one error and the error which is
happening in box number
three that s not is false and we are
accepting it this is called as type two
error now the question here is how to
say decide the magnitude about this
error so we try to compute the
probability so the probability of type
one error this is called here a
Alpha and this is also called as the
level of significance and this is the
size of the critical region what is
critical reason if you try to see in
this slide we have talked about the
critical reason here that this is the
reason where our data lies and we reject
the hypothesis or reject the null
hypothesis right now similarly you come
to here box number three so box number
three is also making type two error and
we want to quantify it so we try to
compute the probability of making type
two error and this is indicated by here
like this so the type 1 error is
indicated by Alpha and the type two
error is indicated by the beta or more
precisely the probability of type 1
error is indicated by Alpha and the
probability of type two error is
indicated by Beta right so these are
essentially the terminologies that we
try to use in the test of hypothesis
similarly if you try to look into the
box number here one the probability of
no error is here 1 minus Alpha and and
in box number two the probability of
making no error is 1 minus beta but
anyway uh we we will try to concentrate
or work with the type 1 error and type
two error only but definitely I'm not
going to give you here more details
because when we try to develop a
decision rule we have to develop a
decision rule in such a way such that
the probabilities of these two errors
are minimum and now minimizing both the
errors is not possible so we try to
follow the rule which is given by
the
neon pearon
LMA which is based on the basic
assumption that uh type 1
error is supposed to
be to be more
serious
then typee two
error right so what we try to do here
that whenever we try to develop the
decision rule then following the neon
Pearson LMA we try to fix
Alpha and we try to
minimize beta that is the type two error
so that is the basic fundamental rule so
I'm just giving you an idea and if you
try to read from from from any book or
any types of standard test statistics
that we are going to use here they have
been found using the name Pi LMA and
they are based on the assumption that
type one error is more serious than the
uh type two error right so now I will
just try to give you here a formal
definition of different terminologies so
what is the meaning of accepting H not
this means that the difference between
sample mean and hypothetical population
mean is not significant ific or
whatsoever is the different this is
coming because of the sampling
fluctuations only that means the there
is no assignable cause it is only the
random variation because of which the
different values of estimator from
different sample based on different
sample they are varying right now
another Concept in the test of
hypothesis is about P values right so as
I told you that when we try to take a
decision whether to accept or not the
null hypothesis then we try to decide
the critical reason and then using our
test we try to decide where it is going
whether to the critical regon that is
the acceptance region of rejection or
region of acceptance but when we are
trying to work in the software the
software try to compute uh the test
statistics and they try to report the
critical values using the concept of P
values right and it is possible that
instead of using the concept of the CC
star that is the critical region or
acceptance region we can also use the P
value concept to make the decision of
the test right so P value is essentially
the estimated probability of rejecting
the H not that is the null
hypothesis right so based on that we try
to make our decision Rule and now um
when we are trying to test the
hypothesis then we have two types of uh
test which is one-sided and two-sided
and in one-sided we have left till or
say right tail test and two-sided test
mean left tail and right tail both right
so we try to compute the P value for a
given statistics TX in the case of two
sided hypothesis as probability of this
absolute value of T is greater than
TX under H when H not is true right this
means
when H not is
two and for one-sided we try to compute
the P value as the probability of T
greater than equal to TX when s not is
true or t less than equal to TX when s
not is two for right hand side and left
hand side hypothesis what is called as
right tail
test or the left tail
test right I'm not going to give you all
this detail but I will try to show you
in the examples so right and the
decision rule is extremely simple the P
value will be provided by the software
and the level of significance that is
the size of the critical reason that is
the value of a probability Alpha this is
decided by the experiment that can be 5%
level of significance 1% level of
significance or whatever is more
suitable for the given experiment now so
you have the value of alpha you have
computed the value of P now if if P
value comes out to be is smaller than
the value of alpha that is the
significance level then we reject the
null
hypothesis right and significance level
is the probability of type one error
Alpha as we said earlier right so now
what are the steps when we try to
conduct the test of hypothesis so in
order to test the null hypothesis we
require a good statistical test which is
uh developed by fixing the type one
error and minimizing the type two error
and this is based on the neon pearon LMA
right right so these are the steps so
first we try to define the
distributional Assumption for the random
variable of interest and you specify
them in terms of population parameter
for example that X1 X2 xn they are
coming from normal population with the
MU and uh
andma square based on that we can say
that whether mean mu is known or unknown
or Sigma square is known or unknown like
this then we try to formulate the null
hypothesis and alternative
hypothesis right then we have to fix the
level of significance that is a type one
error and then we try to develop a test
which is equivalent to developing a test
statistics right now this text statistic
is constructed is computed on the basis
of the given given set of data right if
my TX which is a function of tx1 X2 xn
it is now computed on the basis of
random sample and its value is
calculated and then we try to construct
the critical reason k for the statistics
T that is the region where if the value
of test statistics fals for a given set
of data then we will decide that s not
is rejected right and then we try to
compute this value of TX for the given
set of data and then this test
statistics is follows actually a
probability distribution and that is the
job of statisticians to find out and uh
then we try to find out the
corresponding value of the test
statistics based on the probability
distribution from the table of say for
example if the test statistics is follow
a Ki Square distribution then we try to
find out the critical values from the
tables of Ki Square probability if the
test statistics is following a t
distribution then we try to find out the
value of the critical region or the
critical values based on the
probabilities of T distribution and so
on and then we try to compare these two
values the values which we have obtained
on the given set of data and the value
which we we have obtained from the
probabilities based on the distribution
of the test statistics and the rule is
like this if the value of the TX that is
the value of test statistic based on the
sample of data falls into the critical
region then H not is rejected and
automatically the alternative hypothesis
is then accepted on the other hand if
the value of the statistics for the
given set of data TX fall outside the
critical region then H not is not
rejected right and H not is
accepted right and if you are working
with the software then you have to look
at the P value and if P value comes out
to be smaller than Alpha then H not is
rejected the null hypothesis is rejected
right and yeah there is a very good
relationship ship between the decision
based on test of hypothesis and the
confidence interval right and this is
also used in making the right decision
sometime you will see in the software
they will give you only the confidence
interval and based on that you have to
decide whether a particular type of test
of hypothesis is getting accepted or not
but the rule is very simple if hn is
rejected at a significance level Alpha
then there exist a 100 1 minus Alpha per
confidence in interal which yields the
same conclusion as the test right
suppose my null hypothesis is s not
Theta equal to Theta not Theta can be
some parameter like as Mu and we want to
suppose test s not mu is equal to say 20
right so Theta 0 is some known value and
uh we try to create the confidence
interval for Theta now if the confidence
interval of theta does not contain the
value Theta KN Theta KN is is your known
value right right then H not is rejected
so this is how we try to take the same
conclusion that we try to obtain on the
basis of the test of hypothesis using
this confidence interval right so now we
come to an end to this lecture and uh
you can see here that I have uh given
you some details that how are we going
to conduct the test of
hypothesis and as as I said that uh that
that I have my objective was only to
give you a brief
overview right there are many Concepts
which are related to the test of
hypothesis I have not given it here
because it is not my objective here
because I believe that you are aware of
the test of hypothesis concept and I
want to extend it to a multivariate
case so my objective was here to give
you uh some knowledge so that me and you
are at the same level and you know that
what exactly you have to know in order
to understand the lectures in the
further
course so my request to to you will be
here that at least you try to brush up
your uh Concepts about uh the test of
hypothesis and in the next lecture we
are going to
revise the test of hypothesis related to
the mean in a univariate casee in the
case of normal
distribution and how to conduct it in a
our software that will be another issue
so I will try to start with the
univariate case and then I will try to
bring bring you to the multivariate case
as well as when we have more than one
random variables for example testing of
mean from a single population from two
population and then more than two
population then conducting the test of
hypothesis on a univariate random vector
and then to a multivariate random Vector
so that is why in order to prepare my
background to explain you about the
multivariate case it is important for me
to First give you some information about
the univariate case so that uh the
understanding become easier for you so
you try to practice it and I will see
you in the next lecture with more
details till then
[Music]
goodbye
[Music]
[Music]
[Music]
