0% found this document useful (0 votes)
3 views47 pages

Understanding Conditional Probability

The document discusses the concept of conditional probability, emphasizing its importance in practical problems where the occurrence of one event depends on another. It introduces the notation and formulas for calculating conditional probabilities, including examples related to telecommunications and environmental contamination. Additionally, it outlines the laws of multiplication of probabilities and provides a framework for understanding joint occurrences of multiple events.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views47 pages

Understanding Conditional Probability

The document discusses the concept of conditional probability, emphasizing its importance in practical problems where the occurrence of one event depends on another. It introduces the notation and formulas for calculating conditional probabilities, including examples related to telecommunications and environmental contamination. Additionally, it outlines the laws of multiplication of probabilities and provides a framework for understanding joint occurrences of multiple events.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1.

5 PROBABILITY
CONDITIONAL
Those whose occurrence is conditional
1.5.1 on the occurrence of another event
In a large number of practical problems, the events of greatest interest are

PROBABILITY
Therefore, it is important to introduce the concept of conditional probability,
this is the conditional probability that has occurred or could occur CONDITIONAL
certain event.

Invoking Laplace's criterion and relying on the previous diagram,


it can be seen that if event B is taken for granted, then the sample space
The conditional is event B, composed of N(B) sample points, which represents
set the number of possible cases; for the occurrence of event A is necessary
the joint occurrence A B , An event consisting of N  A B  points
show them, which represent the number of favorable cases for A.
The probability of the occurrence of event A, given that event B occurs, is
is A
which is expressed with the notation P | B by:
given
number of favorable cases to A N  A B  ___ (1.38)
P  A | B
number of possible cases given B N  B
Thus the concept of conditional probability was used by the prime-
the great merit of Thomas Bayes consisted
I've expressed conditional probability in terms of probability.
P A B 
joint P  A | B , P  B 0 ____ (1.38’)
P  B
This is, the probability of A, given B, defined as the ratio of the probability of
joint likelihood to the probability of event B.
P A B 
Note that, in general: P  A | B P  B | A , since P B | A 
P  A
Conditional probabilities also comply with the three axioms of
probability and the theorems derived from them. The task is left to the reader
to demonstrate them.
144

Conditional Probability

1. No negativity: P  A i | B 0
2. Normativity: P  S | B 1
3. Additivity: P  A B|C  P A  |C  P  B |C , A  B
4. Probability of the complement:P A | B  1  P A | B 
5. Probability of the impossible event: P  B  0
6. Law of addition of probabilities:
P  A B|C  P A  |C  P  B |C  P A  B|C 
Marginal probability refers to the probability of any event,
to distinguish what is unconditional, that the occurrence of any does not matter
another event.

Example 1.54. TELECOMMUNICATION SERVICES. Assume that


It is of interest to know the probability that a Telex user, who has...
satellite television channel, have unlimited long-distance coverage service
national tour. The sample space is automatically reduced, it is conditioned
at the occurrence of an event, it is restricted to users who have television
satellite. Now, 1 in every 5 users has television signal and 3 out of every
It has both television signal and national long distance, so,
For every 25 users, there will be 5 who have a television signal and 3 of them as well.
they will have national long distance service; that is, for every 5 users with
satellite television, there will be a long-distance national service. So,
the probability that a user has national long-distance service,
since it has satellite television signal, it is 3/5.
Calculate the following probabilities that a Telex user:
a) Have satellite television signal, since you have broadband Internet:
P I T  0.10 1
P T | I  0.333
P  I 0.30 3
b) Have broadband Internet, since it has satellite TV signal:
P I T  0.10 1
P  I |T  0.5
P  T 0.20 2
c) Do not have Internet, since there is satellite television signal:

P I T  0.10 1

P I |T  P  T 0.20 2
0.5

d) Have satellite television signal, since there is no long-distance service.


PT L   0
tancia: PT|L   0
P L  0.30

e) Have long-distance service, since it has television signal:


P L T  0.20
P  L |T  1
P  T 0.20
f) Have long distance or television signal, since it has Internet:
P  L T | I  P L  | I P T |  I P L T |  I 
P L I  P T I  P L T I  0.23 0.10 0.10 0.23
    0.766
P  I P  I P  I 0.30 0.30 0.30 0.30
14

Conditional Probability

Example 1.55. CONTAMINATED RIVERS. Solid waste from the com-


paper company of Tuxtepec, Oax., occasionally contaminates the Tonto and rivers.
Papaloapan, with probabilities of 2/5 and 3/4, respectively; additionally, it has
It was observed that in only 20% of the cases, neither of the two rivers was counted.
mine. The manager wants only one of the rivers to be systematically observed.
and based on the behavior of this one, infer the behavior of the other river.
Which of the two rivers should be observed?
Sean los eventos: T = {Tonto contaminado} P  T  0.40
P = {Papaloapan contaminado} P  P 0.75
None contaminated: PT P   0.20
To decide which of the two rivers is advisable to observe, it is necessary to calculate
the conditional probabilities of the behavior of each river, assuming
determined behavior of the other river.
P T P  1  P T  
P 1 P T P 1 0.20 0.80  
P T P P T P  P P T  P, 0.80
 0.40 0.75 P T P  
P T P  0.35 7
P T P  0.35, P T | P  0.466
P  P 0.75 15
7 8
 
P T | P 1  P T | P 1  
15 15
0.533
If the Papaloapan is observed first and is found to be contaminated, the behavior-
The fool's lie is very dubious.
PT P  PT P   0.20 0.20 4

PT|P  0.80
 
P P 1  P P  1  0.75 0.25 5

4 1

P T | P 1 P T | P 1  5 5
0.20  
If the Papaloapan is observed and it is not polluted, it is very likely that the
Neither is he a fool.
P P T  0.35 7
P  P |T  0.875
P  T 0.40 8
7 1
P P |T  1  P P  |T
8 8
0.125 1 

If the Fool is observed first and turns out to be contaminated, it is very likely that
the Papaloapan is also it.

P P T  P P T   0.20 0.20 1

P P |T  0.333
 
PT 1  P T  1  0.40 0.60 3
1 2
P P |T  1  P P |T
3 3
0.666  1 
If the Fool is observed and is not contaminated, it is more likely that the Pope-
the swamp is polluted rather than not.
It could be concluded then that it would be more useful to observe the Papaloapan River;
however, the consequences of making a mistake are being overlooked
appreciation and it can be of two types: to suppose a contaminated river when
it is not, or to assume a river is unpolluted when it is.
146

Conditional Probability

Law of multiplication of probabilities


Many times, conditional probabilities are available,
while the unknowns are the joint probabilities. Such a circumstance
does not imply any difficulty, because equation 1.57 can be expressed as
a product, resulting in the law of multiplication of probabilities:
P A B  P B  P  A | B  ____ (1.39)
P A B P A
  P B | A  ____ (1.39’)

This result was intuitively used by all scholars of the


probability in the 17th century, but it was Abraham De Moivre who having
distinguished the dependent and independent events, then formalized the
the probability that two dependent events occur is equal to
product of the probability of the first occurring by the probability of
that the other occurs when the first has already occurred

Example 1.56. VIADUCT- PERIPHERAL JUNCTION. Consider the


intersection of Viaduct and Periphery, in the south-north direction, made up of the
segments x, y, z, as shown in the figure

It has been observed that the sections x and y become congested with probabilities
0.1y0.2, respectively, and that when the tramoyse congests, the tramox
se congestiona con probabilidad0.5. Considerando que los tres tramos tienen
the same capacity, with three lanes, at a permissible speed of 80 km/h
Let the events be: x ={tramoxsaturado} P  x 0.1
y = {saturated tramoy} P  y 0.2
P  x | y 0.5

Calculate the probability that:


a) the sections xey become saturated:
P  x y  P and
   P x | y  0.2 0.5 0.1
b) at least one of the sections is saturated
P  x y  P x  P   y P x y 0.1
 0.2 0.1
 0.2
c) do not saturate either the tramoxni or the tramoy:
P x  
y P x y 1 P x  y  1  0.2 0.8
Note that: x y y; x y x x y
14

Conditional Probability

The multiplication rule of probabilities can be generalized by inducing


Mathematical action on several events and the corresponding expansion is very useful.
Let the events be1A2... Anits probability of joint occurrence is
determined by the so-called multiplication law of probabilities:
n n i 1
P Ai P A i Aj
i 1 i 1 j 1

1 1 0
For i = 1: P AI P A i
Aj , P  P A
A
1 1 
i 1 i 1 j 1

For i = 2:
2 2 1
P Ai P A i
A,j P 
A 1
A 2  A  D 1 | A
D 2 1 
i 1 i 1 j 1

k k i 1
For i = k: assuming true that: P Ai P A i Aj
i 1 i 1 j 1

For i = k + 1:
k 1 k k 0 k
P Ai P Ai A k 1 P AI Aj P A k 1 Ai
i 1 i 1 i 1 j 1 I 1

k
P Ai |  A 1 A 2... A Pi 1  A | A
k 1  1 ...
A A
2 k 
i 1

k 1 k 1 i 1

i 
P A|A A1 ... 2 A Pi 1  A i Aj
i 1 i 1 j 1

The generalization of the law of probabilities for several events, By Moi-


He explained it like this: 'One of them needs to be chosen as the first, another as
the second, and so on. Then, the occurrence of the first must be considered inde-
pending all the others; the second must be considered, with the condition
that the first has occurred; the third on the condition that both the
first as the second have occurred, and so on. From here, the probability of
the joint occurrence of all events is equal to the product of all
probabilities
n
There are formulas to obtainP Aifor example, without = 3, any-
i 1
One of the following 6 formulas allows us to obtain the joint probability:
P A B C P A  P B | A P C | A B 
P A B C  P A P C  |  A P B | A C 
P A B C P B  P A  |  B P C | A B 
P A B C  P B P C
  | B P A | B C 
P A B C P C  P  A  |  C P B | A C 
P A B C P C  P  A  |  C P B | A C 
148

Conditional Probability

Example 1.57. VIADUCT-PERIPHERAL INTERCHANGE. Consider the


junction Viaduct and Periphery, heading south-north. Knowing that, when
the stretches work below their capacities, the probability that the
tramozse saturation is 0.20.
The additional information is:P  z | x y 0.20 ; z ={tamozsaturado}
 P x y 0.8 
Previously, we obtained: P  x y  0.1, P x  y 0.2,
Since the three sections have the same capacities, it is enough that they ...
saturate the tamoxo the tramoy, so that the tramoz saturates; therefore:
P  z | x y 
P z | x y P z | x y   1
Calculate the probability that:
a) the three sections become saturated:
Px y z  P and  P x | y P z | x y  0.2 0.5 1 0.1
b) only the section z is saturated:
P x  y 
z P x P y | x P z | x y     
P y  x  0.80 8
 
P x 1  P x  1  0.1 0.9; P y | x   0.888
 
P x 0.90 9
8 4
P x y  z 0.9  0.2
9 25
0.16
c) only the segment gets saturated:

