Conditional Probability

Published on May 2016 | Categories: Types, School Work | Downloads: 44 | Comments: 0 | Views: 274
of 30
Download PDF   Embed   Report

Conditional Probability

Comments

Content

Probability:
A word probability has two basic meanings:
(i)
(ii)

A quantitative measure of uncertainty and
A measure of degree of belief in a particular statement or problem.

Probability is the chance that something will happen - how likely it is that some event will
happen. Sometimes you can measure a probability with a number like "10% chance of rain", or
you can use words such as impossible, unlikely, possible, even chance, likely and certain.
Many events can't be predicted with total certainty. The best we can say is how likely they are to
happen, using the idea of probability.

Tossing a Coin :
When a coin is tossed, there are two possible outcomes:



heads (H) or
tails (T)

We say that the probability of the coin landing H is ½. And the probability of the coin
landing T is ½.

Throwing Dice :
When a single die is thrown, there are six possible outcomes: 1, 2, 3, 4, 5, 6. The probability of
any one of them is 1/6.

Probability :
In general:
Number of ways it can happen
Probability of an event happening =
Total number of outcomes

Example:
The chances of rolling a "4" with a die
Number of ways it can happen: 1 (there is only 1 face with a "4" on it)
Total number of outcomes: 6 (there are 6 faces altogether)
1
So the probability =
6

Example:
There are 5 marbles in a bag: 4 are blue, and 1 is red. What is the probability that a blue marble
gets picked?
Number of ways it can happen: 4 (there are 4 blues)
Total number of outcomes: 5 (there are 5 marbles in total)
4
So the probability =

= 0.8
5

Random Experiment:
An experiment which produces different results even through it is repeated a large number of
times under essentially similar conditions are called a random experiment. The tossing of a coin,
the throwing of a balanced die, throwing a card from a well shuffled deck of 52 playing cards,
selecting a sample etc. are examples of random variable.

Trail:
The single performance of a random experiment is called trail. The result obtained from a trail on
a random experiment is called an outcome.

Sample space:
A set consisting of all possible outcomes that can result from random experiment is defined to be
a sample space for the experiment and is denote by the letter S. Each possible outcome is a
member of the sample space and is called a sample point in that space. e.g. the sample space for
tossing two coins once (or tossing a coin twice) will contain four possible outcomes denoted by
S= {HH, HT, TH, TT}

Events:
An event is an individual outcome or any number of outcomes (sample space) of a random
experiment or a trail. In set terminology, any subset of a sample space S of the experiment, is
called an event. E.g. S={a,b}
Then the four possible subsets are
, {a} , {b} , {a , b}

Each of these subsets are Events.

Mutually Exclusive Events:
If either event A or event B or both events occur on a single performance of an experiment this is
called the union of the events A and B denoted as
exclusive then the probability of either occurring is

. If two events are mutually

For example, the chance of rolling a 1 or 2 on a six-sided die is

Equally Likely Events:
Two events A and B are said to be equally likely, when one event is as likely to occur as the
other, in other words, each event should occur in equal number in equal trails. For example,
when a fair coin is tossed, the head is as likely to appear as the tail, and the proportion of the
times each side is expected to appear is ½.

Not mutually exclusive events:
If the events are not mutually exclusive then
For example, when drawing a single card at random from a regular deck of cards, the chance of
getting a heart or a face card (J,Q,K) (or one that is both) is
, because of
the 52 cards of a deck 13 are hearts, 12 are face cards, and 3 are both: here the possibilities
included in the "3 that are both" are included in each of the "13 hearts" and the "12 face cards"
but should only be counted once.

Independent events:
If two events, A and B are independent then the joint probability is

For example, if two coins are flipped the chance of both being heads is

.

Dependent Events:
The conditional probability of an event B in relationship to an event A is the probability that
event B occurs given that event A has already occurred. The notation for conditional probability
is P (B|A) [pronounced as the probability of event B given A].

