noc21- ma35 - lec10

IIT Kanpur July 201
20 followers
2 Video Views·Dec 3, 2023
[Music]
[Music]
hello friends welcome to the course
essentials of data science with r
software
in which we are going to understand the
topics of probability theory and
statistical inference
now you can recall that in the last
lecture we had
understood the basic elements of
probability theory that how to define an
experiment event etc once you have
defined the
events then we are also interested in
different combinations of
those events like if if this event and
this event occurred together or only an
intersection of those events
occurred together and so on and this
type of feature is very common
when you are trying to use the data
science
so my objective in this lecture is
simply to introduce you with these type
of events where we are trying to
take a combination of the events in
different ways
right now when i am trying to do it
then obviously means at the end we are
going to find out the probability of
such an event but before that we have to
understand
that how we can define such events and
when we are trying to define
such events the vein diagrams
that we have studied in mathematics they
helps us a lot
so it is possible that when you are
trying to
deal with the complicated problem that
many times this
vein diagrams and set theory day
helps us so in this lecture i will
aim that i define such an event and i
try to represent
those events in
the format of vein diagram using the
concepts of
set theory i believe that theory you
have done in
class 10 or class 12 also so i am just
going to use them and i will try to
define different types of
events and after that definitely our
basic objective is that
how to compute the probabilities of such
an event
and then how to compute them in the r
software that will be our final aim
so but at this moment let us try to
prepare the
foundations first so let us begin our
lecture and
and i believe that you have understood
the
meaning of an experiment or a simple
event
so now we try to define first
an event in the format of union of
events
what does this mean suppose there are
two events
which i am trying to indicate here by
capital a and capital b
and obviously these two events are from
the
sample space capital omega now i define
a
new event which is a union b and the
meaning of a union b is that
a union b consists of all the outcome
that are either in a
or in b or in both a and b so now
onwards
we will call this symbol a union b
as the union of the events a and b so
this you can see that this is trying to
define
an event which is based on the
combinations of the outcomes of events
a and b for example in case if i
take a very simple example suppose an
experiment
is conducted on the
two simple experiments that is
a baby is born in a hospital
and we try to determine the gender of
the baby
that can be either male or female so now
the sample space will consist of two
events capital m and capital f
where capital m is indicating the male
child and capital
f is indicating the female child
and now let us try to define here the
event a to b
that the child is a male that is a boy
and similarly we define another event b
which is
f that is b is the event that the child
is a
a female girl now since there are only
two
simple events here a and b so this a
union b
will be the collection of m n and f so
in this case you will see
that this a union b is the whole sample
is space omega
and we had learned in the earlier
lecture
that this event omega is equal to a
union b in this case
is called as sure event that definitely
the
child will be either male or female
and now similarly we can also define the
intersection
of events so suppose a and b are the
two events which belongs to the sample
space capital omega
so if we define here our new event
a intersection b so this is called as
the intersection of the
events a and b this a intersection b
consists of
all such outcomes that are in both a and
b so obviously
the intersection a and b will occur
only if both a and b occur
right so this is how we can define the a
union b
and a intersection b and now we will try
to view these
events using thus vein diagram from the
cut theory right so
you know that when we are trying to
create the vein diagrams
we have this type of circles like this
much this much
or this and this like this right
so this vein diagram will help us in
visualizing the outcomes of different
events a and b and in particularly
when they are trying to occur together
right so now using this vein diagram
first let me try to
define a union b and a intersection b
and after that we will define
different types of events so what we are
going to do that we are
going to uh to observe here two types of
vein diagrams in which there will be
some overlapping
circles and in some cases there will be
some separated circles
so first we try to understand the vein
diagram for
a union b so suppose we have two
events here a and b and these events are
indicated by these two circles so
circle number one is indicating the
event a
and circle number two is indicating the
event b
right so now a union b
is the set of all such events a and b
which occur when a simple event
a or b occurs a or b occurs means
if a occurs if b occurs like this
and if both a and b occurs
right so this entire gray shaded area
that is going to indicate
the area that is covered by the
event a union b and you have to always
keep in mind that
when we are trying to use the word o r
then from the statistical
point of view a or b it means events a
or even b this means that either a
simple
even from a occurs or a simple even from
b occurs or a simple event which is a
part of both a and b
occurs right so this is how we try to
interpret it
and similarly when we try to look at the
intersection b
so once again i will use the circle
number 1 to indicate the event
a and circle number 2 to indicate the
event b
then a intersection b is the set of
all simple events of a and b which
occurs when the simple events of a
and b occur together so if you can see
here
a is occurring here b is occurring here
and this is the part where
a and b are occurring together right
so from the statistical point of view
when we use the word and
mean that means event a and even b occur
that means
both simple events from a and from b
occur together and you will see that
when we are trying to use this symbol a
intersection b
so in many books it is also written as a
b
a union b will be written always as a
union b
but a intersection b at many places you
will find that
this is written as a b so that is what
you have to understand that is the
simple terminology or symbolic symbolic
quotations
when we are trying to deal with
probability theory now similarly we have
defined
some other events for example just like
you have used the
events a and b to define their joint
occurrence together or separately
so similarly we can define some other
type of events for example we know from
the set theory
when we write a minus b that means all
the
events of a which are not in b so
similarly i can translate this
definition into the
event and i can define this a minus b as
an
event that contains all simple events of
a which are not contained
in b you can see here this is the area
grey area
which is containing all the events of a
which are not containing
in the right so this shaded area is
going to indicate the event a minus b
right so this event a minus b
or a but not b the quiz occurs if a
occurs but b does not occur and if you
try to represent
this phenomena using the set theory then
it can be represented by
like this a minus b is equal to a
union b complement right well that is
clear from the
vein diagram also and i am sure that you
have done this thing in
your earlier classes also and similarly
i try to define here another type of
event which is
a complement a complement mean whatever
is
occurring in a except that
everything occurs right so this a
complement
event we are trying to denote by a bar
yes sometime you will see that in some
books it is also defined at a
c means c in the super script for this
event
a complement contains all simple events
of omega which are not contained in a
so in case if you try to represent this
phenomena using the vein diagram
you can see here this is your here
capital omega right
now you are trying to say this part here
is a
so in case if you try to ignore this
part a then whatever
is remaining this is omega minus a and
omega minus
a is your simply your here a complement
so a compliment is actually
omega minus a so this means
the complementary event of a which is
not a
or a complement occurs whenever a does
not
occur and this entire gray area that is
indicating
all the events which are covered under
the category of
a complement right similarly we try to
define here
one more event a is a subset of b
and which is indicated by this symbol
that is a standard simple
so the meaning of a is a subset of b is
that
all simple events of a are also part of
the sample space of b
right so you can see here that in this
case this white
circle this is the event b and this gray
circle this is the event a
right so this area that is defined here
that is the part
where the simple event of a this is also
a part of
b right so this is how you can see that
different types of
events are occurring and you can
correlate these
events with what is really happening in
the real world
and in order to give you an idea let me
try to take here a very simple example
to explain you that how these
events can be defined so let me take a
very popular example of
rolling a die so we know that if our die
is rolled once then the possible
outcomes are going to be the number of
dots on the upper surface of the dice
like this one
if this is your hair dyes then whatever
is occurring here suppose 3 is occurring
that means this is our outcome
right and there are six such
possibilities of getting numbers one two
three four five and six
so now when we try to define here the
sample space so sample space will
consist of
all the simple events and we have
indicated that the simple events are
going to be indicated by the symbol
small omega so we try to take here omega
1 is equal to
1 that means number 1 occurs on the
upper surface
omega 2 is the number 2 occurs omega 3
is the number 3 occurs omega 4 is the
number 4
occurs omega 5 is the number 5 occurs
and omega
6 is the number 6 occurs so this omega
capital omega the sample space will
consist of
6 points omega 1 omega 2 omega 3 omega 4
omega 5 and omega 6.
now in case if you try to define here an
event which consists of 5
numbers 1 2 3 4 5 then this event a can
be defined as the collection of points
omega 1 omega 2 omega 3 omega 4 and
omega 5
and we define one more event here b
which is the set of all odd numbers
so you can see from this capital omega
the
odd numbers are occurring with 1 3 and
5. so that means
b is going to contain the simple events
omega 1 omega 3 and omega 5
and you can see here that this elements
omega 1 omega 3 and omega 5 they are
here right so obviously
b is a subset of a so this is how you
define
such an event right and in case if you
try to
think about a real life scenario suppose
a shopping website is being accessed by
both male and
females and they have the entire
observations and they want to study
that which of the clothings are going to
be sold more for male or for
females so you have to collect all the
data and then you have to take out the
subset of the
females or male from the entire data set
so in those types of events
this type of events and their
probability are going to help you
now i try to take one more example
in which i try to define the event a as
consisting
of three numbers 2 4 and 6 which are
actually
even numbers out of this capital omega
so we have a three simple events omega 2
omega 4 and omega 6
in the event a and then we try to define
here
one more event b which consists of all
the numbers which are divisible by 3. so
there are
two number 3 and 6 which are divisible
by 3 so we try to
create another event here b which is the
collection of omega 3 and omega 6.
now in case if you try to define here a
union b
that means all those events which are in
both a and b
that mean this will consist of omega 2
omega 4 omega 6 this is here omega 2
omega 4 omega 6
and then you have here omega 3 and omega
6 from event b so this omega 3 is here
and omega 6 is here which is already
here so this a union b
will consist of all the points
or the simple even which are either
even or divisible by 3 or both so this
will consist of 4
numbers omega 2 is equal to 2 omega 3 is
equal to 3 omega 4
is equal to 4 and omega 6 equal to 6. so
this is how you can define here
the union of the events now i take one
more example and right try to create an
event here capital a which is the set of
all the
odd numbers 1 3 and 5 out of capital
omega so
this will be having three sample points
omega 1 omega 3 and omega 5
and we try to define here the same event
b
which consists of those numbers which
are divisible by 3. so there are two
number 3 and 6 which are divisible by
3 so this b is the collection of two
points omega 3 and omega c
now i try to define here the event a
intersection b
so a intersection b is going to contain
the common points between a
and b so you can see here that omega 3
and omega 3 are the two point which are
common in both the a and b
so this a intersection b event is the
set of
the simple event in which the numbers
are odd and they are divisible by 3
right well in case if you try to add
here one more number here suppose omega
6
then what will happen then this a
intersection b will consist of two
points omega 3
and omega 6 but still the omega 6 will
not
happen here because you have a condition
here that the numbers have to be
odd that is what you have to keep in
mind that when you are trying to define
different types of combination
you have to check and verify whether
these things are happening or not
right okay so now in case if you try to
take one more example to define
a minus b so we consider here an event a
which consists of omega 1 omega 3 and
omega 5
which are the set of all the odd numbers
as earlier and we try to define here
this is the same event here b
consisting of 2.3 and 6 which is the set
of number which are divisible by 3. then
a minus b is going to be defined by the
collection of those point which are in
a but not in b if you try to see here
omega 1 which is not in b
so it comes over here now you try to see
that omega 3
is common to both so omega 3 will not
appear in
a minus b and similarly if you try to
see here this omega 5 it is also
not here in this capital b
so omega 5 will appear in the event a
minus b and we are not bothered about
omega 6 right so this a minus b event
will consist of
two points omega 1 and omega 5 which is
essentially the set of simple events in
which the numbers are odd
but not divisible by 3. so you can see
you have obtained what exactly you
wanted depending on your objective right
now similarly i try to define
a complementary event so if i try to
define here an event a
which is the set of even numbers so
there are
three numbers 2 4 and 6 in capital omega
which are divisible by 2 the other even
numbers
so whatever numbers which are in a
they will not occur in
a bar so omega is 1 2
3 4 5 and here 6.
and now we try to remove this points a
that is
2 4 and here 6. so now
what is here left this is a the numbers
1 3 and 5.
so this a complement is going to have
all the three numbers omega 1 omega 3
and omega 5
which are essentially the set of odd
numbers and obviously if you try to see
a union a complement this is going to be
omega and that you can see here from
these two
events also and even if you try to
see from this vein diagram also this is
your here capital omega consists of the
point 1
2 3 4 5 6 which is here like this for
this omega and now you are trying to
have here
a circle indicating the event a which is
consisting
of omega 2 omega 4 and omega 6. so now
this a complement is
consisting of this part here which is
the dotted part here
which is here omega 1 omega 3 and omega
5. now if you try to combine this omega
1 omega 3 omega 5
and this omega 2 omega 4 omega 6 that is
going to give you the
complete omega that is the point 1 2 3 4
5 and 6.
right so whatever you have done here you
can verify them through the wind
diagrams also
now i try to define one more property of
this
events two events a and b are said to be
disjoint
if a intersection b is equal to five
that means there is no element which is
common between
a and b and if you try to create the
vein diagram of such an
event this will look like this right
this is your here capital omega and so
you can see here there are no points
which are common between this a and b
and if they are common the possibly the
vein diagram will look
like this right or that may be something
like this
also so the interpretation of disjoint
event is that
both the events a and b they cannot
occur
simultaneously so you can now
correlate this statement
with the happening of various types of
events you want to
compute the probability right and in
case if you try to
see here from yours even point of view
then the event a and a complement both
are
disjoint event right for example if you
want to
see in through the vein diagram this is
your here a
and this part here is your a complement
so if i try to make
this a to b here by dotted then this a
complement is the remaining parts and
you can see here
both of them cannot occur together right
okay now whatever i have told you about
these events i have explained you by
taking the example of only
two events just for the sake of
simplicity so that you can understand it
easily but these
events can be be defined for more than
two
events also these definitions whatever
you have done either for
union intersection etc they can be
extended for
more than two events also so let me try
to give you
a fair idea about these things suppose
if i say i have here more than two
events which are indicated by a one a
two a
m so now we have here m events
now these events are said to be mutually
or pairwise is joint if a i intersection
aj is equal to phi
and in this case yeah whenever i is not
equal to j
and and it goes from 1 to m and let me
try to show you
this definition by this example also for
example
the same example in which the die is
roll and we have here
six points in the sample space if i try
to take here
two events here a and b like as a is the
collection of all those points
which are odd on and b is the collection
of all those points which are
even in numbers then these both these
events a and b
both are disjoint because either it can
occur
and when a is occurring then no number
which is
even can come and similarly if b is
occurring that means
only the even number are coming to
myspace
so this odd numbers cannot come so this
is how
both this events a and b they are going
to be
disjoint right and what i am trying to
say here that if you want to know
about that more than two events are
going to be disjoint or not suppose if i
say that there are three
events a b and c and if i want to know
whether they are disjoint or not so we
have to check
their property pairwise i have to check
for a
and b b and c and a and c right and
if all of them are equal to phi then i
can say that
all the events a and b and they are
mutually disjoint so now similarly we
can extend the definition
of unions means earlier we have
understood what is the meaning of
a union b so similarly instead of having
only two
even suppose i have here more than two
even say
an events and they are indicated by a
one a two a m
so the union of a1 a2 am it is going to
be
indicated by a1 union a2 union up to am
and this is also an event and this event
is
defined to be the event consisting of
all the outcomes
that are in a i for at least one i i
goes from 1 to m or in
very simple words i can say that the
union of the ai occurs when at least
one of the events ai occurs that is as
simple as that
and this is simply an extension of the
concept that you have learnt
in the case of a union b right now as we
have defined the
union of more than two even similarly i
can also define the
intersection of more than two events so
suppose if i have here
m events say a1 a2 am then the
intersection of these event is going to
be defined as here a1 intersection a2
intersection am
and this event is defined to be the even
consisting of those outcome that are in
all events a1 a2 am right and in
very simple words i can say that the
intersection of
these events occurs when all the events
ai occurs right so this is how you can
define
here the the intersection of more than
two events also
ok so now we come to an end to this
lecture and you can see that this
lecture was a very simple
lecture and but it was trying to
correlate what you have done earlier
in your set theory and in vein diagrams
and through this thing i am trying to
interconnect the probability theory
whenever you are trying to compute
any probability this is obvious that you
need to know
that what is the event what is your
objective what you really want to
find and based on that you have to
define an
event in a proper way and then you have
to see how this
event is going to occur
there can be different ways of knowing
it
either you can compute the number of
events the number of possible events
which are going to
happen or not happen and exactly on the
same line this vein diagram will also
help you in counting of those
numbers which are favorable to us
and it will be your choice that which of
the methodology you
are going to opt when you are trying to
implement these concepts in
real life so now i would request you
why don't you take some examples from
your book from your
set theory and vein diagram and try to
just
practice and have an idea what is the
meaning of
the union intersection complement
minus etcetera once you practice it for
simple events like as two events or
three events
it will not be difficult for you to
extend this definition for
a general case so you try to practice it
and i will see you in the
next lecture with more details on
probability theory till then
good bye
[Music]
[Music]
you