P x y z P x P y | x P z | x y      
8 1

P y | x 1 P y | x 1    9 9
0.111


P z | x y 1 P z | x   y 1 1 0 
1
P x y z  0 0
9
 0.9
d) no section should be saturated:
P x  y z  P x  P  y | x P z | x   y 
4

P z | x 
y 1 P z | x  
y 1  0.2 0.8
5
8 4 16
P x y z   0.9 9 5 25
0.64

Example 1.58. GIVEN. Consider the experiment consisting of throwing a


Given and observe the face that is facing up. Let the events be: A = {falls
par},B ={cae2o4} yC ={cae1o2}; the corresponding probabilities
son:P(A)= 1/2,P(B)= 1/3 yP(C)= 1/3.
We will calculate the following conditional probabilities, using the in-
classical or a priori interpretation:
N A B  2 or 4
Ncae N A B  2 or 4
Ncae 2
P  A | B 1 P B  | A
N  B 
NCAAE 2 or 4 N  A  par 
Ncae 3
N A C   2 
Ncae 1 N A C   2
Ncae  1
P  A |C  P  C | A
N  C  1 or 2
NCA 2 N  A  par
Ncae  3
14

INDEPENDENCE IN PROBABILITY

P  of
The occurrence of B affects the probability of the occurrence | B P  A
A A:
and vice versa, the occurrence of A affects the probability of occurrence of B:
P  B | A P  B it is said then that events A and B are statistically
dependent.
On the other hand, the occurrence of Cno affects the probability of occurrence.

deA: üüüü    , and vice versa, the occurrence of Ano affects the pro-

probability of occurrence of C: üüüü    it is said then that the
events A and C are statistically independent.

De Moivre discussed the concept of independence of random events:


We will say that two events are independent if one of them has no effect on the other.
relationship with the other," and did the same to define dependence on events:
"Two events are dependent if they are linked to each other and the probability-"
the occurrence of one of them influences the probability of occurrence of the
another

It is worth noting that the statistical dependence between events always has
A physical explanation can always establish cause-and-effect relationships;
In the previous example, events A and B are physically dependent because
the occurrence of one of them makes the occurrence of the other easier. On the other hand,
Statistical independence does not always have a physical meaning.
Consider the following logical propositions:
Statistically dependent
Statistically independent
Physically dependent
physically independent
Statistical dependence implies physical dependence: p q in so far as
physical dependence does not imply statistical dependence:q p
Physical independence implies statistical independence. q :p , in so-
:p q
because statistical independence does not imply physical independence:

Statistically independent events


Two events are statistically independent if and only if the occurrence of
1.5.2
one does not affect the probability of occurrence of the other:
INDEPENDENCE
P  A | B P  A ____ (1.40) IN PROBABILITY
P  B | A P  B ____ (1.40’)
Weseethatstatisticalindependenceisasymmetricrelationship:ifthe
If event A is independent of event B, then event B is independent of event A.
and vice versa.
Indeed: P  A B  P A P B | A ; P A  B P  B P  A |  B 
Equalizing the second members: P  A P  B | A P B P A | B 
YesP  A | B P  A   P   A P B  | A P B P A , P B | A P B 
YesP  B | A P  B   P  A  P B   P B P A | B, P A | B P A 
Therefore: P  A | B P  A   P B | A P B 
150

Conditional Probability

YesP  A B  P A P B | A and  P B | A  P B  P A B  P A P B    
If P  A B  P B P A   | B y  P A  | B  P A P A B  P B P  A
These results corroborate the other way of formally defining independence.
Statistical dependence: Two events A and B are independent if, and only if, their...
The probability of joint occurrence is the product of the individual probabilities.
dualP(A) and P(B) of occurrence:

üüüü      ____ (1.34)
This expression had already been obtained in section 1.4.3 to define pro-
joint probability of independent events.
The difficulty in applying the law of multiplication of probabilities
It is about knowing how to identify when two events are or are not statistically independent.
clearly, and then use rule 1.34 or rule 1.39, respectively.

Example 1.59 URN. Consider a urn that contains 6 red balls, 4 white...
blue balls, from which three balls are successively drawn from the urn,
replacement.
Sean los eventos: A ={sale bola azul} P  A 5 / 15 1 / 3
B = {white ball sale} P  B 4 / 15
R = {sale red ball} P  R 6 / 15 2 / 5
Calculate the following probabilities:
a) That they come out in the order red, blue, white:
6 5 4 120 8
P R A B  P R  P A  |  R P B | R A 
15 15 15 3375 225
After a red ball has been drawn, it is returned to the urn, so
There are still 15 balls, 5 of which are blue: P  A | R 5 / 15 P A
 
After a blue ball has been drawn, it is returned to the urn, so if-
I have 15 balls, 4 of which are white. P  B | R A 4 / 15 P B 
b) They should come out in the order blue, red, blue:
5 6 5 150 2
P A R A  P A  P R  |  A P A | A R 
15 15 15 3375 45
c) That three white balls come out:
4 4 4 64
P  B B B  P B P B  | B P B | B B 
15 15 15 3375
d) To get out one red, one blue, and one white, regardless of the order:
8 16
1  red, 1 blue, and 1 white  6 P R A B 6
225 75
that two blues and one red come out:
2 2
2  blue and 1 red 3 
45 15

We see that when the extraction is done with replacement, the probabilities
the occurrence of successive events do not depend, are not conditioned to the
occurrence of previous events. The reason why the probabilities are
they have constants, from extraction to extraction, it is that physically the extractions
they are independent; in that case, the events are physically and statistically
independent.
1

Independence in Probability

Example 1.60 URN. Consider again the urn with 6 red balls, 4
white and blue, from which three balls are successively drawn, without replacement.
So. Calculate the same probabilities as those requested in example 1.59.
a) They should come out in the order red, blue, white:
6 5 4 120 4
P  R A B  P R  P A  |  R P B | R A 
15 14 13 2730 91
After the red ball has come out first, there are 14 left in the urn.
balls, 5 of which are blue: P  A | R 5 / 14
After the red ball and blue ball have been drawn, there are 13 balls left in the urn.
4 of which are white: 
üüüü 
b) They should come out in the order blue, red, blue:
5 6 4 120 4
P A R A  P A  P R | A P A | A R 
15 14 13 2730 91
c) That three white balls come out:
4 3 2 24 4
P B B B  P B P B  | B P B | B B 
15 14 13 2730 455
d) That a red one, a blue one, and a white one come out, regardless of the order:
1  red, 1 blue and 1 white 
P  R A B  R B A A  B A
R B  R B R  A B A R  
P R A B P R  B A P A R  B P A B R P B R A P B A R   
4 24
6 P R A B 6
91 91
e) Let two blues and one red come out:
4 12
 ones and one red one 3 P  A R A  3
2 blue
91 91

It is appreciated that, when extraction is done without replacement, the probabilities-


occurrence data of successive events is affected by occurrence
of previous events, that is to say, they are conditioned by that occurrence. After
With each draw, there is one less ball in the urn, which is the main reason.
that the probabilities change in subsequent extractions; in that case,
the events are physically and statistically dependent.

Example 1.61. ELECTRICAL CIRCUIT. Consider the electrical circuit


outlined in the following diagram. The probability that a switch
it is closed esp = 0.7 and it is considered that the three switches function properly
pending. It is about determining the probability of current flowing.
from terminal 1 to terminal 2.

Current flows from terminal 1 to terminal 2, as long as the switch


Xesté closed, or that the switches Y and Z are both closed.
152

Conditional Probability

We will solve it by three different procedures:


a) Considering mutually exclusive events:
We define the event C = {current between 1 and 2}, with two possible outcomes.
para cada interruptor:1, cerrado, y0, abierto.
PC  P 1  1 1 1 1 0 1 0  1 0 1 1  1 0 0  
P1 1 1 P1
 1  0 P1 0  1 P  0  0 0
1 1 P1   
P  1     3   P  1   
3 2 2
P 0 P 1 P 0 p 3 3 p 21 p  p 1 p
p3 3 p 2 3 p 3 p1 2 p  p2 p3 3 p 2 3 p 3 p  2 p 2 p3
 p3 p2 p 0 .343 0.49 0.7 0.847
b) Considering the law of addition of probabilities:
We define the events {x}, {y}, {z} as indicators that they are closed.
two switches.
P  C P x y  z P x P y z P x y z  
P  x  P  y  P  z  P x P y P z p p2 p3
0.7 0.49 0.343 0.847
c) Considering the complement rule:
P C   P 0 1 0 0 0 1 0 0 0 
P 0 1 0 P 0  0 1 P 0  0 0 
2 3
2P 1   P  0  2p 1 p 1 p 2  3
 P 0
2 p 1  2 p  p2 1  3 p  3 p 2  p3
2p 4p 2 2p 3 1  3p 3p 2 p 3 1 p 3 p 2 p
 
P  C 1  P C 1  1  p 3 p2 p 
 p 3 p 2 p 0.847

Note the difference between the circuits in examples 1.53 and 1.61; in the
First, there are three switches in parallel and in this last one there are two switches.
res is a series with one in parallel. Both are analyzed similarly, as...
ensuring independence in the operation of the switches.

Example 1.62. FAMILIES WITH THREE CHILDREN. Consider only families with
three children and the experiment consisting of recording the sex of the children; ifH =
{hombre},M ={mujer}, con las probabilidades aceptadas:P(H)= 18/35y
P(M)= 17/35.
The sample space of the experiment is:
S 
HHH ,  HHM
 ,  HMH
 ,  MHH
 ,   HMM ,  MHM ,  MMH  ,  MMM 
The probabilities of the four different sample points are:
3
18
Three males: P  HHH  P H P  H  P H 0.136
35
2
18 17
Two males: P  HHM  P H P  H  P M 0.128
35 35
2
18 17
A male: P  HMM  P H P
  M P M 0.121
35 35
1

INDEPENDENCE IN PROBABILITY

3
17
No male: P  MMM  P M
  P  M P M
 0.115
35
Calculate the probabilities of the following events:
a)A ={familias con hijos de uno y otro sexo}
P  A P 
HHM  HMH
   HMM
MHH   MHM  MMH
   
3P  HHM  3P HMM
 3  0.128 3 0.121
 0.749
 
b)B ={familias con un máximo de un hijo varón}
P  B P 
HMM  MHM
   MMM
MMH   
3P  HMM  P MMM
 3 0.121
 0.115 0.479
c) The joint probability of A and B
P A B  
P HMM  MHM
  
MMH 3  0.121 0.364
d) Determine if the events A and B are statistically independent.
To determine if events A and B are statistically independent,
we multiply the individual probabilities and compare the result with
the joint probability: P  A P B
 0.749 0.479 0.359 0.364 P A B 
Since there is no coincidence, we conclude that the events A and B
they are statistically dependent, which implies that there must be a depend
physical proximity between them. And indeed, the occurrence of one slightly favors
lie the occurrence of the other, and that happens because the probability of a male child
and the daughter is not symmetrical. If we had considered equiprobability
conP(H)= P(M)= 0.5, the results would be as follows:
P  HHH  P HHM
 P HMM
 P  MMM
 0.5 0.125
  3