When two events, A and B, are dependent, the probability of both occurring is:

P(A and B) = P(A) · P(B|A)

Example:
Mr. Parietti needs two students to help him with a science demonstration for his class
of 18 girls and 12 boys. He randomly chooses one student who comes to the front of
the room. He then chooses a second student from those still seated. What is the
probability that both students chosen are girls?

Solution:
P(Girl1 and Girl2)= P(Girl1) and p(Girl2|Girl1)
=

=
=

Counting sample points:

1) Rule of multiplication: The rule of counting deals with event multiples.
An event multiple occurs when two or more independent events are grouped
together. The third rule of counting helps us determine how many ways an
event multiple can occur.

Example 1:
How many sample points are in the sample space when a coin is flipped 4
times?

Solution: Each coin flip can have one of two outcomes - heads or tails.
Therefore, the four coin flips can land in (2)(2)(2)(2) = 16 ways.

2) Rule of permutation:
Often, we want to count all of the possible ways that a single set of objects can be
arranged. For example, consider the letters X, Y, and Z. These letters can be arranged
a number of different ways (XYZ, XZY, YXZ, etc.) Each of these arrangements is a
permutation.





A permutation is an arrangement of all or part of a set of objects, with regard
to the order of the arrangement. This means that XYZ is considered a different
permutation than ZYX.
The number of permutations of n objects taken r at a time is denoted by nPr.

Example:
In horse racing, a trifecta is a type of bet. To win a trifecta bet, you need to specify
the horses that finish in the top three spots in the exact order in which they finish. If
eight horses enter the race, how many different ways can they finish in the top three
spots?

Solution: Rule 2 tells us that the number of permutations is n! / (n - r)!. We have 8
horses in the race. So n = 8. And we want to arrange them in groups of 3, so r = 3.
Thus, the number of permutations is 8! / (8 - 3)! or 8! / 5!. This is equal to (8)(7)(6) =
336 distinct trifecta outcomes. With 336 possible permutations, the trifecta is a
difficult bet to win.

3) Rule of combination:
Sometimes, we want to count all of the possible ways that a single set of objects can
be selected - without regard to the order in which they are selected.






In general, n objects can be arranged in n (n - 1) (n - 2) ... (3) (2) (1) ways.
This product is represented by the symbol n! Which is called n factorial? (By
convention, 0! = 1.)
A combination is a selection of all or part of a set of objects, without regard to
the order in which they were selected. This means that XYZ is considered the
same combination as ZYX.
The number of combinations of n objects taken r at a time is denoted by nCr.

Example:
Five-card stud is a poker game, in which a player is dealt 5 cards from an ordinary
deck of 52 playing cards. How many distinct poker hands could be dealt? (Hint: In
this problem, the order in which cards are dealt is NOT important; For example, if
you are dealt the ace, king, queen, jack, ten of spades, that is the same as being dealt
the ten, jack, queen, king, ace of spades.)

Solution:
For this problem, it would be impractical to list all of the possible poker hands.
However, the number of possible poker hands can be easily calculated using Rule 1.
Rule 1 tells us that the number of combinations is n! / r!(n - r)!. We have 52 cards in
the deck so n = 52. And we want to arrange them in groups of 5, so r = 5. Thus, the
number of combinations is 52! / 5!(52 - 5)! or 52! / 5!47!. This is equal to 2,598,960
distinct poker hands.

Probability of an event:
The probability of an event E is defined as the number of outcomes favorable
to E divided by the total number of equally likely outcomes in the sample space S of
the experiment.
That is:
P(E)=n(S)/n(E)
where
n(E) is the number of outcomes favorable to E and
n(S) is the total number of equally likely outcomes in the sample space S of the
experiment

Properties of Probability:
(a) 0 ≤ P(event) ≤ 1
In words, this means that the probability of an event must be a number
between 0 and 1(inclusive).
(b) P(impossible event) = 0
In words: The probability of an impossible event is 0.
(c) P(certain event) = 1
In words: The probability of an absolutely certain event is 1.

