Home About us Mathematical Epidemiology Rweb EPITools Statistics Notes Web Design Contact us Links |

> Home > Statistics Notes > Probability > Examples

**Example 2.** Three red balls, two green balls, and one blue ball is
placed in an urn and shuffled. If one ball is drawn at random, what is
the probability that the ball drawn is either green or blue?

*Solution.*
There are six balls in the urn, and each is equally likely to be drawn.
Since two balls are green, and one is blue, there are a total of 2+1=3 which
are either green or blue. So the probability of drawing a ball that is
either blue or green is 3/6.

**Example 3.** A fair die is rolled once. What is the probability of
getting a one or a four?

*Solution.*
There are six equally likely outcomes, and we are interested in the chance
of an event that includes exactly two of them; we want the chance that
either of two outcomes will occur. So the probability is 2/6.

**Example 4.** Suppose the probability that a person will wear a red
shirt on a given day is known to be 0.1, and the probability that a person
will wear an
orange shirt is 0.05. What is the probability that a person will wear
either an orange or a red shirt?

*Solution.*
Let R be the event the person wears a red shirt, and let G be the event
the person wears an orange shirt.
Assuming that they cannot wear both red and orange, the events R and G are
mutually
exclusive. We are interested in the probability of their union;
the union of R and G is the event that the person wears a red shirt and
an orange shirt.
Since the events are mutually exclusive,
the probability of their union is the sum of the
probabilities. The answer is 0.1+0.05=0.15.

Example 5. Suppose the probability that a person will wear a
red shirt on a given day is 0.1, the probability of an orange shirt is 0.2,
and the probability of a fluorescent day-glo yellow shirt is 0.7. Disregarding
the aesthetic issue, what are all the possible events? What are their
probabilities?

*Solution.*
Let R be the event the person wears a red shirt, G the orange shirt, and Y the
yellow shirt. The possible events are:

{} | the impossible event | P({})=0, by definition |

{R} | the event that the person wore a red shirt | P({R})=0.1, as given to us |

{G} | the event that the person wore a orange shirt | P({G})=0.2, as given to us |

{Y} | the event that the person wore a yellow shirt | P({Y})=0.7, as given to us |

{R,G} | the event that the person wore a red or orange shirt | P({R,G})=P({R})+P({G})=0.3, since {R} and {G} are disjoint |

{G,Y} | the event that the person wore a orange or yellow shirt | P({G,Y})=P({G})+P({Y})=0.9, since {G} and {Y} are disjoint |

{R,Y} | the event that the person wore a red or yellow shirt | P({R,Y})=P({R})+P({Y})=0.8, since {R} and {Y} are disjoint |

{R,G,Y} | the whole sample space; the event that the person wore a red, orange, or yellow shirt. | P({R,G,Y})=1 |

**Example 6.** Suppose the probability that a person will wear a
red shirt on a given day is 0.1, and that we know the person will otherwise
wear a green or a yellow shirt.
What are all the possible events? If possible, what is the probability of
each event?

*Solution.*
Let R be the event the person wears a red shirt, G the orange shirt, and Y the
yellow shirt. The possible events are:

{} | the impossible event | P({})=0, by definition |

{R} | the event that the person wore a red shirt | P({R})=0.1, as given to us |

{G} | the event that the person wore a orange shirt | we don't know what P({G}) is, based on the evidence given |

{Y} | the event that the person wore a yellow shirt | we don't know what P({Y}) is, based on the evidence given |

{R,G} | the event that the person wore a red or orange shirt | we don't know what P({R,G}) is, based on the evidence given |

{G,Y} | the event that the person wore a orange or yellow shirt | P({G,Y})=1-P({R})=0.9, since the complement of {R} is {G,Y} |

{R,Y} | the event that the person wore a red or yellow shirt | we don't know what P({R,Y}) is, based on the evidence given |

{R,G,Y} | the whole sample space; the event that the person wore a red, orange, or yellow shirt. | P({R,G,Y})=1 |