P  A 
6P HHM  6 0.125
 
0.75
P  B 
4P HMM  4 0.125
 0.5
P A B  
3P HMM 3 0.125
 
0.375
P  A P B
 0.75 0.5 0.375
And so, events A and B would be independent. Now we know that the
The lack of symmetry is what caused the dependency in this case.

Example 1.63. ELECTRIC CIRCUIT. Let the circuit shown in the


next figure; the four switches operate electrically, each one has
an independent operating mechanism and all are controlled simultaneously
mind in the same impulse, that is, it is tried that all the switches
close or open simultaneously. Each switch, however, has a pro-
probability of failure.
154

Conditional Probability

Let the events be: F ={the switch fails}


the switch does not fail
There is current between A and B
The sample space of the experiment is:
       
["NNNN","NNNF","NNFN","NFNN","FNNN","NNFF","NFNF","NFFN"] 
 ["FNNF","FNFN","NFNN","NFFF","FNFF","FFNF","FFFN","FFFF"]
        
The probabilities of the five different sample points are:
P  NNNN  P N
  P  N P N  P  N  1 p 4
No failure:

A fault:P NNNF P  N P  N P N
  P  F  1 p p 3
Two faults:P  NNFF  P N P N  P  F  P F  1  p p2 2
Three faults:P  NFFF  P N P F  P  F P F  1  p p3 

Four faults:P FFFF P  F P  F  P F P  F  p4
a) What is the probability that there is current between terminals A and B?
P  C P NNNN
  NNNF
   NFNN
NNFN   FNNN  NNFF
  
FFNN   
P  NNNN  4P NNNF
 2P  NNFF  1 p 4  1 p p 2  1 p p 2 3  2
4

1  4p 6p 2 4p 3 p4 4p 12p2 12p3 4p 4 2p 2 4p 3 2 p 4


1  4 p 2 4 p 3 p4
b) What is the probability of system failure?
 
P C 1  P C  1  1  4 p 2  4 p 3 p4 4 p 2 4 p 3 p 4 

c) Would the addition of connector5 improve the system's operation?


It is obvious to assume that the addition of the connector would improve the operation of
system, that is, the probability that there is current between the terminals A
It would be greater if the connector exists than if it does not exist.
Sea el eventoK ={Hay corriente entreAyB, con conector5}
 NNNN NNNF
  NNFN
   FNNN
NFNN   
P  K P
 NNFF  
FFNN  
NFFN 
FNNF  
P  K P NNNN
 4P NNNF
 4P NNFF
  1 p 4 1  p  p 4 1 p p2  3  2
4

1  4p 6p 2 4p 3 p4 4p 12p2 12p3 4p 4 4p 2 8 p 3 4 p 4


1  2 p 2 p 4
We must prove then that:  2p 2 p4 1  4p 2 4p 3 p
1  2p 2 p4 1  4p 2 4p 3 p4 0
2p 2 4p 3 2p 4 0, p2 2p 3 p 4 0
p21  2 p  p2 0,  p21  p 0  2
p 0, p2 0.1 p 0, 1 p 0  2
Indeed, the system is more efficient with the connector than without it.
d) The sample space changes to:
1

INDEPENDENCE IN PROBABILITY

       
["NNNNN","NNNNF","NNNFN","NFNNN","FNNNN","NNNFF","NFNNF","NFNFN"] 
 FNNNF,  FNNFN,
            NFNNN, NFNFF, FNNFF, FFNNF, FFNFN, FFNFF 
'
 ["NNFNN","NNFNF","NNFFN","NFFNN","FNFNN","NNFFF","NFFNF","NFFFN"]
        
 ["FNFNF","FNFFN","NFFNN","NFFFF","FNFFF","FFFNF","FFFFN","FFFFF"]
        
Let the event G = {There is current between A and B, with switch 5}
 NNNNN  NNNNF
  
NNNFN  
NNFNN   FNNNN
NFNNN  
P  G 
NNNFF  
NNFNF   NFNFN
NNFFN   FNNNF   
 FFNNN  
FNFNN  
NFFNN   FFFNN
NNFFF  
P  NNNNN  5P NNNNF
 8P  NNNFF
 2P NNFFF
  
 1  p 51 5 p p 81 p  4 p2 21 p p3 3  2
1  5 p  10p2 10p3 5 p 4 p5 5 p  20p2 30p3 20p4 5 p 5
8 p 2 24p3 24p4 8p 5 2p 3 4p 4 2p 5
1  2 p 2 2 p 3 5 p 4 2 p 5
It must be fulfilled that: 1  2 p  p2 1  24 p  2 p  5 p 2 2 p 3 4 5

1  2 p 2 p4 1  2 p 2 2 p 3 5 p 4 2 p 5 0, 2p3 4 p 4 2 p 5 0
2p 31  2p p 2 0,  p31 p 0,  p 0,  p3 0, 1 p 0, 1 p 0  2
2

It must also be fulfilled: 1  2 p  22p  5 p  32 p 1 4 4 p  4 p5  p 2 3 4

1  2 p 2 2 p 3 5 p 4 2 p 5 1  4 p 2 4 p 3 p4 0, 2p2 6 p 3 6 p 4 2 p 5 0
2p 21  3p 3p 2 p 3 0, p21 p 0, p  0, p2  3
3
0, 1 p 0, 1 p 0

e) Let the event D = {exactly 2 switches fail}


P  D 
P NNFF  
NFNF   FNNF FNFN
NFFN   FFNN
   
6P  NNFF  6 1  p p 
2 2

 
P C D P NFNF FNFN
  2P  NNFF  2 1 p  p2  2
 
P C D P NFNF  
FNFN 2P  NNFF  2 1 p  p2  2

Note that through a polynomial function the model is established


indicative babylonian of the behavior of the system, under certain cir-
circumstances: with 4 or 5 switches, with an additional connector, etc. By means of
the shape of polynomial curves allows for a sensitivity analysis
of the circuit for different values dep.
156

Conditional Probability

Although mutual independence generally seems practically assured...


If the events are independent in pairs:
P  A I A j D A  Di ,  i jj , i 1,nin some cases, this independent-
CIA is not enough to guarantee mutual independence.

Example 1.64. TETRAHEDRON. If instead of rolling a die, a tetrahedron is rolled...


Cube, whose faces are numbered from 1 to 4, we define the events:
A ={1, 2},B ={1, 3},C ={1, 4}, las probabilidades correspondientes son:
P(A) = 1/2, P(B) = 1/2, P(C) = 1/2. Now, using the Laplace criterion,
we calculate the following joint probabilities:
N A B 1 N A C  1
P A B  P A C 
N 4 N 4
N B C  1 N A B C  1
P B C  P A B C 
N 4 N 4
WeseethateventsA,B,andCarepairwiseindependent,since:
1 1 1 1 1 1
P A B  P A P B  P A C  P A P C 
2 2 4 2 2 4
1 1 1
P  B C  P B  P C 
2 2 4
However, A and B are not mutually independent, since:
1 1 1 1 1
P A B C  P A  P B P
  C
2 2 2 8 4

1.5.3 It has no problem from a mathematical perspective; however, if


Conditional probability is defined as a quotient and, as such, it does not

presents serious conceptual difficulties in its application, which is advisable


CONDITIONALITY identify, distinguish what circumstances provoke them and completely resolve them
IN IMAGES you, so that the learning of the subject is meaningful.
When people start dealing with the concept of conditionality
Dad, they commonly confuse it with causality because they find it very difficult.
I work to accept that the occurrence of a subsequent event may condition.
the occurrence of a prior event. In the numerator of the quotient that defines
the conditional probability P(A|B), the probability of occurrence appears
jointP( A B ), which does not express simultaneous occurrence; event A can
occur 10 million years after event B, 15 seconds before, or at
same time; that's where the difficulty begins, and the best way to solve it is
turning off the time variable of the occurrence of events. Thus, when it
talk about the conditional probability of event A, given the occurrence of
eventB should not be understood to mean that eventA will necessarily occur
subsequent to event B. Furthermore, on many occasions, although the two events
have occurred, regardless of the temporal order of occurrence, can be measured
both conditional probabilities, P(A|B) and P(B|A).
The second difficulty is of a practical nature and refers to complexity.
in the distinction between conditioned and conditioning events, with pro-
mathematics immersed in very diverse contexts. The proposal to solve this
it is to resort to feedback, which allows clarifying doubts, contextualizing the
problem and thus be able to present it without ambiguities.
1

Conditionality in Images

Finally, the third difficulty arises from the variety of the information.
information available to address conditional probability problems
It is in accordance with it that we must proceed. It is not about this-
to develop an algorithm for each case that leads to the search for the formula
correct, but rather to know the range of possibilities and recognize the different
ways to solve them, without overlooking relevant information.
Considering only two events A and B corresponding to a certain
probability space, when taking into account complementary events Acy
BcEight conditional probability relationships can be established, consider
removing all denominators different from zero.
P A B  P B A 
P  A | B ; P  B | A
P  B P  A
P  Ac B  c
PB A 
P  Ac B  ; P  BcA 
P  B P  A
P A B c
 P B Ac 
P  A | B c
; P  B | A c


PB c
 P A c

P  Ac B c  c
PB Ac 
P  Ac |Bc  ; P  BcAc 
c
PB  P  Ac 
All possible knowledge involved in those relationships is summarized
16 elements: 8 conditional probabilities, 4 joint probabilities
marginal probabilities, and it means that a probability problem
The conditional has been completely resolved only when the...
16 elements.
To fully solve a problem of conditional probability, one only needs to
they require three non-complementary elements, the possibilities being
following:
marginal and joint
marginal and conditional
joint and marginal
joint and conditional
1 marginal, 1 joint and 1 conditional
marginals and joint
•2marginales and 1conditional
2 joint and 1 conditional
•3 conditionals
Hasta aquí, los problemas de probabilidad condicional los hemos resuelto
in the usual way, using algebra to consider simultaneously
three basic rules: the probability of the complement and the laws of addition and
multiplication of probabilities. There are other visual resources that are worth it.
pity to explore; they are the double-entry tables, the probability trees
conditional and unit square diagrams, all of them easy to handle,
very useful for clearly understanding the concepts and for visualizing all the
results simultaneously, although none of them is self-sufficient for
face any type of conditional probability problem.
158

Conditional Probability

Cross-tabulation tables
Initially, we consider conditional probability problems.
that involve only two events and their respective complements; for
they, the base element is a double entry table or 2x2 matrix, which
it contains or must contain the information of the 4 joint probabilities:

This table is complemented by adding a column, in which it is obtained-


in the two marginal probabilities corresponding to AyAcadding the
joint probabilities of each of the rows; and adding a
line, where the two corresponding marginal probabilities are obtained
teeth aByBc.

The expanded table incorporates the eight conditional probabilities, four


in two additional columns and the other four in two additional rows.