Example 1:
What is the probability of...?
(a) Getting an ace if I choose a card at random from a standard pack of 52 playing
cards.

Solution:
In a standard pack of 52 playing cards, we have:
♥ 2 3 4 5 6 7 8 9 10 J Q K A
♦ 2 3 4 5 6 7 8 9 10 J Q K A
♣ 2 3 4 5 6 7 8 9 10 J Q K A
♠ 2 3 4 5 6 7 8 9 10 J Q K A
There are 4 aces in a normal pack. So the probability of getting an ace is:
P(ace)=4/52=1/13

(b) Getting a 5 if I roll a die.
A die has 6 numbers.
There is only one 5 on a die, so the probability of getting a 5 is given by:
P(5)=1/6

(c) Getting an even number if I roll a die.
Even numbers are 2,4,6. So
P(even)= 3/6=1/2

(d) Having one Tuesday in this week?
Each week has a Tuesday, so probability = 1.

Example 2:
There are 15 balls numbered 1 to 15, in a bag. If a person selects one at random, what is the
probability that the number printed on the ball will be a prime number greater than 5?

solution
The primes between 5 and 15 are: 7,11,13.
So the probability =3/15 = 1/5

Laws of probability:
Law 1:
Addition
Rule

When two events, A and B, are mutually
exclusive, the probability that A or B will
occur is the sum of the probability of each
event.
P(A or B) = P(A) + P(B)

Experiment
1:

A single 6-sided die is rolled. What is the probability of rolling a 2 or a 5?

Probabilities:
P(2) = 1/6

P(5) = 1/6

P(2 or 5) = p(2) + p(5)

= 1/6 + 1/6
= 2/6
= 1/3

Experiment 2:

A spinner has 4 equal sectors colored yellow, blue,
green, and red. What is the probability of landing on red
or blue after spinning this spinner?

Probabilities:

1
P(red)

=
4

1
P(blue)

=
4

P(red or blue) = P(red) + P(blue)

1
=

1
+

4

2
=
4

4

1
=
2

Experime A glass jar contains 1 red, 3 green, 2 blue, and 4 yellow marbles. If a single
marble is chosen at random from the jar, what is the probability that it is
nt 3:
yellow or green?

Probabilit
ies:

4
P(yellow)

=
10

3
P(green)

=
10

P(yellow or green) = P(yellow) + P(green)

4
=

3
+

10

7
=
10

10

Experiment 4:

A single card is chosen at random from
a standard deck of 52 playing cards.
What is the probability of choosing a
king or a club?

Probabilities:

P(king or
club)

= P(kin P(clu P(king of
+
g)
b)
- clubs)

4
=

13
+

52

1
-

52

52

16
=
52

4
=
13

Addition Rule 2:

When two events, A and B, are non-mutually
exclusive, the probability that A or B will
occur is:
P(A or B) = P(A) + P(B) - P(A and B)

In the rule above, P (A and B) refers to the overlap of the two events. Let's apply this rule to
some other experiments.

Experiment 5:

In a math class of 30 students, 17 are boys and 13 are
girls. On a unit test, 4 boys and 5 girls made an A grade.
If a student is chosen at random from the class, what is
the probability of choosing a girl or an A student?

Probabilities:

P(girl or A)

= P(girl) + P(A) - P(girl and A)

13
=

9
+

30

5
-

30

30

17
=
30

Experiment 6: On New Year's Eve, the probability of a
person having a car accident is 0.09. The
probability of a person driving while
intoxicated is 0.32 and probability of a person
having a car accident while intoxicated is
0.15. What is the probability of a person
driving while intoxicated or having a car
accident?

Probabilities:
P(intoxicated or accident)

= P(intoxicated) + P(accident) - P(intoxicated and accident)

= 0.32
=

+ 0.09
0.26

- 0.15

LAW 2:
If ø is the impossible event, then p (ø) = 0.

