Welcome to BLOCK 5
Probability and Statistics.
These are problems related to the basic concepts
on probabilities, and random variables.
Let's use as example, an experiment
that is based on tossing a dice twice.
Here, we have a representation of the sample of space.
The even space.
In this case, we see 36 possible results.
These results are the simple events
that we define in the companion video.
Okay,
now let's define some events.
Dice add to 3.
This would be the result of combining the simple events
(1,2) and (2,1).
And the probability would be
two divided into 36.
Because we are assuming fair dice.
And in this case, we have 36
possible results in this sample of space
Dice add to 6.
We have probabilities of results (1,5),
(2,4), (3,3), (4,2) and (5,1).
And so, five simple events.
So the probability is 5 divided into 36
Now. Red die shows one.
This is all the simple results, simple events
whose first outcome is one.
We have six possibilities.
Probability 6 divided into 36.
And the same applies to green die showing one.
So this means that the second die
is 1 and the first any number.
Let's continue with this example.
Let's define some events.
First event is read die shows one
the representation, could be this.
Okay, let's choose
green die shows one.
In this case, we have the set of possible of simple events
is the one highlighted in the horizontal shape.
Then, we answer the question.
what's the probability of A union B?
In this case, we have to apply the property
that the probability of the union of two events
is the summatory of the probability of the events
minus the probability of the intersection.
So minus the shown probability of A and B, the joint probability,
the set containing the
the intersection is just
the outcome (1,1). Okay. So
the result is
6/36 plus
6/36 minus 1/36
So 11/36,
Let's continue, red die shows 2
Red die shows five.
These events are not intersecting.
Okay.
So in this case, we see that the intersection
is the empty event and thus, the probability of the union
is just the sum of
the individual probabilities that we have used before.
So 12 divided into 36.
Of course, this can be simplified but I leave as it is to see the process.
We have again
tossing two dice and then we have the event A
'Red die shows 1' and
event B 'Green die shows 1'
in this case let us check
whether A and B are independent.
So, we have to use the definition:
the joint probability to be equal to the product
of the probabilities of the events.
We have seen that the probability of A
is 6/36, the probability of B
is the same, 6/36,
The joint probability involves one outcome, that is (1,1).
So one divided into thirty six (1/36).
Now the probability of the joint set
is 1/36 and this is exactly
the same probability as the product of the two individual events.
So, the property holds and then both are independent. Yes
Let's continue we're still seeing a die
but now we are going to define a random variable.
We have many possibilities defining a discrete random variable
from the experiment of tossing twice a die
that is in this case, for example,
I start by defining or taking a look
at the variable, the random variable, defined
as the sum of the values from the two experiments.
In this case, I have dice add to 2.
One possible event.
Then I have the probability this is the probability function
one divided into 36. Then, dice add to 3.
We have two possible events.
So, simple events.
This is (1,2) and (2,1).
So, the probability is
two divided into 36 (2/36).
We can continue to the exercise
and we will see that there is a connection between the value of the random variable
and the simple events that we have observed
as outcomes of the experiment of tossing twice dice.
So now let us define in that table
and also to give a chart,
the natural chart, would be a bar plot
and the table
indicating the probability function is just
the possible values
for this random variable that these sum of two dice
and the probability. We can check that adding up the probabilities
of the probability function is equal to one.
Okay.
And here we see the shape, the shape of this random variable.
This is the shape of
the probability function.
Let's continue with tossing two dice.
And now I use instead of the basic event,
I use the definition of the random variable.
So sum of two dice,
in this case sum equals three.
This refers to the simple events
that are (1,2) and (2,1).
Then I define
the B event 'add to 6'.
We have some more possibilities
Are A and B independent events?
Let's use again the definition
so we have probability of A
is 2 divided into 36,
for the probability of B
we have here five simple events.
So five divided into 36.
The joint probability is zero,
because they do not share any outcome.
So, in these cases what I have is the joint probability to be zero
and the product of the single probabilities
for A and B that are not zero.
So, both events are not independent.
Let's apply Bayes' rule.
Very important from a survey at the UPC
we know that 30% of the population are women
and of the female students
60% are enrolled in an engineering bachelor,
while 80% of the male students do so.
Now, we have selected randomly
a single unit, a single student, okay.
And we found to be an engineering student.
So it is a student from engineering.
And the question would be, what's the probability
that it's a male?
So, in this case,
we have to set some names for the events.
I define E to be a engineering student.
I define F a female, I define M as male.
And according to the description
we have that the probability of female is 0.3.
Thus, the probability of male is 0.7.
Then, we know that conditional
to be female engineering, the studies are 0.6.
and conditional to be man,
then the probability of engineering is 0.8.
So this can be seen in this omega.
That is the set of all possible events.
And then I have a partition, male and female,
and I have an event E
this event E, that is 'engineering student'
is just the composition
of the intersection between E
with the basic elements in the partition
female plus the right part that is the intersection
between E and M, that is in the partition.
The second element in the partition that is being male.
Okay, so let's apply the question in this case
is exactly conditional to E,
which is the probability of M
and we apply Bayes' rule.
As we have seen in the previous video, in the companion video.
Okay, So we have everything here.
We have that the probability of male conditional to being a student
in engineering then is just the probability
of engineering conditional to man by the probability of male
and divided into the total
probability of engineering student.
That is in fact the joint probability of the intersection
yellow to F and yellow to M.
So, finally we have all the numbers on the left
and we just apply the formula and we see that the probability
of male conditional to engineering student is 0.76.
So it is a little bit
greater than 0.7.
Okay, so in this case, we have seen an example
where these two events are not independent, for example,
and we have calculated involved probabilities. So, some more exercises about Bayes' rule.
Now, teachers' satisfaction,
this is a very classical example.
We have a sample here and the sample is composed
by 778 units.
Okay.
And we have the job satisfaction.
Two categories satisfy, unsatisfied.
And then, we have the level of the teacher.
So if college teacher, high school or elementary,
this is what we call a contingency table.
Okay.
And it describes the number of units in the two categories
defined by factors of satisfaction and factor level.
Okay.
If instead of using decidedly this absolute numbers,
we would like to refer
to the proportions, then we can divide
each of the central cells
and also the marginal cells, the vertical total cell
and the horizontal total cells.
And this is what we get.
Okay, This is just dividing.
So the vertical total
indicates the marginal distribution of level.
Okay.
And the horizontal total indicates the marginal distribution
of job satisfaction.
So in this case, a little bit more of 50% of
the population is satisfied
with his or her job.
Okay, let's address some more exercises.
Okay.
For convenience, we define C as the event
that the teacher teaches at college
and then S stands
for the teacher being satisfied.
And in this case, let's look at some probabilities.
So, basically which is the probability
of college teacher?
I have to rely on the marginal column
because this is the probability
of Level college
either satisfied, or unsatisfied because this fact is not affecting.
It is 0.15.
This is the proportion of teachers who are college teachers.
Let's define the proportion of satisfied teachers. In this case
is just the marginal corresponding to the category.
Satisfied.
Okay, let's define the joint event and the probability of the joint event.
That's, being a college teacher and satisfied.
Okay, this would be the proportion of the cell
that is 0.095.
Now, let's play a little bit more
with the definition of conditional probability.
Let's address the probability
of college teacher given satisfied teacher.
This is by definition, the joint probability of college
and satisfied that is this cell.
We are going to see that this is the cell 0.095
divided into the probability of satisfied that we have
calculated before, 0.545.
So this is 0.175.
Now let's address just as an exercise
the probability of satisfied
conditional to college.
Okay.
So among the population of college
teachers, which is the proportion that are satisfied,
this is the restatement of the question, then we address in this calculation.
So again, we take the definition
of conditional probability, it shows the probability of the joint event
divided into the probability of the given event C ('being a college teacher').
We have all the probabilities
in the table because this is the table of proportions.
And then, we use the numbers and we see
that the probability of satisfied
given college is 0.632.
So, the proportion of college teachers that are satisfied
now are those events independent?
Let's see.
We have seen that the probability of college
it is 0.15,
the probability of college conditional to satisfied,
we have obtained before and it is 0.175.
So, clearly in this case
the conditional probability of college
given satisfied it is not equal
to the probability of college.
So, it means that the event
given the realization of the satisfaction event,
does modify the probability of college.
So, in this case, conditional probability
is not the absolute probability of college.
So, in this case, these are dependent events.
Okay?
Now let's take a look at the probability of the union.
College union satisfied events.
So, in this case we have the probability of the individual
events, it is obtained
from the table and we have discussed
them before.
So we'll just apply the rule that we have seen
as the probability of the union equal to the addition of the probability
of the individual events, minus the joint probability.
So, this is 0.6
and this concludes these examples.
Thank you very much for your attention.