Example 1.65. POLLUTED RIVERS. With reference to example 1.55,


los datos del problema son:P(T)= 2/5, P(P)= 3/4, PT c P c  0.20
1

Conditionality in Images

Double-entry tables are easy to manipulate and facilitate calculations.


but they are not a panacea, as when the available data is conditional
Either conditionals and marginal, not related, it is necessary to leave
from the table and resorting to algebra to obtain at least one joint probability,
to then continue on the table and conclude the exercise. As homework for the
The two following cases remain, with other data from the problem:
a)P(P)= 0.75,P(P|T)= 0.875,P(Pc|T)= 0.333 c

b)P(T|Pc)=
c
1/4,P(T|P)= 7/15, P(P|T)= 2/3 c

Trees of conditional probabilities


Another way to visualize conditional probabilities in context is
through tree diagrams, which due to the information they contain, are
nominated conditional probability trees.
Two probability trees are built, one for each basic event.
The tree corresponding to event A is an array as follows:

The tool is easy to build, under the following rules:


a) The branches that stem from the same node correspond to events com-
supplementary
b) The two branches that split from the initial node are annotated with the probabilities
marginal P(A) and P(Ac)
c) The branches that stem from the second nodes are annotated with the probabilities-
conditional P(A|B), P(Ac|B),P(A|Bc) yP(Ac|Bc) following the sequence-
of the previous branch.
The expanded tree with all the complementary information is as follows:

d) At the end of each terminal branch, the joint probability is recorded.


pertaining to the product of the marginal and the conditional, noted on branches
consecutive, according to the law of multiplication of probabilities:
P  B A,  P B c A , P B  AcyP Bc Ac   .
160

Conditional Probability

e) The marginal probabilities are noted on the right margin of the diagram.
del otro evento básico y su complemento:P(B) yP(Bc), adding the proba-
joint associated probabilities; the sum of these two marginals must equal 1 and
it is the way to verify arithmetic operations.
The tree corresponding to event B is constructed in the same way, inter-
changing A for B and A for B.

Example 1.66. CONNECTION. With reference to example 1.56, the data of the
problema son:P(x)= 0.1, P(y)= 0.2,P x |  y 0.5

As is the case with double-entry tables, probability trees


Conditional are very visual resources, easy to handle, but they are not infallible.
libles; if the problem data are 3 conditionals, 2 of them are located in
a tree and the third in the other, or if they are 2 conditionals with 1 marginal or one
joint that are not in sequence, the diagrams must be abandoned
and resort to algebra, to obtain at least another joint probability or another
marginal, then return to the diagrams and conclude the exercise. To the reader
they have these two exercises left, with different problem data:
a)P(xc|y)= 1/2,P(y|x)= 1,P(yc|xc= 8/9
b)P xc y c 0.8,P(x|y)=
 0.5 , P(yc|x)=0
1

CONDITIONALITY IN IMAGES

Unit square diagrams


The dependence or independence of events cannot be identified by
provide you with a traditional Venn diagram; the events A and B can be dependent
tooth in any of the following three diagrams, and they can be independent-
Teeth only in the second, but not necessarily.

In fact, the two diagrams at the ends represent the two extreme cases.
mite of the general case, symbolized by the second diagram: when there is no
joint occurrence and when there is implied occurrence, in those two cases, the
the dependency between the events is total.
In the first diagram, where A and B are mutually exclusive events,
if A occurs, then the probability of B is null; and if A occurs, then the
probability of no probability; that is why they are dependent.
In the third diagram, where the occurrence of A implies the occurrence of B,
if it happens, then the probability of A is the joint probability of A and B;
And if it happens, then the probability of it being one; that's why they are dependent.
So, when there is incompatibility or abstinence, it can be assured.
that the events are not independent. In fact, it is the same type of
relationship between events, as can be seen in the following diagrams:

The general case is where it is difficult to clarify whether the events are independent.
teeth or not, and a Venn diagram does not help at all. To visualize probability-
conditional probabilities, we propose the use of unit square diagrams,
que son aplicables en todos los casos y se construyen como sigue:
a) The unit horizontal segment is divided into two subintervals that
they represent the two events that may be considered occurred, assigning to each
length of subinterval, the probability of the corresponding event: P(B)
P(Bc).
b) About each of the two defined subintervals there is a rectangle of
unit height, which is divided into two regions; the lower one with a height
equals the conditional probability P(A|•) and whose area corresponds to the pro-
joint probability P(A ), and the upper one with height equal to the probability
conditionalP(A |•), automatically delimited by the value one and whose area
c

corresponds to the joint probability P( Ac ).


c) A unit square diagram can be constructed that is equivalent, in which
Vertically, the conditional probabilities P(B|•) and P(B) are represented.c|•)
as heights of two regions of the rectangles formed over the subintervals
horizontal values in which the probabilities P(A) and P(A are representedc).
162

Conditional Probability

Example 1.67. UNIT SQUARE DIAGRAMS. Let the


events A and B, whose probabilities we will fix at P(A) = 0.4 and P(B) = 0.5.
To illustrate the procedure for constructing a square diagram
unitary we will consider five representative cases:
a) Events A and B are mutually exclusive:
A B P A B 0 
P  A 0.4
P  A | B 0, P A c B 1, P A |  Bc  0.8, P  Ac|Bc 
0.2

PB c
 0.5
P  B 0.5
P  B | A 1, P  BcA 0, P B | Ac   cAc
0.833, P B 
0.166
P A c
 0.6

The event A is contained in event B.


P  A 0.4
A B A B A P A | B   0.8, P  Ac | B  0.2
P  B 0.5
P  A 0 P  B 0.5
P  A | Bc  c |Bc
0, P A 1, P B | A  1

PB c
 0.5 P  B 0.5
P B Ac  0.1
 A 0, P B | A
PB c c
 0.166, P  BcAc  0.833
P A c
 0.6

c) P  A B  0.1
P  A P B
 0.4 0.5 0.2 0.1 dependent events
P A B  0.1 P A Bc  0.3
P  A | B 0.2, P  Ac | B  0.8, P A  | Bc  0.6
P  B 0.5 
PB c
 0.5
1

CONDITIONALITY IN IMAGES

0.1
P  Ac|Bc  P B | A
0.4,  0.25, P  BcA 0.75

0.4
P  B Ac  0.4
P  B | A c
0.666, P Bc Ac 0.333

P A c
 0.6

 B  0.2
d)P A
P  A P B
 0.4 0.5 0.2 P A  B 
independent events
P A B  0.2 P A Bc  0.2
P  A | B 0.4, P  AcB  P A | Bc
0.6,  0.4
P  B 0.5 
PB c
 0.5
0.2
P  Ac|Bc  P B | A
0.6,  0.5, P  Bc A 0.5

0.4
P  B Ac  0.3
P  B | Ac 0.5, P  BcAc 
0.5
P A c
 0.6

 B  0.3
e)P A
P  A P B
 0.4 0.5 0.2 0.3 dependent events
P A B  0.3 P A Bc  0.1
P  A | B 0.6, P  Ac| B  0.4, P A  | Bc  0.2
P  B 0.5 
PB c
 0.5
0.3
P  Ac |Bc  P B | A
0.8,  0.75, P  BcA 0.25

0.4
P  B Ac  0.2
P  B | A c
0.333, P  Bc Ac  0.666
P A c
 0.6
164

Conditional Probability

The series of unit square diagrams obtained in the exercise leads to


to distinguish not only the cases of dependence or independence of events,
but also to identify the type of relationship that events have with each other
yes, when there is dependence.
Considering that the initial data were: P(A) = 0.4 and P(B) = 0.5,
that entail the product P(A)P(B) = 0.2, in the following summary table
they observe the conclusions for different values of the joint probability:
P(A B) P(A|B) P(B|A) Relationship
0 0 0 the occurrence of one inhibits the occurrence of the other
0.1 0.2 0.25 the occurrence of one disfavors the occurrence of the other
0.2 0.4 0.5 statistically independent events
0.3 0.6 0.75 the occurrence of one favors the occurrence of the other
0.4 0.8 1 the occurrence of one implies the occurrence of the other

In general: 0 P  A B  P A ;   0  P A B  P B
If P  A B  0 A B
IfP A B  P A   A B, P B | A 1 
If P  A B  P B  B A P A |  B 1 
YesP  A B  P A P  B A B
YesP  A B  P A P B   there is a positive correlation between A and B

YesP  A B  P A  P B there is a negative correlation between A and B


The construction of unit square diagrams can be generalized.
very easily to any number of mutually exclusive events to in-
include in the horizontal unit segment, with two complementary events to
consider in the vertical sense.
1

TOTAL PROBABILITY

Ctos consider a partition of the sample space , made up of the events-


B1, B2,..., Bnwhat are mutually exclusive and collectively ex-
exhaustive. Any event can always be broken down into the
1.5.4
THEOREM OF
events ( A B1), ( A B2),…, ( A Bn), which are mutually exclusive: PROBABILITY
n
TOTAL
A  A B i
I 1

The probability of event A can always be expressed as the sum of the


probabilities of events A Bii=1,2,…, n
n
P  A i P A B ____ (1.41)
i 1
Each term can be expanded according to the law of multiplication of pro-
abilities given in (1.39), so that equation (1.41) can also be
to write oneself as:
n
P  A P A |  B P i B  I ____ (1.42)
i 1

This result is known as the theorem of total probability and represents the
expansion of the probability of an event in terms of its probabilities
conditionals, conditioned on a set of mutually exclusive events
inclusive and collectively exhaustive.
Indeed:
n
P  A P A B 1A  B ... 2 A B  P n  A B I
i 1

But Bi Bj , i j therefore:  A B i A  B j  , i j
n
So: P  A P A  B i 
i 1

The total probability obtained through (1.41) or (1.42) is the probability


marginal of A, that is, it is the probability of occurrence of A, regardless of the
occurrence of any other event.
166

Conditional Probability

Let's now make a small transformation, renaming the occurrences


jointly in the form:Ci A Bi, in this way the event is the union of
n
eventsCmutually
I
exclusive: A C,C C I , i i j, constitu-
j
i 1
going for a breakdown of eventA.

Therefore, the total probability of event A is the sum of the probabilities.


event dataiwhich replicates the third axiom of probability:
n n
P  A P C i
P C  i Ci C j , i j
i 1 I 1

Although it did not seem so, that which we call the probability theorem
total in chapter 1.2 and that for more than two hundred years was considered
one of the three fundamental theorems of probability is exactly
the same as the one dealt with in this section, only it was presented differently
way; with the adjustment made, it could be clearly seen that it is about the
same concept.

Example 1.68. URNS. There are three urns that contain 24 balls each.
Urn 1 has 16 red balls and 8 white balls, urn 2 has 20 red balls and 4
white, and the urn has 6 red balls and 18 white balls. A ball has been extracted from
In some of the urns, what is the probability that the ball is white?