LAW 3: Law of Complement.
If ̅ is the complement of an event A relative to the sample space S, then
P( ̅) = 1- P(A)
Example. In the game involving two throws of a die, if A is the event “the total is 10 or
greater”, then Ac is the event “the total is 9 or smaller”. We know P(A) = , so P( )= .

Conditional Probability:
The conditional probability of an event B is the probability that the event will occur given the
knowledge that an event A has already occurred. This probability is written P(B|A), notation for
the probability of B given A. In the case where events A and B are independent (where
event A has no effect on the probability of event B), the conditional probability of event B given
event A is simply the probability of event B, that is P(B).
If events A and B are not independent, then the probability of the intersection of A and B (the
probability that both events occur) is defined by
P(A and B) = P(A)P(B|A).
From this definition, the conditional probability P(B|A) is easily obtained by dividing by P(A):

Example:
Susan took two tests. The probability of her passing both tests is 0.6. The probability of her
passing the first test is 0.8. What is the probability of her passing the second test given that she has
passed the first test?

Solution:

Example:
A bag contains red and blue marbles. Two marbles are drawn without replacement. The
probability of selecting a red marble and then a blue marble is 0.28. The probability of selecting a
red marble on the first draw is 0.5. What is the probability of selecting a blue marble on the second
draw, given that the first marble drawn was red?

Solution:

Example: Three urns of the same appearance are given as follows:
Urn A contains 5 red and 7 white balls.
Urn B contains 4 red and 3 white balls.
Urn c contains 3 red and 4 white balls.
An urn is selected at random and a ball is drawn from the urn.
(i)
What is the probability that the ball drawn is red?
(ii)
If the ball drawn is red, what is the probability that it came from urn A?

Solution:
Here we first select one of the three urns then we draw a ball which is either red (R) or
(White). In other words, we perform a sequence of two experiments. This process is
described by the probability tree diagram in which each branch of the tree gives the
respective probability.
Now the probability of selecting urn A, for instance, and then a red ball (R) is
1/3*5/12=5/36, because the probability that any particular path of the tree occurs is, by the
multiplication law, the product of the probability of each branch of the path.
(i)

Now the probability of drawing a red ball is given by the relation
P(R) = P(A)P(R|A) + P(B)P(R|B) + P(C)P(R|C)

as there are three mutually exclusive paths leading to the drawing of a red ball.
Hence P(R) = 1/3*5/12 + 1/3*4/7 + 1/3*3/7
= 119/252
= 0.4722

(ii)

Here we need the probability that urn A is selected, given that the ball drawn is red,
that is P(A|R)
P(A|R) =

But

= probability that urn A is selected and a red ball is drawn
= 1/3 * 5/12
= 5/36

Hence P(A|R) =
= 35/119 = 0.294

Probability Distribution:
A probability distribution is a table or an equation that links each outcome of a statistical
experiment with its probability of occurrence. Consider the coin flip experiment described above.
The table below, which associates each outcome with its probability, is an example of a
probability distribution.
Number
of heads

Probability

0

0.25

1

0.50

2

0.25

The above table represents the probability distribution of the random variable X.

Example 1:
Suppose a die is tossed. What is the probability that the die will land on 6 ?
Solution: When a die is tossed, there are 6 possible outcomes represented by: S = { 1, 2, 3, 4, 5, 6
}. Each possible outcome is a random variable (X), and each outcome is equally likely to occur.
Thus, we have a uniform distribution. Therefore, the P(X = 6) = 1/6.

Example 2:
Suppose we repeat the dice tossing experiment described in Example 1. This time, we ask what is
the probability that the die will land on a number that is smaller than 5 ?
Solution: When a die is tossed, there are 6 possible outcomes represented by: S = { 1, 2, 3, 4, 5, 6
}. Each possible outcome is equally likely to occur. Thus, we have a uniform distribution.
This problem involves a cumulative probability. The probability that the die will land on a number
smaller than 5 is equal to:
P( X < 5 ) = P(X = 1) + P(X = 2) + P(X = 3) + P(X = 4) = 1/6 + 1/6 + 1/6 + 1/6 = 2/3

