hello and welcome to todays class so as a
continuation from where we had left off in last class we will start discussing about
confidence intervals ok so just to remind you of what was covered in last class ok [vocalized-noise]
we had shown that given that we know that ninety five percent of the data lies between
plus minus two standard deviations and given that for a sample mean for example you know
that x bar minus mu by sigma by root n is a confidence interval ok is the standard normal
variable so you know that this probability is equal to point nine . five so using some
basic algebra you can show that mu lies between x bar minus one point nine six sigma by root
n and x bar plus one point nine six sigma by root n ok this probability is ninety five
ok so in other words the ninety five percent confidence interval ok lies between x bar
minus one point nine six sigma by root n and x bar plus one point nine six sigma by root
n ok so this is your ninety five percent confidence interval in other words so as we had shown
in discussed in last class if this is your true population mean . then if you do this
sampling then bulk of the times you will have your population mean lie between your range
spin also doesnt work let us write down ok so ninety five percent of times ok this interval
will contain your mean ok that is what the ninety five percent confidence intervals mean
so if you have seen experimental data been represented ok experimental data been represented
very often you will see data being plotted as you have a bar and you have something which
is ticking out on both sides ok so lets say hypothetically it is mid height of you know
population of the class or so on and so forth so what does this mean when data is plotted
like this this is your average or . mean ok or mean value ok and this is called the error
bar ok now this error bar can be either your standard
deviation or ok or instead of standard deviation you can plot sigma by root n ok this is also
called the standard error of the mean or in short it is referred to as s e m ok so in
papers or in research articles you will see data presented as mean plus minus . s e m
ok this is called the standard error of the mean ok so if your sample size is small then
your standard deviation is going to be significantly higher ok so in that way instead of plotting
the standard deviation ok so for the same data lets say for the same data if this is
your mean lets say this is your standard deviation ok this representation does not look nice
but if you plot the same data with the standard so this is which standard deviation ok and
this same data is plotted with standard error of the mean and you will see this is sigma
. i and what is the reason for that because the standard error of the mean
is sigma by root n ok even if you have n is equal to four then this is going to be a half
its size ok sigma by root four so this is going to be a half its size so that is why
if you are have if n is reasonably large then standard deviation is also not so spread out
ok it is . less but standard error of the mean is even lesser so it is sometimes it
is helpful to present your data as mean plus minus s e m ok so instead of having an interval
estimate which gives the mode the minimum and the maximum you might have so the ninety
five percent confidence interval ok ok gives us x bar plus minus one point nine six s e
or one point nine six so this is s e is sigma by root n ok
so let us take an example ok imagine the signal having value mu . is transmitted from a to
b ok and the value received at b is normal is normally distributed with mean ok with
mean of mu ok and variance ok of four ok so to reduce the error ok the same signal is
sent or transmitted . ok nine times ok and lets say ok so the nine times you have send
it and what the signals that the values received as follows ok it is five eight point five
twelve fifteen ok seven nine seven point five six point five and ten point five ok we want
to find out the ninety five percent confidence interval
ok so what do we have we have so ninety five confidence interval so your average . ok your
average is mu ok so the average of this ok average of this is five plus eight point five
plus twelve plus fifteen plus seven plus nine plus seven point five plus six point five
plus ten point five by three four five six seven by nine and this should come out to
be so you plug in the values you should come out to be nine ok so this would mean ok this
would mean my ninety five percent confidence interval has to be nine plus minus ok one
point nine six into sigma by ok root of nine ok . so if you plug in the values this comes
out to be seven point six nine to ten point three one ok so this this tells is that we
have ninety five percent confident that the true message lies between seven point six
nine and ten point three one ok ok so instead of having ok a lower and an
upper limit you might also be you know interested in finding out a lower limit ok so we can
have what is called a one side one sided interval estimation . ok so for doing that for standard
normal variable we know that z less than one so one point six four five is equal to point
nine five ok so we can put x bar minus mu by sigma by root n less than one point six
four five equal to point nine five and this would give us probability of mu greater than
x bar minus one point six four five sigma by root n equal to point nine five ok so again
the ninety five percent confidence interval ok so this is the one sided upper confidence
interval . for mu will be given by x bar minus one point six four five sigma by root n ok
comma infinity because this is the lowest value of possible was possible for mu similarly
you can calculate an absolute upper value ok so the one sided lower confidence interval
ok for mu turns out to be between minus infinity to x bar plus ok so this is what you have
the confidence intervals created for one sided ok
so this set stipulates the lower bound for so this stipulates . the lower bound for x
bar of and this stipulates x bar one plus six point five sigma by . n stipulates the
upper bound for x bar or mu ok sorry mu ok now these cases ok for all these cases we
have assumed the ninety five percent confidence interval right ok but theoretically we can
calculate the confidence fifty percent confidence interval or ninety percent confidence interval
so on so forth and statistically what people typically use maybe the ninety percent the
ninety five percent the ninety eight percent or the ninety nine percent confidence intervals
ok so how do we calculate the ninety percent on all these other confidence intervals
so what you need to note ok . ok ok so lets say we have this interval this is zero ok
you have this normal distribution is symmetric ok this value is minus z alpha by two and
this is z alpha by two so this corresponds to that the area under this curve is alpha
by two the area under this curve is alpha by two so what is in the center this is going
to be one minus alpha ok so we can calculate ok ok so we can find out probability of minus
z alpha by two less than z less than z alpha by two equal to one minus alpha ok and from
this equation we can again write x bar minus z alpha by two into sigma by root n . less
than mu less than x bar plus z of alpha by two into sigma by root n is equal to one minus
alpha ok so for alpha so for hundred into minus ah one minus alpha is the confidence
interval ok so if i plot the values of alpha ok hundred
into one minus alpha ok in percentage you can have ninety five percent you can have
ninety percent ok you can have ninety five percent or you can have ninety nine percent
ok ninety eight percent or ninety nine percent so the corresponding values of z alpha by
two for ninety percent it is one point six four five ok for ninety eight percent it is
. two point three three and four ninety nine percent it is two point five eight ok so this
would mean just just so so if you want to calculate the ninety nine percent confidence
interval then we have the bound the upper and lower bound becomes x bar plus minus two
point five eight sigma by root n ok so this is the ninety nine percent confidence interval
for mu ok so let us take a sample example ok so lets
say a dietitian ok selects a random sample . of n equal to forty nine adults ok of so
what the dietitian is probing is the daily dairy product intake ok and what it finds
is on an average x bar is equal to seven fifty with a standard deviation s equal to twenty
eight ok so we want to calculate the ninety percent and the ninety nine percent confidence
intervals ok so as per this calculation for ninety percent so the confidential interval
for ninety . percent confidence interval will be ok where x bar ok plus minus one point
six four five into s which is twenty eight and n is forty nine so root of forty nine
so it is x bar plus minus one point six four five so this is into four ok and the ninety
nine percent confidence interval will be x bar plus minus two point five eight into four
ok so what you can clearly see is this magnitude
is so this is a tighter limit in other words if this is the interval length for ninety
percent . ok the interval length for ninety nine percent is larger ok the interval length
is larger so this increases the chance that the population mean will lie within it versus
if you choose a tighter range it is likely it is possible there is a greater chance that
your population will be lie outside this ok ok so ok so these were the population means
so once again would like to reiterate ok that for greater confidence interval range ok we
always have a bigger interval and for smaller range so for ninety percent you have a smaller
interval ok so there is a greater chance of error that your population mean wont lie within
this limit ok so that also brings us to . another point ok so lets say if i want so your confidence
interval length so your total confidence interval length ok is what its basically x bar plus
lets say if you want to ninety five percent confidence interval length ok one point nine
six sigma by root n minus x bar minus one point nine six into sigma by root n ok this
is two into one point nine six into sigma by root n so this is your confidence interval
length ok so accordingly for ninety nine percent confidence
interval length this will be two into two point five eight into sigma by root n ok let
us consider a simple example ok and the question is as follows . ok how large a sample is required
to ensure ninety nine percent confidence interval length equal to point one ok so what we have
to do is we have to set point one is equal to two into two point five eight into sigma
by root n ok so based on this you have an equation where you have root n in this equation
ok so we can from this equation so we have two
into two point five eight . into sigma by root n ok is equal to point one so from this
ok i can calculate n is equal to five point one six into sigma whole square ok so what
you see your n has a sigma square dependence ok so if you want the ninety nine percent
confidence interval to be a certain range then your n has to be much larger ok so till
now we have discussed so till now we have discussed about calculating the confidence
intervals for one particular . but in experimental cases in the general case what we are often
interested is to compare the effect of two or or two different situations to probe the
effect of a particular molecule or some particular measurable metric in other words lets say
. you have a patient ok . patient and the doctor is wants to understand ok the doctor
is considering of administrating drug a or drug b ok and he wants to understand which
of these two drugs will have a we much more effective for a given population ok
so the question is which drug is more effective ok so how do we address this question ok so
this brings us to the concept ok so imagine you had this drug a you administrate it with
n one number of in n one sample in the population ok and from this you have measured the response
in terms of a mean response . ok mu one and a mean variance sigma one square ok so if
it was is the for the whole population this is sigma one square reviews for a sample it
is s one square ok similarly for drug b you had n two you sampled n two ok and you know
the population means can be either mu two and sigma two square or s two square if it
is for sample this is for a population so this brings us to the question of estimating
ok difference between two population means ok so what we want to know ok that so if you
have two random variables x one and x two ok this . is corresponding to the drug response
of a this is corresponding to the drug response of b ok so we want to calculate x one bar
minus x two bar and this [vocalized-noise] you would intuitively think that this is the
best ok point estimate ok of mu one minus mu two ok and i can say that this random variable
x one minus x two ok this would follow a normal distribution ok with mean mu one minus mu
two and what is the standard deviation . ok and the standard deviation which has to be
sigma one square by n plus n one plus sigma two square by n two ok standard deviation this is a variance so
this is a standard deviation ok so the standard deviation will be this one
let us take a simple case ok once again so your x one bar minus x two bar have will have
a mean of mu one minus mu two and variance ok which is going to be sigma square by n
one plus sigma two square by n two ok for example take a simple case ok let us say you
are comparing the f you know you are comparing the performance of two tyres . two tyres ok
from two companies ok and you have been given x one bar as twenty six thousand four hundred
x two bar ok and both n one ok so x two bar as twenty five thousand one hundred and n
one equal to n two equal to thirty ok s one square as one lakh four forty thousand and
s two square as one lakh nine sixty thousand ok
so what you will do you will calculate mu one minus mu two point estimate of mu one
minus mu two is x one bar minus x two bar and this is thirteen hundred ok and you can
also calculate so . for this you can calculate this quantity square root of this as a standard deviation and
you can calculate the ninety nine percent confidence interval ok which is given by x
one bar minus x two bar plus minus two point five eight times root of
s one square by n one plus s two square by n two ok and if you plug in the values and
you see this is always positive then this would mean that this the
the tyre from company one is going to be better than tyre from company two ok
if so lets say so i dont know the exact value for this ok
lets say it comes out to be between eight hundred and eighteen hundred ok so lets if
this was the range then you know this is always positive so you can comment . that
with ninety five percent confidence you can state that tyre a is better than tyre two
ok so this is how you
can make use of confidence intervals to either get an estimate of the population mean or
even compare different populations to say which is better which is worse ok
with that i thank you for your attention and i look forward to next
discuss .