It is reasonable to assume four solutions: If the ball came out of urn 1, the probability-
The probability of it being white is 1/3, because there are 8 out of 24 balls that are white. If the
The ball came out of urn 2, the probability that it is white is 1/6, because there are 4.
de24balls, which are white. And if the ball came out of urn3, the probability of
that it is white is 3/4, because there are 18 out of 24 balls, which are white. Finally-
you, if we do not know from which of the three urns it came, then the probability of
that it is white is 5/12, because, in total, there are 30 out of 72 balls, which are white.
1

TOTAL PROBABILITY

Could it be possible that all four answers are correct? Well, if it supposes-
More than the ball came out of urn 1, the correct answer is the first; it is a
conditional probability, conditioned on the chosen urn being urn 1.
One can say exactly the same, if we assume the extraction from the urn.
8 1
2, or of the 3:P  B |1  , P B  |  2 4 1, P B |  3 18 3
24 3 24 6 24 4
The fourth answer corresponds to an unconditional probability, as
there is no need to assume anything here; considering that the chosen urn could
be any of the three, with an equal probability of 1/3, the total probability
that the ball is white is: P  B  P  B | 1 P  1  P  B  |  2 P 2 P B | 3 P 3
1 1 1 1 3 1 1 1 1 4  2 9 15 5
  
3 3 6 3 4 3 9 18 4 36 36 12
When total probability is obtained, the unit square diagram is
you can simplify by omitting the corresponding probabilities of the comple-
metos, leaving only a probability distribution:

Example 1.69. DEFECTIVE. Three machines A, B, and C produce, respectively-


actively, 50%, 30% and 20% of the total number of items from a factory; the
The percentages of production defects of these machines are, respectively,
mind, 4%, 2% and 3%. There is interest in determining what the percentage is of
defective items throughout the factory.

Intuitively, such a percentage can be obtained by adding the products of


the production percentages of each machine by their corresponding for-
defect percentages:
0.50 0.04 0.30 0.02 0.20 0.03 0.02 0.006 0.006 0.032
168

Conditional Probability

The total percentage of defective items is 3.2%


Formally: Let the events be:
A ={item produced by machine A}
B= {artículo producido por la máquinaB}
C ={artículo producido por la máquinaC}
D ={artículo defectuoso}
With the following probabilities:  P A 0.50, P D | A 0.04
P  B 0.30, P D | B 0.02
P  C 0.20, P D|C
 
0.03
P  D P A P  D | A P B P D  | B P C
 PD
  |C 
0.50 0.04 0.30 0.02 0.20 0.03 0.02 0.006 0.006 0.032

We realize that the way we solved the pro- problems


Conditional probability was intuitively applying the probability theorem.
total, because we were dealing with complementary events, and these are
mutually exclusive and collectively exhaustive
A Ac B A  B  Ac  
A Ac B A B  c
A  B 
  B A P  B A c
P  B  P P B | A  P A P B | Ac P Ac  

Example 1.70. INTERSECTION. In the exercise of the intersection Viaduct - Peri-


ferry, the probability of saturating the tramoz is desired, using the
total probability theorem.
Taking the events:  x y  , x y, x y, x y   
, which are mutual- 
exclusive and collectively exhaustive events, we calculate the probability
 
total: P  z  P z  | x y P x y P  z | x and P x y  
P z | x y P  x y  P z |  x y P x y   
And substituting:P  x y  P x  | y P y , P x  y 
P x | y P y   
P  x y  P x  | y P y  , P x  y 
P x | y P  y  
1

TOTAL PROBABILITY

P  z P z | x y P  x | y  P  y P z | x y P x | y P y     

P z | x y P x | y P  y P    z | x y P  x | y P y  
The data is:
P  x 0.1, P y  0.2, P x  | y  0.5, P z | x y  
0.2
Tnheday:irhoadbtl Px y  0.1, P x y 0.8  
P  z | x y P z | x y  
P z | x y 1, P x   0.9, P and  
0.8
Px y  0.8
 
P x | y 1  P x | y  1  0.5 0.5; P x | y   1
 
P y 0.8


P x | y 1  P x | y 1 1 0   
 0.2  1 0  0.8 1   0.5 0.2 0.2  1 0.8 
P  z 1 0.5    
0.1 0  0.1 0.16 0.36
In a deeper analysis, I would be interested in knowing the capacity that should be
to have section z so that the failure is less probable, taking into account the
social cost and the cost of the work.

Example 1.71. ELECTRIC CIRCUIT. Considering connector 5,


probability of there being current between terminals A and B can be obtained
to use the total probability theorem, considering the 16 events
elementary of the sample space, which are mutually exclusive and collectively-
exhaustive minds.
P  C P C | NNNN P NNNN
 P  C |  NNNF P NNNF
  ... P  C | FFFF P FFFF   
P  C | NNNN  | NNNF  P C | NNFN
P C  P C | NFNN P C  | FNNN 1
P  C | NNFF P C | NFFN  P C | FFNN P C  | FNNF 1
P  C | NFNF P C | FNFN  0
P  C | NFFF  P C | FNFF  P C | FFNF P C | FFFN 0
P  NNNN  1 p  4

P  NNNF  P NNFN
 P NFNN
 P  FNNN
 p 1  p  3
P  NNFF  P NFFN
 P FFNN
 P  FNNF P NFNF
  P FNFN
 p 21 p   2
P  NFFF  P FNFF
 P FFNF
 P FFFN
  p31 p   
P  FFFF  p 4

P  C 1 1  p 4  1 p1 p 2 1 p21  p 4 0 p31  p 1  0  


4 3 2
p4
 1  p 4 p 4
1  p 2 p 1  p 2 3
  2

1  4p 6p 2 4p 3 p4 4p 12p2 12p3 4p 4 2p 2 4p 3 2p 4


1  4 p 2 4 p 3 p4
This result matches the one obtained previously, using other rules.
170

Conditional Probability

1.5.5
THEOREM
Thus, by the definition of conditional probability, the probability
to the same assumptions established for the probability theorem

 
of occurrence P Aj B
THE BAYES the probability of event B, given the occurrence of event Ajes: P B
j | A
P  A j

And since P B A j P A Pj  B | A j P A B j


P B P A  | B  j 
P A j B 
, then:P A | B  P  B
j

The numeratorP  A j Bit represents a term of equation 1.41, and can


to be replaced, as in equation 1.42 by the product P  B | Aj P  A j
and similarly, the denominator can be replaced by the sum of such
P  B | Aj P  A j
terms: P  A j| B n
,A
 j ____ (1.43)
P  B | Ai P A i
i 1
This result is known as Bayes' theorem, which provides a rule
whose validity is indisputable for obtaining, from a set of probabilities-
a priori probabilities, assigned objectively or subjectively, a set of proof-
a posteriori abilities, which allow to corroborate them, if their assignment was
objective, or allow to modify and correct them, if their assignment was subjective,
based on the evidence that a certain event has occurred.

When we say: 'given the occurrence of event B', this should not be inter-
pretend as if you are the result of a deterministic experiment, assuming
that if it has occurred, then P(B)=1. The richness of Spanish makes it easier to express
the idea of a better way, with the phrase: 'if the event happens.'
While Bayes' rule seems a complicated expression, it is still in
essence the same quotient that defines conditional probability, except that the
denominator, which corresponds to a marginal probability, is now expanded
doing according to the total probability theorem. In essence, the theorem invokes
only two laws: addition and multiplication of probabilities.
17

BAYES' THEOREM

Let's carefully review the meaning of the terms contained in the


called Bayes' rule:
P(AiP(Ai) = A priori probability of occurrence of the event Ai
P(B|A iConditional probability of occurrence of event B, given that
the eventAiIt happens. Event Aiseen as the cause of occurrence of
eventB
P(AiP(B) = Conditional probability of the occurrence of event Ai, if it is that
the eventBocurriera. The eventB seen as the effect of the occurrence of the
eventAi.
Both the theorem and the subjective probability associated with it, always
have sparked controversy. The so-called prior probabilities P(A ithey can
coming from any of the interpretations of probability: classical, fre-
storyteller or subjective; objectivity in the assignment is conditioned, since
only in games of chance can symmetry be invoked and only with
abundant statistical information it is possible to use relative frequencies; in the
most real problems, the so-called prior probabilities must be
to be evaluated subjectively, at best with a logical criterion.

In general, in the professional field, subjective probabilities are not


irresponsible occurrences of someone; even if they are not based on any calculations
In general, they correspond to reasonable evaluations that are made by
well-informed and committed dreams, translating them into beliefs; in the
Bayes' theorem, the mathematical term for belief is called probability
a priori, one that would be constantly changing based on new
data, always in the range between 0 and 1.
The prior knowledge that we have of many things is based on our
beliefs and assumptions, influencing our perception; and our perception-
tion is more or less sensitive to information to the extent that it mo-
modifies our beliefs about the world. Bayes' theorem allows us to merge
the subjective probabilities, a priori, with new experimental information,
to obtain revised or posterior probabilities. The rule
it can be applied iteratively as a process of a sequential nature and
adaptive, which allows refining the prior probabilities, as one
is generating new evidence.
The Bayesian approach has been useful in some co-based estimates.
subjective knowledge, since the fact of being able to review such estimates, in
congruence with additional empirical evidence, opens new ways to create
knowledge. The Bayesian perspective has been revolutionary to the point
to become the majority viewpoint; Bayes' rule is the formula
mathematics of beliefs, which measures how much the new evidence is capable
of altering the prior probabilities. Nowadays, it is possible to measure beliefs
of the people and also measure the changes in perception produced, then
to receive certain information.
Bayes' theorem is currently used in a wide variety of ...
problems, ranging from offshore oil exploration to discrimination
elimination of spam in email systems.
172

Conditional Probability

The name of the theorem honors the memory of Thomas Bayes; however,
Now it is known that he only participated marginally in its expression, for there is
evidence that it was never in a position to make formulations from
total probabilities. The first to state it was Abraham De Moivre,
but who really developed it was Laplace, who in 1812 expressed: “Let A
an event that occurs in conjunction with one and only one of the events dis-
togetherB1, B2…, BnIf event A is known to have occurred, what is the proof?
probability of the eventBjtoo? The probability of existence of one of
those causes are equal to a fraction with a numerator equal to the probability
of the event that follows from this case and a denominator that is the sum of the
similar probabilities related to all possible causes.

Example 1.72. URNS. As a continuation of example 1.68, consider that


from one of the three urns a ball was drawn that turned out to be white, now in-
Teresa calculates the probability that the chosen urn was 1, 2, or 3.
Classical prior probabilities: P  1 1 / 3 , P 2  1 / 3 , P 3 1 / 3
P  B |1  1 / 3 , P B | 2  1/6, P B | 3  3/4
ed:H
atcueadlyrehcadal P  B  5 /12,PR 7 / 12
P  B |1  P  1  13/   4
that it has been 1: P1| B  0.266
P  B 5 / 12 15
P  B | 2 P  2 113/6/   2
that it has been the 2: P  2 | B 0.133
P  B 5 / 12 15
P  B | 3 P  3 3 / 4 1  / 3  3
c) That it has been the 3:P  3 | B 0.6
P  B 5 / 12 5

Example 1.73. DEFECTIVE. From the items produced by three diffe-


rents machines, suppose that a random item has been chosen and it
it has resulted defective; calculate the probability that it comes from the machine-
naA, de laBo de laC.
Frequentist probabilities: P  A 0.50, P B  0.30, P C  0.20

P  D | A 0.04, P D
 | B 0.02, P  D|C  0.03
P:detalucD
lacneebydaerladaht0.032,
I c
P D 0.968    
a) That comes from A:
P  D | A P A0.04 0.50 0.02 5
P  A | D 0.625
P  D 0.032 0.032 8
b) That comes from B:
P  D | B P  B
0.02 0.30 0.006 3
P  B | D 0.1875
P  D 0.032 0.032 16
c) That comes from C:
P  D |C  P C 0.03 0.20 0.006 3
P  C | D 0.1875
P  D 0.032 0.032 16
17