**Example 7.** Two people play a game of chess against a computer. Suppose
we know the chance the first will win is 0.4, and the chance the second will
win is 0.3. What are all the
possible events, and what are the probabilities (if they can be determined)?

*Solution.*
Let A represent a win for the first person, lowercase a a loss for the first
person, B a win for the second person, and b a loss for the second person.

{} | the impossible event | P({})=0 |

{AB} | Both win | We don't know what P({AB}) is, based on the information given |

{Ab} | First wins, second loses | We don't know what P({Ab}) is, based on the information given |

{aB} | First loses, second wins | We don't know what P({aB}) is, based on the information given |

{ab} | Both lose | We don't know what P({ab}) is, based on the information given |

{AB,ab} | Either both win or Both lose | We don't know what P({AB,ab}) is, based on the information given |

{Ab,aB} | One wins and one loses | We don't know what P({Ab,aB}) is, based on the information given |

{Ab,AB} | First person wins | P({Ab,AB})=0.3 |

{ab,aB} | First person loses | P({ab,aB})=1-P({Ab,AB})=0.7 |

{aB,AB} | Second person wins | P({aB,AB})=0.4 |

{ab,Ab} | Second person loses | P({ab,Ab})=1-P({ab,Ab})=0.6 |

{AB,Ab,ab} | If the first loses, the second loses; anything other than the first losing and the second winning | We don't know what P({AB,Ab,ab}) is, based on the information given |

{AB,aB,ab} | If the second loses, the first loses | We don't know what P({AB,aB,ab}) is, based on the information given |

{AB,aB,Ab} | At least one person wins | We don't know what P({AB,aB,Ab}) is, based on the information given |

{aB,Ab,ab} | At least one person loses | We don't know what P({aB,Ab,ab}) is, based on the information given |

{AB,aB,Ab,ab} | The certain event | P({AB,aB,Ab,ab})=1 |

**Example 8.** What is the probability of getting two heads when rolling
two fair coins independently?

*Solution.*
Since the probability of getting a head on the first coin is 0.5, and
on the second coin, independently, is 0.5, the probability of getting a
head on the first coin and on the second coin is 0.5 × 0.5 = 0.25.

**Example 9.** What is the probability of getting an 11 when rolling two
fair six-sided dice?

*Solution.*
The probability of getting a 5 on the first die is 1/6, and independently of
this, the probability of getting a 6 on the second die is 1/6. The probability
of getting a five on the first die and a six on the second die is, using
the multiplication rule for independent events, 1/6 × 1/6 = 1/36.
Similarly, the probability of getting a 6 on the first die and a 5 on the
second die is 1/36 also. So the probability of getting an 11 is 1/36 +
1/36 = 1/18.

**Example 10.** What is the probability of rolling doubles when rolling
a pair of six-sided dice?

*Solution.*
There are 36 possible, equally likely, outcomes when rolling a pair of
six-sided dice. These are all possible values of the numbers 1 through 6
on the first die, and all possible values of 1 through 6 on the second.
Of these 36 possibilities, there are 6 outcomes that are doubles: (1,1),
(2,2), (3,3), (4,4), (5,5), and (6,6). Since there are six ways to
realize the event ``doubles'' out of 36 possibilities, the probability
of doubles is 6/36=1/6.

**Example 11.** Suppose that the probability of developing
primary tuberculosis disease following exposure is 5\% for HIV-negative
individuals, and 80\% for HIV-positive
individuals (this number is for illustrative purposes only). If 30\% of
individuals in a certain population are HIV-positive, what is the chance
a random individual exposed to tuberculosis will develop primary tuberculosis?

*Solution.*
For exposed individuals,
the probability of primary tuberculosis given HIV-positive status may be
denoted P(T|H), and given HIV-negative may be denoted P(T|N). We may
write P(T)=P(T|H) P(H) + P(T|N) P(N). Substituting the values given, we
have P(T) = 0.8 × 0.3 + 0.05 × 0.7 = 0.275.