Expectation Value:
In probability and statistics, the expectation or expected value, is the weighted average value of a
random variable.

Expectation of continuous random variable:

E(X) is the expectation value of the continuous random variable X
x is the value of the continuous random variable X
P(x) is the probability density function

Expectation of discrete random variable:

E(X) is the expectation value of the continuous random variable X
x is the value of the continuous random variable X
P(x) is the probability mass function of X

Variance:
In probability and statistics, the variance of a random variable is the average value of the square
distance from the mean value. It represents the how the random variable is distributed near the
mean value. Small variance indicates that the random variable is distributed near the mean value.
Big variance indicates that the random variable is distributed far from the mean value. For
example, with normal distribution, narrow bell curve will have small variance and wide bell curve
will have big variance.

Variance definition:
The variance of random variable X is the expected value of squares of difference of X and the
expected value μ.
σ2 = Var ( X ) = E [(X - μ)2]
From the definition of the variance we can get
σ2 = Var ( X ) = E(X 2) - μ2

Example 1:
The probability distribution of X, the number of red cars John meets on his way to work each
morning, is given by the following table:

x

f(x)

0

0.41

1

0.37

2

0.16

3

0.05

4

0.05

Find the number of red cars that John expects to run into each morning on his way to work.

Solution:
This question is asking us to find the average number of red cars that John runs into on his way to
work. What makes this different from an ordinary mean question is that the odds (probability) of
running into a given number of cars are not the same.

Since X is a discrete random variable, the expected value is given by:

Although you wouldn't expect to run into 0.88 cars, let's pretend that the above is multiplied by
100 to get the actual number of cars that John comes across on his way to work.

Example 2:
A certain software company uses certain software to check for errors on any of the programs it
builds and then discards the software if the errors found exceed a certain number. Given that the
number of errors found is represented by a random variable X whose density function is given by

Find the average number of errors the company expects to find in a given program.

Solution:
The random variable X is given as a continuous random variable, thus its expected value can be
found as follows:

The company should expect to find approximately 14.93 errors.

Example 1:
A software engineering company tested a new product of theirs and found that the number of
errors per 100 CDs of the new software had the following probability distribution:

x

f(x)

2

0.01

3

0.25

4

0.4

5

0.3

6

0.04

Find the Variance of X

Solution
The probability distribution given is discrete and so we can find the variance from the following:

We need to find the mean μ first:

Then we find the variance:

Example 2:
Find the Standard Deviation of a random variable X whose probability density function is given by
f(x) where:

Solution:
Since the random variable X is continuous, we use the following formula to calculate the variance:

First we find the mean μ

Then we find the variance as:

Binomial Experiment:
A binomial experiment (also known as a Bernoulli trial) is a statistical experiment that has the
following properties:






The experiment consists of n repeated trials.
Each trial can result in just two possible outcomes. We call one of these outcomes a
success and the other, a failure.
The probability of success, denoted by P, is the same on every trial.
The trials are independent; that is, the outcome on one trial does not affect the outcome on
other trials.

Consider the following statistical experiment. You flip a coin 2 times and count the number of
times the coin lands on heads. This is a binomial experiment because:





The experiment consists of repeated trials. We flip a coin 2 times.
Each trial can result in just two possible outcomes - heads or tails.
The probability of success is constant - 0.5 on every trial.
The trials are independent; that is, getting heads on one trial does not affect whether we get
heads on other trials.

Notation:
The following notation is helpful, when we talk about binomial probability.




x: The number of successes that result from the binomial experiment.
n: The number of trials in the binomial experiment.
P: The probability of success on an individual trial.
Q: The probability of failure on an individual trial. (This is equal to 1 - P.)
n!: The factorial of n (also known as n factorial).
b(x; n, P): Binomial probability - the probability that an n-trial binomial experiment results