BAYES' THEOREM

Example 1.74. INTERCHANGE. For the case of the Viaduct - Periphery interchange
Nice, we will calculate some conditional probabilities.
P  x
They already had: 0.1, P and   0.2, P x | y  0.5, P z | x y  
0.2
Px y  0.1, P x y  
0.8, P z |  x y P z | x  y 
P z | x y 1  
 
P x    
0.9, P y 0.8, P x | y 0.5, P x | y 1, P x | y 0, P z 0.36      
Assuming that segment z is saturated:
a) Probability that the sections x and y also become saturated:
P  z | x and
 P x y P  z | x y P x | y  P 1 y 0.5 0.2 5
Px y|z 
P  z P  z 0.36 18
b) Probability that the tramox will saturate, but not the tramoy:
1 0 0.8 
P z | x y P x | y P y    

P x y|z
P  z
 0.36
0

c) Probability that the tramway becomes saturated, but not the x:



P z | x y P x | y P  y    1 0.5 0.2 5

P x y|z  P  z 0.36 18
d) Probability that neither the tramox nor the tramoy is saturated:

P z | x y P x | y P y     0.2 1 0.8 4

P x y|z  P  z 0.36 9
Assuming that section z does not saturate, we will first calculate:

P z | x y 1  P z | x y 1  0.2 0.8   

P z | x y P z | x y    P z | x y 0
e) Probability that the segments x, y, and s become saturated:

P z | x y P  x | y  P y  0 0.5 0.2

P x y|z  0
P z  0.64
f) Probability that the tramox gets saturated, but not ely:
P x y|z  0
g) Probability that the tramoy saturates, but not the x:
P x y|z  0
h) neither of the two sections should be saturated.

P z | x  
y P x | y P y   0.8 1 0.8
P x  y|z  P  z 0.64
1

Example 1.75. ELECTRIC CIRCUIT. Considering connector 5, and the


empirically assigned probability; given that there is current between the
minalesAyB, calculate the following probabilities:
a) With the first switch closed:
P  N|C
1 P 
NNNN  
NNNF   NFNN
NNFN  
 NNFF  NFNF
     NFFN NFFF|C 
174

Conditional Probability

P  
NNNN|C 
 P NNNF|C  P 
NNFN|C  P 
NFNN|C 

P NNFF|C  
 P NFNF|C   P NFFN|C  P  NFFF|C  
P  NNNN|C  P NNNN   P  NNNF|C P NNNF  
 
P  C P  C
P  NNFN|C  P NNFN   P  NFNN|C P NFNN  
  
P  C P  C
P  NNFF|C P NNFF  P  NFNF|C P NFNF  
  
P  C P  C
P  NFFN|C 
P NFFN  P  NFFF|C P NFFF  
 
P  C P  C

1  1  p 3 4 1
p1 p 2  1 p 21  p 0
3
 2
1  4p  4p  p
2 3 4

1  4p 6p  4p  p  3p 9p 2 9p 3 p 4 2p 2 4p 3 p 4
2 3 4

1  4 p 2 4 p 3 p4
1  p p2 p3
1  4 p 2 4 p 3 p 4
b) That switches 1 and 4 are closed:
P  N 1 N|C
4  P NNNN
  
NNFN NFNN  NFFN|C   
P  NNNN|C  
 P NNFN|C   P NFNN|C
   P NFFN|C 
P  NNNN|C  P NNNN   P  NNFN|C P NNFN  

P  C P  C
P  NFNN|C  P NFNN   P  NFFN|C P NFFN  
 
P  C P  C

1  1  p 2 4 1 p1 p 1  p 21 p
3
 2
1  4 p 2 4 p 3 p4
1  4p 6p 2 4p 3 p4 2p 6p 2 6p 3 2p 4 p 2 2p 3 p 4
1  4 p 2 4 p 3 p4
1  2 p  p2
1  4 p 2 4 p 3 p4
c) That switches 1 and 4 are open:
P  F 1 F|C
4  
P FFFF   FNFF
FFNF   FNNF|C  
P  FFFF|C
 
 P FFNF|C  
 P FNFF|C  FNNF|C
P 
P  FFFF|C 
P FFFF  P  FFNF|C 
P FFNF 

P  C P  C
P  FNFF|C  
P FNFF  P  FNNF|C 
P FNNF 
 
P  C P  C
p4 2 0 p31  p 1 p2 1  p   2
0 p 2 2 p 3 p 4
1  4 p 2 4 p 3  p 4 1  4 p 2 4 p 3 p 4
17

BAYES' THEOREM

d) That the four switches are closed:


P  FFFF|C 
P FFFF 
P  NNNN |C 
P  C
1  1 p 
4

14p 6p 4 p 2  3
 p4
1  4 p 2 4 p 3 p4 1  4 p 2 4 p 3 p4

Prior and posterior probability trees


A graphical way to visualize the application of probability theorems.
total likelihood and Bayes is through conditional probability trees,
now in a generalized form.
The rules for its construction are practically the same as those that
They were seen previously and here they are specified. Based on marine probabilities-
initially, P(Aiof the events1A2,..., An, mutually exclusive and
collectively exhaustive, and the associated conditional probabilities
with them: P(B|A i) an diagram can be constructed that is called a tree of
prior probabilities:

According to the following rules:


a) The sum of the probabilities of the events corresponding to branches
that start from the same node must be 1, which implies that such events of-
I am mutually exclusive and collectively exhaustive.
b) Haynramas that start from the initial node, in which paths are recorded.
known prior marginal probabilities of events A1, A2..., An,
mutually exclusive and collectively exhaustive.
c) There are two branches that branch off from the second nodes, in which they are noted,
respectively, the conditional probabilities: P(B|A i), which is known,
yP(Bc|Ai), which is calculated by complement; these two probabilities co-
corresponding to the nodes, i=1,2,…, n, must sum to 1, as they are events.
complementary in the conditional sample space Aiwithin this space,
such events are mutually exclusive and collectively exhaustive.
d) The joint probabilities P  B AyPi Bc  A I are noted as
terminal values of the branches of the tree, and is obtained respectively from the
products P(B|A I)P(Ai)yP(Bc|AI)P(Ai), whose values appear on branches
consequences in the tree. This is the law of multiplication of probabilities.
176

Conditional Probability

e) The marginal probabilities P(B) and P(B'c) are obtained respectively-


you of the sums P(B|Ai)P(Ai)y P(BcAi)P(Ai) whose terms appear to-
alternatively as terminal values of the tree. This is the proof theorem-
total ability.
f) The marginal probabilities P(B) and P(Bcobviously they must add 1;
this is the best way to verify arithmetic operations.
Then, starting from the tree of prior probabilities, the re-
prospective posterior probability tree:

According to the following rules:


g) The sum of the probabilities of the events corresponding to branches
that start from the same node must be 1, which implies that such events of-
I am mutually exclusive and collectively exhaustive.
h) There are two branches that stem from the initial node, in which are noted, respectively
actively, the marginal probabilities P(B) and P(Bc)calculated through the
total probability theorem; the eventscthey are complementary and, by
consequential, mutually exclusive, and collectively exhaustive.
There are haynramas that start from the 2 seconds nodes, in which they must appear.
Inquire about posterior conditional probabilities: P(Ai|B), for the node
corresponding to A, and P(Ai|Bc) for the node corresponding to aBc; has not been
the value of these probabilities is not calculated yet, it is only known that the sum
corresponding to each of the nodes must be 1, since these are events
mutually exclusive and collectively exhaustive in the conditional spaces
cionalesByBc,
j) The joint probabilities P  A i ByP A  BIc  , that had already been
calculated through the law of multiplication of probabilities, they are recorded
as terminal values of the branches of this second tree, knowing that co-
respond to the products P(Ai|B)P(B)yP(Ai|Bc)P(Bc), whose values appear-
one hundred on consequential branches in this second tree.
k) The unknown posterior conditional probabilities P(A)i|B) y
P(Ai|B),
c P  Ai B
are obtained, respectively, by dividing the terminal value 
between the marginal probability P(B), and dividing the terminal valueP A i B c

