Maths 3
Maths 3
occur simultaneously.
Example: If at least one child in a family of three children is a boy, what is the
probability that all three are boys?
Solution: The sample space is S= {BBB, BBG, BGB, GBB, GGB, GBG, BGG}
where B represents a boy and G represents a girl.
Hence S 7 and since E is the event that all the three are boys, E 1 .
E 1
Therefore P( E ) P( BBB ) .
S 7
Theorem 7.3: Consider the empty set and any events A and B. Then:
i)
ii)
iii)
Proof: Clearly A and A' are disjoint events. Thus P( A A' ) P( A) P( A' )
Now A A' S P( A A' ) P(S )
P( A) P( A' ) 1 since, P(S ) 1 P( A' ) 1 P( A)
Example: 2.4.3 A box contains 4 bad and 6 good tubes. Two are drawn out
from the box at a time. One is tested and found to be good. What is the
probability that the other one is also good?
Solution: Let A be the event that one tube is good and B be the event that the
other tube is good.
C (6,2) 1
Now P( A B) P(both tubes are good ) and P( A) 6 10 3 5 thus,
C (10,2) 3
P( A B) 1 3 5
P( B \ A)
P( A) 35 9
P( A B)
This implies P( A B) P( B) . P( A \ B) and P( B \ A) , with P( A) 0 gives
P( A)
P( A B) P( A) . P( B \ A)
Activity: 2.5
A lot contains 12 items of which 4 are defective. Three items are drawn at random
from the lot one after the other. Find the probability that all the three are no
defective.
yields P( A B) P( A) . P( B) .
We formally use the above equation as our definition of independence
Definition: 2.5.1 Events A and B are said to be independent if and only if
P( A B) P( B) . P( A) ; otherwise they are dependent.
…………………………………………………………………………………(1)
So B is also independent of A.
Find a) , b) c)
. Further . So
( )( )
Thus the probability that neither of the events occur is P( A'B' ) P(( A B)' )
1 P( A B)
independent? Explain.
Solution: First let us find P( A ) and P( B) . Now P( B) 1 P( B' ) 1 1 2 1 2 and
P( A ) P( A B) P( A B) P( B) 5 6 1 3 1 2 2 3
Now P( A ) . P( B) 2 3.1 2 1 3 P( A B)
Theorem 3: If A and B are independent events, then the events A and B‘ are also
independent.
Proof: The events A and B are independent, so, P(A ∩ B) = P(A) P(B).
From the Venn diagram, we see that the events A ∩ B and A ∩ B‘ are mutually
exclusive and together they form the event A.
Example: Let A and B are two independent events such that P(A) = 0.2 and P(B) =
0.8. Find P(A and B), P(A or B), P(B not A), and P(neither A nor B).
Solution: Given P(A) = 0.2 and P(B) = 0.8 and events A and B are independent of
each other. P(A and B) = P( A ∩ B) = P(A) P(B) = 0.2 × 0.8 = 0.16.
Solution: The sample space, S = {1, 2, 3, 4, 5, 6}. A = {2, 4, 6}, B = {1, 3, 5}, C=
{2, 4, 6}.
2. The probability of a person speaking truth is 5⁄7 and of another person is 4⁄9.
What is the probability they will contradict each other?
Solution: Let the events A: person 1 speaks the truth, B: person 2 speaks the truth.
P(A) = 5⁄7 and P(B) = 4⁄9. P(A‘) = 1 – (5⁄7) = 2⁄7 and P(B‘) = 1 – (4⁄9) = 5⁄9.
The events A and B are independent of each other. The two persons will contradict
each other if either of the two speaks a lie when the other speaks the truth. There are
two possible cases.
Case 1: Person 1 speaks truth and person 2 tells a lie. The event is A ∩ B‘.
Case 2: Person 1 tells a lie and person 2 speaks the truth. The event is A‘ ∩ B.
Suppose that an experiment can have only two possible outcomes. For instance,
when a bit is generated at a random, the possible outcomes are 0 and 1. When a
coin is tossed, the possible outcomes are heads and tails. Each performance of an
experiment with two possible outcomes is called a Bernoulli trial, after James
Bernoulli, who made important contributions to probability theory. In general, a
possible outcome of a Bernoulli trial is called a success or a failure. If p is the
probability of a success and q is the probability of a failure, it follows that p q 1
A binomial experiment consists of a fixed number of Bernoulli trials. The notation
B(n, p) will be used to denote a binomial experiment with n trials and probability
p of successes.
Frequently, we are interested in the number of successes in a binomial experiment
with and not in the order in which they occur. The following theorem is applies
Proof: The sample space of the n repeated trials consists of all n-tuples
(t1 , t 2 ,..., t n ) , where t i S (for success) or t i F (for failure) for i 1, 2, ... , n . Since
the n trials are independent, the probability of each outcome of n trials consisting
of k success and n k failures. Now let A be the event of exactly k successes.
Then A consists of all n-tuples of which k components are S and n k
components are F . The number of such n-tuples in the event is equal to the
numbers of ways that k letters S can be distributed among the n components of an
C (6,5)(1 2) 6 (1 2) 0
15 64 6 64 1 64
11 64
Example: Suppose A and B are events with P(A) = 0.6, P(B) = 0.3, and
P(A ∩ B) = 0.2. Find the probability that:
(a) A does not occur; (c) A or B occurs;
(b) B does not occur; (d) Neither A nor B occurs.
Solution:
(a)
(b)
(c) By the Addition Principle, P(A or B) = P(A B) = P(A) + P(B) − P(A ∩ B)
= 0.6 + 0.3 − 0.2 = 0.7
n
And note that C (n, k ) p k q nk ( p q) n 1 , that is, the sum of the
k 0
Activity: 2.7
1. Suppose 20% of the items produced by a factory are defective. Suppose four
items are chosen at random. Find the probability that:
a) two are defective; b) three are defective; c) non is defective.
2. Team A has probability 2 3 of winning whenever it plays. Suppose A plays four
games. Find the probability p that A wins more than half of its games.
2.7 Random variables and expectation
Many problems are concerned with a numerical value associated with the
outcome of an experiment. For instance, we may want to know the probability that
there are nine 1 bits generated when 10 bits are randomly generated, or we may
want to know the probability that a coin comes up tails when it is tossed 20 times.
To study problems of this type we introduce the concept of a random variable.
Discrete mathematics and combinatorics Page 16
2.7.1 Random variables
Definition: 2.7.1.1
A random variable X is a function from the sample space of an experiment to the
set of real numbers. That is, a random variable is a rule that assigns a numerical
value to each outcome in a sample space S.
Remark: Note that a random variable is a function. It is not a variable.
If X1 and X2 are two random variables, then X1 + X2 and X1 X2 are also random.
Example: Suppose that a coin is tossed three times. Let X (t ) be the number of
heads that appear when t the outcome is. Then the random variable X (t ) takes on
the following values:
X ( HHH ) 3 X (HHT ) X (HTH ) X (THH ) 2
The number of calls a person gets in a day, the number of items sold by a company,
the number of items manufactured, number of accidents, number of gifts received on
birthday etc. are some of the discrete random variables.
A variable which assumes infinite values of the sample space is a continuous random
variable. It can take all possible values between certain limits. It can also take
integral as well as fractional values. The height, weight, age of a person, the distance
between two cities etc. are some of the continuous random variables.
Activity: 2.8
1. Let X be the sum of the numbers that appears when a pair of dices is rolled.
What are the values of this random variable for the 36 possible outcomes
(i, j ) , where i and j are the numbers that appear on the first die and the
Note that when the sample space S has n elements S {x1 , x2 , ... , xn } ,
E ( X ) i 1 P( xi ). X ( xi )
n
Remark: We are concerned only with random variable with finite expected
values here.
Example: A fair coin is tossed three times. Let S be the sample space of the
eight possible outcomes, let X be the random variable that assigns to an
outcome the number of heads in this outcome. What is the expected value of X ?
Solution: In example 2.7.1.2 above we listed the values of X for the eight
possible out comes when a coin is tossed three times. Since the coin is fair and
the events are independent, the probability of each outcome is 1 8 .
Consequently,
E (X ) 1 8[ X ( HHH ) X (HHT ) X (HTH ) X (THH ) X (TTH )
1 8[3 2 2 2 1 1 1 0]
12 8 3 2
E ( X ) E (Y )
aE ( X ) b , since, P(t ) 1 .
tS
The case with n random variables follows easily using mathematical induction
from the case of two random variables which is proved in part (a) above, or we
can prove as follow. E( X 1 X 2 .... X n ) P(t ).[ X 1 X 2 ... X n ](t )
tS
The above theorem can be useful for computing expected values, since many
random variables are sums of simpler random variables.
Example: Using the above theorem, find the expected values of the sum of the
numbers that appear when a pair of dice is rolled.
Solution: Let X 1 and X 2 be the random variables with X 1 (i, j) i and X 2 (i, j ) j so
that X 1 is the number appearing on the first die and X 2 is the number appearing on
the second die. Now we see that
P(1).X 1 (t ) P(2).X 1 (2) P(3).X 1 (3) P(4). X 1 (4) P(5). X 1 (5) P(6). X 1 (6)
21 6 7 2
Now the sum of two numbers that appear when the two dice are rolled is the sum
X 1 X 2 . Thus by the above theorem, the expected value of the sum is
E( X 1 X 2 ) E( X 1 ) E( X 2 ) 7 2 7 2 7
Activity: 2.10
Using the above theorem show that the expected value of the number of successes
when n Bernoulli trials are proved, where P is the probability of successes on
each trial, is equal to nP .
We have already discussed independent events. We will now define what it
means for two random variables to be independent.
2.7.3. Independent Random Variables
Definition: 2.7.3.7 The random variable X and Y on a sample space S are
independent if P[ X (t ) r1 and Y (t ) r2 ] = P[ X (t ) r1 ]. P[Y (t ) r2 ] or in words, if the
probability that X (t ) r1 and Y (t ) r2 equals the product of the probabilities that
X (t ) r1 and Y (t ) r2 , for all real numbers r1 and r2 .
Example: Are the random variables X 1 and X 2 from the above Example 2.7.3.5
independent?
Solution: Let S {1, 2, 3, 4, 5, 6} , and let i S and j S . Since there are 36 possible
outcomes when the pair of dice is rolled and each is equally likely, we have
P[ X 1 (t ) i and X 2 (t ) j ] 1 36 . Furthermore, P[ X 1 (t ) i] 1 6 and P[ X 2 (t ) 1 6] ,
independent.
Example: Show that the random variables X 1 and X X 1 X 2 , where X 1 and X 2 are
defined in Example2.7.3.5 are not independent.
Solution: Note that P[ X 1 (t ) 1 and X (t ) 12] 0 , since X 1 (t ) 1 means the number of
appearing on the first die is 1, which implies that the sum of the numbers on the
two dice equal 12. On the other hand, P[ X 1 (t ) 1] 1 6 and P[ X (t ) 12] 1 36 . Hence
P[ X 1 (t ) 1 and X (t ) 12] P[ X 1 (t ) 1].P[ X (t ) 12] . This counter example shows that
r1X ( S ), r2 Y ( S )
r1r2 .P[ X (t ) r1 and Y (t ) r2 ]
r1X ( S ), r2 Y ( S )
r1r2 .P[ X (t ) r1 ].P[Y (t ) r2 ]
( r .P[ X (t ) r ]) . ( r .P[Y (t ) r ] )
1
r1X ( S )
1
r2 Y ( S )
2 2
E ( X ).E (Y ) .
4. An unbiased coin is tossed twice. If A is the event: both head or tail have
occurred and B is the event: at most one tail is observed, find P( A) , P(B) ,
P( A \ B) and P( B \ A) .
11.There are 1000 students in a high school. Among the 1000 students, 800
students have a laptop, and 300 students have a tablet. 150 students have both
Practice Problems:
1. A die is cast 6 times. What is the probability that each throw will return a prime
number? A) 1/ 32 B) 1/1296 C) 1/64 D) 1/1666
2. A coin is flipped six times. What is the probability of getting a head each time?
6. One multiple choice question carries 10 marks in some exam. There are a total of
3 such questions. What is the probability that a candidate who is choosing the
options at random will get all the answers right?
Mutually exclusive events are those where the occurrence of one indicates the non-
occurrence of the other or when two events cannot occur at the same time, they are
considered mutually exclusive.
= 7/13.
Independent Event
When multiple events occur, if the outcome of one event DOES NOT affect the
outcome of the other events, they are called independent events.
Say, a die is rolled twice. The outcome of the first roll doesn‘t affect the second
outcome. These two are independent events.
Example 1: Say, a coin is tossed twice. What is the probability of getting two
consecutive tails ?
Here‘s the verification of the above answer with the help of sample space.
When a coin is tossed twice, the sample space is {(H,H), (H,T), (T,H), (T,T)}.
Our desired event is (T,T) whose occurrence is only once out of four possible
outcomes and hence, our answer is 1/4.
Example 2: Consider another example where a pack contains 4 blue, 2 red and 3
black pens. If a pen is drawn at random from the pack, replaced and the process
repeated 2 more times, What is the probability of drawing 2 blue pens and 1 black
pen?
Solution
Here, total number of pens = 9
Discrete mathematics and combinatorics Page 26
Probability of drawing 1 blue pen = 4/9
Probability of drawing another blue pen = 4/9
Probability of drawing 1 black pen = 3/9
Probability of drawing 2 blue pens and 1 black pen = 4/9 * 4/9 * 3/9 = 48/729 =
16/243
Dependent Events
When two events occur, if the outcome of one event affects the outcome of the
other, they are called dependent events.
Consider the aforementioned example of drawing a pen from a pack, with a slight
difference.
Example 1: A pack contains 4 blue, 2 red and 3 black pens. If 2 pens are drawn at
random from the pack, NOT replaced and then another pen is drawn. What is the
probability of drawing 2 blue pens and 1 black pen?
Solution:
Probability of drawing 1 blue pen = 4/9
Probability of drawing another blue pen = 3/8
Probability of drawing 1 black pen = 3/7
Probability of drawing 2 blue pens and 1 black pen = 4/9 * 3/8 * 3/7 = 1/14
Now, the probability of drawing a king and queen consecutively is 1/13 * 4/51 =
4/663
Conditional probability
Example: In a class, 40% of the students study math and science. 60% of the
students study math. What is the probability of a student studying science given
he/she is already studying math?
Solution
P(M and S) = 0.40
P(M) = 0.60
Complement of an event
A complement of an event A can be stated as that which does NOT contain the
occurrence of A.
if A is the event of getting an even number in a die roll, Ac is the event of NOT
getting an even number i.e., getting an odd number.
Example: A single coin is tossed 5 times. What is the probability of getting at least
one head?
Solution:
Consider solving this using complement.
Probability Example 1
What is the probability of the occurrence of a number that is odd or less than 5
when a fair die is rolled.
Solution
Let the event of the occurrence of a number that is odd be ‗A‘ and the event of the
occurrence of a number that is less than 5 be ‗B‘. We need to find P(A or B).
Discrete mathematics and combinatorics Page 29
P(A) = 3/6 (odd numbers = 1,3 and 5)
P(A and B) = 2/6 (numbers that are both odd and less than 5 = 1 and 3)
P(A or B) = 5/6.
Probability Example 2
A box contains 4 chocobars and 4 ice creams. Tom eats 3 of them one after
another. What is the probability of sequentially choosing 2 chocobars and 1
icecream?
Solution
Probability of choosing 1 chocobar = 4/8 = 1/2
So the final probability of choosing 2 chocobars and 1 icecream = 1/2 * 3/7 * 2/3
= 1/7
Probability Example 3
When two dice are rolled, find the probability of getting a greater number on the
first die than the one on the second, given that the sum should equal 8.
There are 5 ways to get a sum of 8 when two dice are rolled = {(2,6),(3,5),(4,4),
(5,3),(6,2)}.
And there are two ways where the number on the first die is greater than the one
on the second given that the sum should equal 8, G = {(5,3), (6,2)}.
= (2/36)/(5/36)
= 2/5
Example: A bag contains blue and red balls. Two balls are drawn randomly
without replacement. The probability of selecting a blue and then a red ball is 0.2.
The probability of selecting a blue ball in the first draw is 0.5. What is the
probability of drawing a red ball, given that the first ball drawn was blue?
a) 0.4 b) 0.2 c) 0.1 d) 0.5
Example: A die is rolled thrice. What is the probability that the sum of the rolls is
at least 5?
a) 1/216 b) 1/6 c) 3/216 d) 212/216
Example: In class X, 20% of the students are boys and 80% of them are girls. The
probability that boys passed in mathematics is 0.5 and the probability that girls
passed in mathematics is 0.10. One student is selected at random. What is the
probability that the selected student is passed in mathematics?
The event ‗E' and the event ‗not E' are called complementary event of the latter
event. If E occurs, its compliment is E which does not occur.
For example:
1. When a coin is tossed, getting ‗head‘ and getting ‗tail‘ are complimentary event
of each other.
2. When two coins are tossed, getting ‗at least one head‘ and getting ‗no head‘ are
complimentary event of each other.
● Getting ‗even face‘ and ‗odd face‘ are complimentary event of each other.
Example: A bag contains red and what balls. The probability of getting a red ball
from the bag of balls is 1/6. What is the probability of not getting a red ball?
Solution:
The probability of getting a red ball from the bag of balls is 1/6.
Solution:
E2 is the probability of getting a blue marble which is also the same as the
probability of not getting a green marble, Since we know that the marble are either
green or blue.
= P(E2) = 1 - P(E1)
= 1 – 3/7
= 4/7.
Example: In a laptop shop there are 16 defective laptops out of 200 laptops. If
one laptop is taken out at random from this laptop shop, what is the probability
that it is a non defective laptop?
= 16/200
= 0.08
Example: The probability that it will rain in the evening 0.84. What is the
probability that it will not rain in the evening?
P(not E) = 1 - P(E)
P(not E) = 1 - 0.84
P(not E) = 0.16
Therefore, the probability that it will not rain in the evening = P(not E) = 0.16
Example: When 3 unbiased coins are tossed once. What is the probability of:
(i) getting all heads (ii) getting two heads (iii) getting one head
(iv) getting at least 1 head (v) getting at least 2 heads (vi) getting atmost 2 heads
P(A∩B) = P(A)P(B)
Let V of N elements have a property p; derived from that, N-V elements do not
have the property p.
Probability of k of n randomly selected elements having the property p equals::
Example: There are 18 tickets marked with numbers 1 to 18. What‗s the
probability of selecting a ticket having the following property:
a) even number
b) number divisible by 3
c) prime number
d) number divisible by 6
Solution:
Binomial probability expression.
n = 5, k = 3, P = 0,51
Then find .
6. Consider the example of finding the probability of selecting a black card or
a 6 from a deck of 52 cards. What is the probability of selecting a black card
and a number 6? A) B) C) D) E)
7. If four persons are chosen randomly from a group of 10 persons of which six
are male, to form a committee then find
a) the probability that the committee consists of all female
b) the probability that the committee consists of all male
c) the probability that the committee consists of equal number of each sex
d) the probability that the committee consists of at least three male
8. If two dice are thrown then,
2. You are given that A and B are two events such that ,