inexactly x successes, when the probability of success on an individual trial is P.
nCr: The number of combinations of n things, taken r at a time.






Binomial Distribution:
A binomial random variable is the number of successes x in n repeated trials of a binomial
experiment. The probability distribution of a binomial random variable is called a binomial
distribution (also known as a Bernoulli distribution).

Suppose we flip a coin two times and count the number of heads (successes). The binomial
random variable is the number of heads, which can take on values of 0, 1, or 2. The binomial
distribution is presented below.
Number
of heads

Probability

0

0.25

1

0.50

2

0.25

The binomial distribution has the following properties:




The mean of the distribution (μx) is equal to n * P .
The variance (σ2x) is n * P * ( 1 - P ).
The standard deviation (σx) is sqrt[ n * P * ( 1 - P ) ].

Example 1:

A die is tossed 3 times. What is the probability of
(a) No fives turning up?
(b) 1 five?
(c) 3 fives?

Solution:
This is a binomial distribution because there are only 2 possible outcomes (we get a 5 or we
don't).
Now, n=3 for each part. Let X= number of fives appearing.
(a) Here, x = 0.

P(X P(X=0)=

x=

=0.5787

=

=21675 =0.34722

=

=2161=4.6296×

(b) Here, x = 1.

P(X=1)=

(c) Here, x = 3.

P(X=3)=

Poisson distribution:
The Poisson random variable satisfies the following conditions:
1. The number of successes in two disjoint time intervals is independent.
2. The probability of a success during a small time interval is proportional to the entire length
of the time interval.
Apart from disjoint time intervals, the Poisson random variable also applies to disjoint regions of
space.
The probability distribution of a Poisson random variable X representing the number of
successes occurring in a given time interval or a specified region of space is given by the formula:

P(X) =
where
x=0,1,2,3…
e=2.71828 (but use your calculator's e button)
μ= mean number of successes in the given time interval or region of space

Mean and Variance of Poisson Distribution:

If μ is the average number of successes occurring in a given time interval or region in the Poisson
distribution, then the mean and the variance of the Poisson distribution are both equal to μ.
E(X) = μ
and
V(X) = σ2 = μ
Note: In a Poisson distribution, only one parameter, μ is needed to determine the probability of an
event.

Example 1
A life insurance salesman sells on the average 3 life insurance policies per week. Use Poisson's
law to calculate the probability that in a given week he will sell
a. Some policies
b. 2 or more policies but less than 5 policies.
c. Assuming that there are 5 working days per week, what is the probability that in a given
day he will sell one policy?
Here, μ = 3
(a) "Some policies" means "1 or more policies". We can work this out by finding 1 minus the
"zero policies" probability:

P(X > 0) = 1 − P(x0)
Now P(X)=

so P(x0)=

=4.9787×10-2

Therefore the probability of 1 or more policies is given by:
Probability=P(X≥0)

=1−P(x0)
=1−4.9787×10−10
=0.95021
(b) The probability of selling 2 or more, but less than 5 policies is:

P(2≤X<5)
=P(x2)+P(x3)+P(x4)
=

+

+

=0.61611
(c) Average number of policies sold per day: 53=0.6

So on a given day,

P(X)=

=0.32929

The Normal Distribution
The normal distributions are a very important class of statistical distributions. All normal
distributions are symmetric and have bell-shaped density curves with a single peak.
To speak specifically of any normal distribution, two quantities have to be specified: the mean µ ,
where the peak of the density occurs, and the standard deviation , which indicates the spread or
girth of the bell curve.
The normal density can be actually specified by means of an equation. The height of the density at
any value x is given by

All normal density curves satisfy the following property which is often referred to as
the Empirical Rule.
68% of the observations fall within 1 standard deviation of the mean, that is,
between

and

.

95% of the observations fall within 2 standard deviations of the mean, that is,
between

and

.

99.7% of the observations fall within 3 standard deviations of the mean, that is,
between
s

and

.

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close