between the marginal probability P(BcThis is Bayes' theorem.
17

BAYES' THEOREM

l) The marginal probabilities P(AIi = 1, 2, ..., n, they are obtained respectively


actively from the sums P  A i B+P A  B i
c
 , whose terms appear in detail-
leaves, as terminal values of the tree.
m) The sum of the marginal probabilities P(AiObviously, it must add up.
This is the best way to verify arithmetic operations.

Matrix arrangements
1. The two equations that relate the probabilities of complementary events
comments: P  A P Ac  1, P B P B c  1   can be expressed by
the product of the individual probability matrix by a unit vector and
P  A P Ac   1 1
results in a unit vector:
P  B P B c
  1 1
2. The equations that relate joint probabilities with pro-
Marginal abilities correspond to the total probability theorem:
P A B P A  Bc P  A , P  Ac B P Ac B c P  Ac   
P  B A P B  Ac P  B, P B c A  P Bc Ac P Bc   
and can be expressed through the product of a probability matrix
jointly by a unit vector and results in a probability vector
complementary margins:
P A B  P  A B c 1 P A
P Ac B  P A c
Bc  1 P  A c

P B A  P  B Ac  1 P B
P  Bc A  P B c
Ac  1 P  B c

Note that in the second system of equations the probability matrix


joint is the transpose of the matrix of joint probabilities of the first one.
3. The equations that relate conditional probabilities with the
marginal probabilities of two events also correspond to the theorem
of total probability, but with each term expanded as a product:
P  A | B  P  B P A | BcP B c P A  
P  AcB P B P  A c Bc P Bc P A c   
  P B  | AcP  Ac  P B
P  B | A P A
 cA P A P B c  AcP A c
PB P Bc    
and it can be expressed as the product of a matrix whose elements are
conditional products by marginals, by a vector of probabilities
marginals and results in the other vector of marginal probabilities:
P  A | B P A | Bc  P B P A 
P  A c | B P A c|Bc  P B c
 P Ac

P  B | A P B | Ac  P A P B 
P  B c | A P B c Ac  P Ac P Bc
178

Conditional Probability

Note that the first system of equations is associated with the probability tree.
a priori abilities and the second system of equations is associated with the tree of
posterior probabilities.

Example 1.76. DEFECTIVE. Statistical data indicates that the má-


quinasA, ByC produce, respectively, 50%, 30%, and 20% of the number
total number of items from a factory; the percentages of production defects
of these machines are, respectively, 4%, 2%, and 3%. Build trees of
prior and posterior probability, to visualize the application of the teore-
more of total probability and Bayes, to the solution of this problem.
A priori tree:

A posteriori tree:

And matrix-wise:
0.5
0.04 0.02 0.03 0.032
0.3
0.96 0.96 0.97 0.968
0.2
0.6250 0.4959 0.5
0.032
0.1875 0.3037 0.3
0.968
0.1875 0.2004 0.2
17

BAYES' THEOREM

The construction of probability trees can be generalized for


when there are mutually exclusive and collectively exhaustive sets of events
exhaustive minds.

Example 1.77. INTERCHANGE. At the interchange of Viaducto and Periférico there has been
It has been observed that the segments x and y congest with probabilities 0.1 and 0.2.
respectively, when the tramoyse gets congested, the tramoxse conges-
tiona with a probability of 0.5, and that when the sections xe and y work below
its capabilities, the probability that the tramozse saturates is 0.2. Constru-
probability trees a priori and a posteriori, to visualize the application
from the theorems of total probability and Bayes, when solving this problem.
All the required information has already been calculated and summarized.
in example 1.74, which is now being emptied into the probability trees.
A priori tree:

Posterior tree:
180

Conditional Probability

Conditional independence
If A, ByCson three events that can occur together, then it
it says that events A and B are conditionally independent given the occurrence
the occurrence of event C, with P(C) > 0, if C occurs, the occurrence or non-occurrence
year-end company provides no information about the probability of occurrence of
The occurrence or non-occurrence of B does not provide any information about the
probability of occurrence of A:
P  A | B C P A
 |C  , P B C 0
P  B | A C P B
 |C , P A  C 0 

When A and B are conditionally independent given C, it is written as:


 A B|C  , and another equivalent alternative definition is:
P  A B|C  P A  |C P  B  |C 
In another case, it is said that A and B are conditionally dependent given C.

and it is written: A B|C 
Statistical independence does not imply conditional independence and the ind-
Conditional dependence does not imply statistical independence. In fact, when
Independence is conditional; if event C occurs, events A and B are.
independent and if it occurs, then A and B are dependent.
In diagnostic problems, what matters is to identify the hypothesis.
most likely according to the available evidence, and Bayes' rule is the
recurrence formula that formalizes the fact that degrees of belief are
they can renew, opening an inductive path to the scientific method to create
new knowledge.
Thus, Bayes' theorem has become the general procedure
rich that combines different sources of information iteratively and makes diag-
predictions based on causal relationships. The direct probabilities of the type
P(effect|cause), called causal probabilities, are usually easier
to obtain the inverse probabilities of the type P(cause|effect), called
diagnosis probabilities. In general, the theorem allows transitioning from one to
others easily, but as information related to it is incorporated
with more and more effects, the problem can become unmanageable, even in com-
very powerful computers. And it is that the number of effects considered, makes
that the number of causal probabilities to evaluate grows exponentially
a2n+1presenting them in a single two-way table, with two rows and
2ncolumns; with the additional difficulty of having to assign probabilities to
events that involve simultaneous effects.
1

BAYES' THEOREM

The evident practical limitations in the application of Bayes' rule,


as for the growth in the number of effects, they caused that the majority-
a lot of researchers from around the world will discard the
methods based on the Bayesian approach. Only until it was introduced as
hypothesis the conditional independence, was that Bayes' theorem recovered
validity; the proposal assumes that the probability of occurrence of an effect is
independent of the other effects that do not depend directly on it. The su-
this is fully justified, because in real phenomena, each effect is
it relates only to some other effects, and does not relate directly
with all the others. That is why it is necessary that in each diagnosis, it is dis-
criminalize the effects that are or can be considered independent between
yes, in the presence of a cause, of those others who show dependency
statistics.
With that information, the so-called Bayesian probabilistic networks are built.
sianas, which graphically represent the set of relationships between causes and
effects of each problem; associated with each aspect recorded in that network, it
it has a small table that contains the probabilities of that aspect,
given the aspects directly related to it; thus, instead of a large
table of numbers that relates all aspects, a set is required of
small tables with a few probabilities in each.
In the representation of a Bayesian network, the presence of a link indicates
causal dependency, and the absence of a link implicitly indicates its
mutual independence; therefore, these networks have a certain degree of modulation.
ridad, which facilitates the calculation of joint elementary probabilities den+1
dimensions. If a cause had effects Ei, all of them independent
between themselves, the number of probabilities to evaluate would be reduced to n+1 instead of being
n
2:
n+1 P C E 1
E ...
2
E P nC
  P  E|C
i 
I 1
To make probabilistic inference, all that is required is to know
the causal probabilities of each event separately and multiply them together
yes; that's why the problem becomes much more manageable. If the effects were
statistically independent, it would be very simple to calculate the2n+1 probabi-
combined conditional probabilities, through the product of probabilities
simple conditionals; but it is not common for this to happen.
Countless artificial intelligence systems are currently being developed.
capable of facing and solving large and complex problems; they are
supported by Bayesian networks from which probabilistic solutions are extracted
rational inductive cases. With them, the price of oil can be predicted,
predicting stock market fluctuations, diagnostics can be made
remote control doctors, diagnose the failures in the functioning of everything
type of network, it is possible to select the best crop in a certain
region or the determination of the best prospect for well location
exploratory oil
Interestingly, it is believed that our brain constantly assigns pro-
subjective skills and uses the Bayesian approach to learn and relearn
of each day.
182

Conditional Probability

Example 1.78. Medical diagnosis. Supposedly a doctor knows about...


the subjective frequency with which each disease occurs, P(A)i),
like the frequency with which the associated symptoms appear
P(BjAi), although he/she knows that a certain symptom could also be due to another
Condition. The doctor's diagnosis consists of assessing the probability.
P(Ai|Bj)of each diseaseAifrom the presence of symptomsBjHe/She is not given
You can demand objectivity in your assignment of prior probabilities, because why not
its empirical verification is feasible. Nevertheless, its estimates are
Subjective assignments of probability are considered good.
In every medical diagnosis, the questioning is the same: given that the
the patient presents these symptoms, which of the possible diseases is the one that
Does the patient have it? The doctor's uncertainty comes from the lack of knowledge.
detailed account of the facts, as the patient provides subjective, imprecise data,
incomplete or erroneous; furthermore, the relationships between diseases and the
symptoms are not deterministic, since the same set of symptoms
it can be associated with different diseases.
When a patient has a toothache, the doctor may assume immediat
immediately that it is a cavity problem; but leaving out other po-
Possibilities, such as wisdom teeth or sinusitis, may not be accurately diagnosed.
Of course, being exhaustive implies more work and a better understanding.
theoretical and practical on all the rules of inference that relate symptoms
with diseases.
Based on his perception and experience, the doctor has a mental framework.
evaluation that tells you that a patient with a toothache has cavities with
probability of 80% and it is denoted mathematically in the form P  C | D 0.8
that is a way of expressing subjective knowledge, with probability
as a degree of belief, not of certainty; that subjective probability can
being changed and refined constantly, as new ones are available
You see evidence.
The unconditional probability associated with an event is the level of belief
about the occurrence of that event, in the absence of any other information or
evidence; for example: P  C 0.2oP C D 0.16 
The conditional probability associated with an event, given the occurrence of
another is the degree of belief about the occurrence of the first event, given that
All we know is that another event occurs; for example: P  C | D 0.8
it means that once it is known that a patient has a toothache, and the doctor
He only knows that, his belief is that the patient will have cavities with a probability of 0.8.
Conditional probability is not the same as a logical implication with
uncertainty, that is, P  C | D 0.8 does not mean that every time there is pain
the probability of cavities is 80%, otherwise it indicates that in the presence of pain,
As the only known evidence, 8 out of 10 times, the patient will have cavities.
In this case, we can distinguish that P  C | D it is a conditional probability
the a priori, which measures the possibility of occurrence of the cause called cavities,
in the presence of the effect called pain; on the other hand, P  D |C  it is a probabi-
conditional posterior probability, which measures the likelihood of the occurrence of the effect
called pain, in the presence of the cause called caries.
1

BAYES' THEOREM

If in addition to considering pain as a symptom, the presence is taken into account


if there is or isn't, from a cavity in a dental piece, then the elemental events
There are eight, and the way to present the joint probabilities is in a table.
double entry, with two lines for the data associated with the disease
and four columns for the data associated with the symptoms:

P  C 0.128 0.032 0.032 0.008 0.20


P  D 0.128 0.006 0.032 0.034 0.20
P  O 0.128 0.006 0.032 0.174 0.34
P C D  0.128 0.032 0.16
P  C | D 0.80
P  D 0.2 0.2
P C c D  0.006 0.034 0.04
P C c| D  0.20
P  D 0.2 0.2
The pair of complementary conditional probabilities
P  C | D ,P  C|c D  0.8,0.2 adds one, because the marginal probability
nal P  D it acts as a constant that normalizes the probabilities of
conditional occurrence.
1 1
P  C | D P  C D , P C|c  D P Cc D  5
P  D 0.2
P  C | D ,P  C|c D   P Cc
P C D,  D  5 0.16,0.04
 0.8, 0.2
In this case, the available information is that of probabilities.

causesPsíntoma|enfermedad  Bayes' rule calculates is pro-
and what

diagnostic skillsPenfermedad|síntoma . 
P C D O  0.128 0.128
P C | D 
The 0.9552
P D O  0.128 0.006 0.134


P C | D The  0.0448
For this example in which the symptoms are two: pain and cavity, it was necessary to
calculate 8 conditional probabilities; if instead of two there had been five
symptoms, the probabilities that would need to be evaluated would be 64.
Now let's assume that these two symptoms are statistically independent.
teeth; for this we require two tables with four data each:

Pain and cavity are events that depend on whether the patient has cavities.
or some other ailment. However, once we know that the patient
has cavities, we can assume that cavity and pain are independent events
tes; es decir, si la caries es causa tanto del dolor como de la oquedad, podemos
assume that feeling pain does not affect the likelihood of having a cavity and vice versa
versus, which means considering that hollowness and pain are conditional events.
finally independent: P  O D|C P  O |C
 P D  |C 
184

Conditional Probability

P C D O  P  D O|C P C
   P  D |C  P  O |C  P  C
P C | D The 
P D O  P D O  P D O 
P  C | D O  ,P C | D O   P D |C  P O  |C P C,P D
  |C P O |C P  C     
0.8 0.8 0.2,0.2 0.5294 0.8 0.128,0.0847 0.6018,0.3982
P  C | D O 
0.60, P C | D 
The 0.40, P  D The  0.2127
P D The C  P D O|C P C  P D
 |C P O |C P C  0.8  0.8 0.2 0.128

