DM.chapter Two and Three
DM.chapter Two and Three
ELEMENTARY PROBABILITY
Why Learn Probability?
Nothing in life is certain. In everything we do, we gauge the chances of
successful outcomes, from business to medicine to the weather
A probability provides a quantitative description of the chances or likelihoods
associated with various outcomes
We gauge the chances of successful outcomes in business, medicine,
weather,
and other everyday situations such as the lottery
It provides a bridge between descriptive and inferential statistics
1
Definitions of some probability terms
Experiment: Any process of observation or measurement or any process
which generates well defined outcome.
Probability Experiment: It is an experiment that can be repeated any
number of times under similar conditions and it is possible to enumerate
the total number of outcomes with out predicting an individual out come.
It is also called random experiment
Example: If a fair die is rolled once it is possible to list all the possible
outcomes i.e.1, 2, 3, 4, 5, 6 but it is not possible to predict
which outcome will occur.
2
Outcome :The result of a single trial of a random experiment
Sample Space: Set of all possible outcomes of a probability experiment
Event: It is a subset of sample space. It is a statement about one or more
outcomes of a random experiment .They are denoted by capital letters.
3
Example: Consider the above experiment.
Let A be the event of odd numbers,
B be the event of even numbers, and
C be the event of number 8, then
A = {1, 3, 5}, B = {2, 4, 6}, and C = { }.
Remark: If S (sample space) has n members then there are exactly 2n subsets or
events.
4
Equally Likely Events: Events which have the same chance of occurring.
Complement of an Event: the complement of an event A means non-
occurrence
of A and is denoted by
A' , or Ac , or A
5
Elementary Event: an event having only a single element or sample
point.
Mutually Exclusive Events: Two events which cannot happen at the
same time.
Independent Events: Two events are independent if the occurrence of
one does not affect the probability of the other occurring.
Dependent Events: Two events are dependent if the first event affects
the outcome or occurrence of the second event in a way the
probability is changed.
6
Sample Space Examples
Experiment Sample Space
• Toss a Coin, Note Face {Head, Tail}
• Toss 2 Coins, Note Faces {HH, HT, TH, TT}
• Select 1 Card, Note Kind {2♥, 2♠, ..., A♦} (52)
• Select 1 Card, Note Color {Red, Black}
• Play a Football Game {Win, Lose, Tie}
• Inspect a Part, Note Quality {Defective, Good}
• Observe Gender {Male, Female}
8
Relative frequency method
This method used for an experiment where it is not possible to apply the
classical approach (usually because outcomes not equally likely or the
experiment is not repeatable under uniform conditions).
The probability of an event E is the relative frequency of occurrence of E
or the proportion of times E occurs in a large number of trials of the
experiment.
9
Example
Household appliances classified by color and style are given in the following table:
Color
Style Blue (C1) White (C2) Green (C3) Total
S1 1400 450 900 2750
S2 1300 350 800 2450
S3 900 700 750 2350
S4 1000 250 1250 2450
Total 4600 1750 3650 10000
2) P(ø) =0
3) P( A B) P( A) P( B) where A and B are mutually exclusive events
4) P(A ∩ B) = P(A)*P(B) where A and B are independent events
5) P( A' ) 1 P( A)
6) 0 P( A) 1
11
Conditional probability and Independency
p( A B)
p( A / B) , p( B) 0
p( B)
Remark:
p( A' B) 1 p( A B)
p( B ' A) 1 p( B A)
12
Probability of Independent Events
Two events A and B are independent if and only if
p A B p A . p B
Here
p A B p A, PB A pB
13
EXAMPLES
1. If two coins are tossed once, what is the probability of getting
a) Both heads, b) At least one head?
2. A fair die is tossed once. What is the probability of getting
a) Number 4? b) An even number?
b) An odd number? c) Number 8?
3. Compare the chances of throwing 4 with one dice, 8 with two dice and 12 with
three dice.
4. A box of 80 candles consists of 30 defective and 50 non defective candles. If 10
of this candles are selected at random, what is the probability that
a) All will be defective, b) 6 will be non defective, c) All will be non defective
14
5. A committee of 4 people is to be appointed from 3 officers of the
production department, 4 officers of the purchase department, two
officers of the sales department, and 1 chartered accountant. Find the
probability of forming the committee in the following manner:
a) There must be one from each category.
b) The committee should have at least one from the purchase
department.
c) The chartered accountant must be in the committee.
15
6. Suppose we have two red and three white balls in a bag
a) Draw a ball with replacement
Let A = the event that the first draw is red and
B = the event that the second draw is red, then
P(A) = p(B) = 2/5.
b) Draw a ball with out replacement
Let A= the event that the first draw is red and
B= the event that the second draw is red, then
P(A) = 2/5 and p(B) = 1/4 .
16
7. For a student enrolling at freshman at certain university the
probability is 0.25 that he/she will get scholarship and 0.75 that he/she
will graduate. If the probability is 0.2 that he/she will get scholarship
and will also graduate. What is the probability that a student who get
a scholarship given that he/she is already graduated?
8. If the probability that a research project will be well planned is 0.60
and the probability that it will be well planned and well executed is
0.54, what is the probability that it will be well executed given that it
is well planned?
17
9. The following table contains the raw values and corresponding probability matrix for the
results of a national survey of 200 executives. They were asked to identify the
geographic location of their company’s industry type:
Geographic Location
Industry Type North (D) South (E) East (F) West (G) Total
Finance (A) 24 10 8 14 56
Manufacturing (B) 30 6 22 12 70
Communications (C) 28 18 12 16 74
Total 82 34 42 42 200
a) If a respondent is randomly selected from these data, what is the probability that this
executive is from the east?
b) What is the probability that a respondent is from the communications industry or from
the North?
c) What is the probability that a randomly selected respondent is from South or the West?
18
10. A bit string of length four is generated at random so that each of the 16 bit
strings of length four is equally likely. What is the probability that it contains
at least two consecutive 0s, given that its first bit is a 0? (We assume that 0
bits and 1 bits are equally likely.)
11. What is the conditional probability that a family with two children has two
boys, given they have at least one boy? Assume that each of the
possibilities BB, BG, GB, and GG is equally likely, where B represents a boy
and G represents a girl.(Note that BG represents a family with an older boy
and a younger girl while GB represents a family with an older girl and a
younger boy.)
19
12. Suppose E is the event that a randomly generated bit string of length four
begins with a 1 and F is the event that this bit string contains an even
number
of 1s. Are E and F independent, if the 16 bit strings of length four are equally
likely?
13. A box contains four black and six white balls. What is the probability of
getting two black balls in drawing one after the other under the following
conditions?
a) The first ball drawn is not replaced
b) The first ball drawn is replaced 20
Chapter Three
21
22
23
Linear Homogeneous
Recurrence Relations
• Always has a solution of the form 𝒂𝒏 = 𝒓𝒏
• Plug into the recurrence and solve for r
Example 4:
• an = 5an-1 – 6an-2
• Characteristic equation for an = 5an-1 – 6an-2 is
r2 – 5r + 6 = 0
• Roots: r = 2, r = 3. (Case: distinct, real roots)
• Solutions: an = 2n and an = 3n
Cond’…
• Initial conditions (a0 = 3 and a1 = 8) are used to solve for the constants α1 and α2 in
an = α1·2n + α2·3n
• Hence an = 2n + 2(3n)
Linear Homogeneous
Recurrence Relations
1. Plug in 𝒂𝒏 = 𝒓𝒏 to get characteristic equation
g0 = 5
g1 = 0
g2 = 18
Cont’d…
29
Linear Nonhomogeneous Recurrence Relations with Constant Coefficients
The recurrence relation 𝑎𝑛 = 3𝑎𝑛−1 + 2𝑛 is an example of a linear
nonhomogeneous recurrence relation with constant coefficients, that is,
A recurrence relation of the form 𝑎𝑛 = 𝑐1 𝑎𝑛−1 + 𝑐2 𝑎𝑛−2 + ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 + 𝐹(𝑛),
where 𝑐1 , 𝑐2 , … , 𝑐𝑘 are real numbers and F(n) is a function not identically zero
depending only on n.
The recurrence relation 𝑎𝑛 = 𝑐1 𝑎𝑛−1 + 𝑐2 𝑎𝑛−2 + ⋯ + 𝑐𝑘 𝑎𝑛−𝑘 is called the
associated homogeneous recurrence relation.
It plays an important role in the solution of the nonhomogeneous recurrence
relation.
30
Example 9: Each of the recurrence relations
a) 𝑎𝑛 = 𝑎𝑛−1 + 2𝑛,
b) 𝑎𝑛 = 𝑎𝑛−1 + 𝑎𝑛−2 + 𝑛 + 1,
c) 𝑎𝑛 = 3𝑎𝑛−1 + 𝑛3𝑛 and
d) 𝑎𝑛 = 𝑎𝑛−1 + 𝑎𝑛−2 + 𝑎𝑛−3 + 𝑛! is a linear nonhomogeneous recurrence relation
with constant coefficients.
The associated linear homogeneous recurrence relations are
a) 𝑎𝑛 = 𝑎𝑛−1 ,
b) 𝑎𝑛 = 𝑎𝑛−1 + 𝑎𝑛−2 ,
c) 𝑎𝑛 = 3𝑎𝑛−1 , and
d) 𝑎𝑛 = 𝑎𝑛−1 + 𝑎𝑛−2 + 𝑎𝑛−3 , respectively.
31
The key fact about linear nonhomogeneous recurrence relations with
constant coefficients is that every solution is the sum of a particular
solution and a solution of the associated linear homogeneous recurrence
relation, as Theorem 5 shows.
32
33
EXAMPLE 10: Find all solutions of the recurrence relation 𝑎𝑛 = 3𝑎𝑛−1 + 2n. What is
the solution with 𝑎1 = 3?
EXAMPLE 11: Find all solutions of the recurrence relation 𝑎𝑛 = 5𝑎𝑛−1 − 6𝑎𝑛−2 + 7𝑛 .
34
35
EXAMPLE 1: What form does a particular solution of the linear nonhomogeneous
recurrence relation 𝑎𝑛 = 6𝑎𝑛−1 − 9𝑎𝑛−2 + 𝐹 𝑛 have when
a) F 𝑛 = 3𝑛 𝑐) 𝐹(𝑛) = 𝑛2 2𝑛
b) 𝐹 𝑛 = 𝑛3𝑛 𝑑) 𝐹 𝑛 = (𝑛2 + 1)3𝑛 ?
36
EXAMPLE 3: a) Find all solutions of the recurrence relation
𝑎𝑛 = −5𝑎𝑛−1 − 6𝑎𝑛−2 + 42(4𝑛 ).
b) Find the solution of this recurrence relation with
𝑎0 = 56 and 𝑎1 = 278
37
38
39
40
41
42
GENERATING FUNCTION
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59