**Example 12.** Suppose that 5 percent of a population is infected with
HIV, and that a needle is used on a random individual chosen from the
population. If a needle is used on a person infected with HIV, it becomes
contaminated. Suppose that if a contaminated needle is used on an
uninfected individual,
it has a 30% chance of being disinfected due to rinsing, dilution, and so
forth. If the chance a needle is infected is *p*, and it is reused
(inappropriately) on a random person from the population, what is the
chance it will be contaminated after that use? *Note: these numbers are
purely for illustrative purposes.*

*Solution.*
Let P(C2) be the probability of contamination after the use. Then
P(C2|C1) be the probability it will be contaminated after the use given
that it was contaminated to start with, and let P(C2|U1) be the probability
it will be contaminated after the use given it was uncontaminated to start
with. So we have P(C2)=P(C2|C1)P(C1) + P(C2|U1)P(U1).

Now what is the chance it will be contaminated after the one use given it
is contaminated to start with? Either the needle is used on an infected
person, in which case it stays infected, or the needle is used on an
uninfected person, in which case it has a 70% chance of staying infected,
P(I|-). P(I|-) denotes the chance of a needle
staying contaminated given the person the
needle was used on is negative; P(I|-)=0.7. And P(I|+) is the chance
of a needle staying contaminated if it is used on a positive person;
we know P(I|+)=1. So we have
P(C2|C1) = P(I|-)P(-) + P(I|+)P(+).

Now what is the chance the needle will be contaminated after one use given
it was uncontaminated at the beginning, P(C2|U1)? Either the person it
gets reused on is negative, in which case the needle is going to be
uncontaminated, or else the needle is used on a contaminated person, in
which case it gets contaminated:
P(C2|U1)=P(J|-)P(-)+P(J|+)P(+) = P(+).

So all together, P(C2)=(P(I|-)P(-)+P(+)) P(C1) + P(+) P(U1). We know
P(U1)=1-P(C1), and P(-)=1-P(+). We know P(+)=0.05 also. So finally,

P(C2)=(0.7 × 0.95 + 0.05) × p + 0.05 × (1-p).

**Example 13.** Suppose the per-partnership probability of HIV-transmission
from an infected partner is 0.1 (Grant et al, 1987). For a random partnership,
what is the probability of infection if the prevalence of HIV infection is 0.4?

*Solution.*
Since the partner is chosen at random, the probability the partner is
infected equals 0.4. Let P(I) be the probability the person becomes infected
after the partnership; let P(I|+) be the probability of becoming infected
given that the partner is infected; let P(I|-) be the chance of becoming
infected given the partner isn't infected. Assume P(I|-)=0. Then
we have P(I)=P(I|+)P(+)+P(I|-)P(-)=P(I|+)P(+)=0.1 × 0.4=0.04. Note:
these numbers are for illustration.

**Example 14.** Suppose that for a certain species, the probability of
surviving the first year is 0.5, and that if the animal is alive at the
beginning of a year, the chance it survives the year is 0.95. Finally,
suppose the maximum lifespan is 4 years. For an animal just born,
what is the chance of dying each year?

*Solution.*
The probability of surviving the first year is 0.5, of surviving to the
second year is 0.5 × 0.95, etc. The chance of dying at the second
year is 0.5 (the chance you did not die the first year), times 0.05, the
chance you die the second year. The chance of dying the third year is
the chance of surviving the first two years, times the chance of dying the
third given the animal is still alive at the beginning of the third year.

dying at 1 year | 0.5 |

dying at 2 years | 0.5 × 0.05 |

dying at 3 years | 0.5 × 0.95 × 0.05 |

dying at 4 years | 0.45125 |

On to the sample mean.

Return to statistics page.

Return to probability page.

Return to stochastic seminar.

All content © 2000 Mathepi.Com (except R and Rweb).

About us.