The joint probability P  O D  , although it is now unknown and does not re-
wants to be evaluated, it must function as a constant that normalizes the
1
conditional occurrence probabilities:
P O D 
P  C | D O, P C | D  The  P D |  C P O | C P C, 
  P  D | C P O | C P C  
0.8 0.8 0.2,0.2 0.5294 0.8 0.128, 0.0847 0.6018,0.3982
P C | D 
The 
0.60, P C | D 
The 0.40
Weseethattheseresultsarebasedonthehypothesisofconditionalindependence.
National differences are much different from those previously calculated based on probabilities.
joint elementals. And it's either this, or the assignment of the latter leaves
a lot to wish for, or the consideration of conditionally independent events
teeth is simply not valid.
The hypothesis of conditional independence between events facilitates the assignment
of the 8 elementary joint probabilities, with which the
probabilistic behavior of cavities and their symptoms:
P C D The  P D O|C P C  P D
 |C P O |C P C  0.8
  0.8 0.2 0.128
Instead of having a table with 8 independent numbers, we only require
4 independent numbers, located in two tables.

1.5.6 The four corners


The 28 domino tiles are placed on the table, face down, in such a way
PROBLEMS
that the recorded points cannot be seen on them; they mix very well
CLASSICS to ensure that the order has been altered; then they are arranged in a rectangle
Finally, only the four chips that remained are flipped.
at the corners of the rectangle. Calculate the probability that at least one of
the four flipped tiles are a mule.
1

CLASSIC PROBLEMS

P M M M M  P M P   M  P  M
 P M
P  M P  M
 M  M P M  M P M M P M
 M P  M M   
 M
P M M P  M M M P M  M  M P M M M   
P  M
 M M M 
P M M M M  4P M  6 PM
 M 4P M M
 M P M 
M M M 
2 3 4
1 1 1 1
4 6 4 
4 4 4 4
1  0.375 0.0625  0.00390625 0.6836
Approximately 7 out of 10 times it will spawn at least one mule and you can
bet that this will happen.

Couples life insurance


From a very young age, human beings learn that we are going to die,
without knowing when. If we take a large group of people born in the same...
in my year and we follow up through a retrospective study that com-
it starts from its birth until a hundred years later, we will observe that with the
As time goes by, the number of deaths increases every year,
until the generational group becomes extinct. If we calculate the quotient of the nu-
number of deceased people per year among the total number of people in the initial group,
we obtain one hundred relative frequencies that measure the possibility of occurrence
of death for each age, that is, the probabilities of death according to
age, which are formally denoted byx, and they are the probabilities of
that someone who is age x dies before reaching age x+1. Except for the
first 4 years of life, during which there is still high mortality, the probabilities
Death rates increase with age.
In order to visualize these one hundred values as whole numbers,
They are presented, not as probabilities, but as rates of
mortality by age, defined as the number of deaths by age, per each
100,000 people from the generational group. The tabular record of these values.
it is known as a longitudinal mortality table for people of that ge-
generation.
Another way to present mortality data is to record the number
of deaths occurring in any year, separating the ages; to this type
Mortality cross-sectional tables are referred to as records, where each
one of the one hundred ages corresponds to a different generation.
Although the primary goal of a mortality table is to measure mortality-
Dad, some statistics that are of interest to scientists can be deduced from her.
and humanists, for very diverse purposes, and they are useful in studies of growth
population decline, population composition, longevity, migration, orphan-
dad, widowhood, fertility, etc.
In addition to the odds of deathx, there are some others this-
Important statistics; for the moment, we will highlight four of them:
1. The survival probabilities by age, formally denoted
you porpx and what is the probability that someone who is age will survive the
age x + 1 : px= 1 - qx
186

Conditional Probability

2. Life expectancy at birth is an estimate of the average number of years


what a group of people from the same generation would experience, if the movements
the mortality rate of the evaluated region remained constant. And
transversely, life expectancy is the average number of years that
live a certain population in a certain period of time.
3. Remaining life expectancy at any age: the number of people
those who survive to age x: lx+1 = lx(1-qx) = lxpx; lx+1/lx = px
Currently, it is common to present statistics on men and women.
they are separated because they are significantly different. The spe-
The lifespan of women is higher than that of men, and that is true.
any age and the difference is not negligible; the data from 2009 shows
While the life expectancy at birth for men was 76.6
years, that of women was 82.4 years, a difference of almost six years. That
the mortality differential between sexes, observable at all ages, implies
that the risk of death is lower for women than for men,
in a certain period of time. The difference in favor of the woman has to be
translate into a lower insurance premium, because it implies lower risk for the
insurance company; that is to say, a cheaper life insurance for a woman
that for a man.
Insurance companies set the rates for insurance premiums for a
person, according to their age and sex, based on a single survival table.
But the company occasionally receives requests for insurance quotes.
for a marriage, and the problem consists of establishing the premium that must
pay the couple to obtain the obligation for the insurer to pay a rent
to the husband and then to his widow, if he passes away.
Para establecer un seguro para dos personas, se requiere conocer la proba-
survival or extinction probability of the couple. According to the definition
from frequentist probability, it would be necessary to monitor survival
from numerous groups of two people and statistically deduce a value
approximation of the sought probability. It would be necessary to establish the rates
survival for two people, instead of one, and instead of presenting the
probability distribution in a table with two columns, which contains
two survival rates for each age, for men and for women, would be
it is necessary to build as many tables as possible values of the differences of
ages exist. And that would be a huge job.
However, if we notice that the deaths of the members of a
marital couple are statistically independent events, then, the
The joint probability of survival is the product of the probabilities.
individual survival rates of each one, established based on their age
and their sex; then it makes no sense to establish a new statistic regarding
the groups of two people, the use of individual survival tables
provides the probabilities that will need to be multiplied to obtain the probability
Dad searched. Let's assume he is 52 years old and she is 44; their probabilities-
survival data is ph52 = 0.0 and pm44 = 0.0; therefore, their probabi-
the joint survival probability is: 0.0. With that, the insurance company already
you can set the premium.
1

CLASSIC PROBLEMS

To distinguish different risks, mortality tables can be


include other characteristics, such as occupation, socio-economic class, in-
diseases, smoking status, etc., from which one can calculate, for example,
the hope of health, the hope of life without disability and the hope of
healthy life.

The withered rosebush


One of the things that Father Juan appreciated the most was a small rosebush that
I gave some beautiful roses of a very strange color; but it was a plant.
very delicate, as if it was watered daily, its probability of thriving was
1/2, but if it was not watered, the probability was reduced to 1/4. In a certain
On one occasion, Father Juan was absent for thirty days, entrusting the gardener.
from the parish, to water it daily; only that the gardener had bad
memory, since he used to forget to fulfill two out of every three tasks he received.
When Father Juan returned, his rose bush had withered. What is
the probability that the gardener had not watered it?
Let the events be: R = {the gardener waters the rosebush} P(R)= 1/3
P(Rc)= 2/3
C ={el rosal sigue creciendo} P(C|R)= 1/2
the rosebush is drying P(S|R)= 1/2
First, we will solve the exercise without using Bayes' rule, but only
reasoning mind. Starting from the fact that the rosebush has withered in a
30-day period, we estimate that the gardener must have watered it a third.
part of the time, that is 10 days yes and 20 days no; of the 10 days when yes
watered, half of the time the rosebush would dry out, that is in 5 days; and of the 20
On days when I didn't water it, three-quarters of the time the rosebush would dry out, it is
say in 15 days. In total, there were 20 days in which the rosebush withered, 15 of them
which was for not having watered it; therefore the ratio 15/20 is simplified
a 3/4, equivalent to 75%.
Now we will obtain the solution by constructing the trees of
prior and posterior probability:
188

Conditional Probability

The response with Bayes' rule yields the same result: P(Rc|S)= 3/4

Breast cancer
Doctors do not know for sure if a mammogram is useful for
detect breast cancer; the problem seems to be in the interpretation ra-
dialogical, because much of what can be seen in it is a grayish area, which
for some it is something ambiguous, considered normal and for others that ambiguity
is suspicious. The truth is that mammograms are not as useful as one might think.
to suppose, although for economic interests it is claimed otherwise.
It is believed that around 1% of women over 40
Years suffer from breast cancer: P(C) = 0.01. An exploratory test is available.
what is mammography, which provides new information: 80% of the
Women with breast cancer will have positive mammograms: P(+|C) = 0.80,
while only 9.6% of women without cancer will have mammograms
positive:P(+|CcIn summary, we have 80% true positives and 20%
of false positives; and we have 9.6% of false negatives and 90.4% of negatives
true. What is the probability that a woman whose mammogram returned
positive, does he really have cancer?
Bayes' rule immediately answers the question, but before applying it
let's solve the exercise based on reasoning. Considering a group of
10,000 women; if P(C)= 0.01, there is a group of 100 women with cancer
mom and another group of 9,900 women without breast cancer. After the examination
Radiologically, four groups are formed; group A consists of 80 women.
with breast cancer and positive mammography, group B formed by 20 women-
breast cancer patients with negative mammography, group C formed by 950
women without breast cancer and positive mammography and the group formed by
8,950 women without breast cancer and negative mammography.
The exploratory method is fallible: it points out 20 out of 100 sick women.
of cancer as healthy, and of the 9,900 healthy women, as sick.
If we divide the number of women in group A by the total number of women that
tested positive in the test, it results in 7.8%, which means that 92.2% of
women who test positive on the test do not have cancer. While
if we divide the number of women in group D among the total number of women that
they tested negative in the test, the result is 99.8%, which means that the
Mammography is quite reliable when its result is negative.
1

CLASSIC PROBLEMS

Bayes' theorem shows that it would be much more effective to conduct the test.
only to the group of women at high risk, due to family history and habits
of hygiene, and not to all women over 40 years old, without exception. The most-
tography is not a treatment, but a method of medical exploration aimed at
exclude healthy people to dedicate themselves to the sick; but if he/she explores
if it does not contribute, then it stops being useful.

Now let's answer this second question: what is the probability of having
Cancer, if after two consecutive mammograms, both diagnose cancer?
SiM1= {1a. positive mammogram}, M2= {2a. positive mammography}.
Obviously, we cannot assume unconditional independence between M.1y
M2but it is valid to assume conditional independence of M1yM2given that
there is cancer.
Therefore: P  C | M1 M 2 P C M M 1  M|C  P 1M |C
2P   P C2    ,
where it is a proportionality constant that is determined automatically
mind.
 1 P  M |C2 P C,P
P M|C   M|C
 P M
1
|C P C2   
 0.8   0.8    0.01
  ,   0.096 0.096 0.99 
0.0064,0.00912384
0.0064 0.00912384 0.0155238 64.3942131952507 64.42
P  C | M1 M 2 64.42 0.0064
 
0.4122
Then approximately 41% of women with dual diagnoses
positively with mammography will actually have breast cancer.

You might also like