Unit 4 - Basic Probability
Unit 4 - Basic Probability
Unit 4 - Basic Probability
BCA SEM 2
UNIT IV
Probability Spaces:
If there are n exhaustive, mutually exclusive and equally likely events, probability of
the happening of A is defined as the ration m/n, m is favourable to A.
m
P( A) =
n
Number cases favourable to A
=
Exhaustive number of cases in S
Let a random experiment be repeated n times and let an event A occur nA out of n
nA nA
n called the relative frequency of the event A. As n increases, n
trials. The ratio
shows a tendency to stabilize and to approach a constant value. This value, denoted by
P(A) is called the probability of the event A.
lim nA
P( A) =
n→ n
When the occurrence of one event procludes the occurrence of all other events, then
such a set of events is said to be mutually exclusive.
Page 1
(FOUNDATION IN STATISTICS)
Example On tossing a coin , either head or tail can occur but not both. i.e occurrence
of head excludes the occurrence of tail. The events of occurrence of head and tail are
mutually exclusive.
Two events are said to be equally likely events if each one of them has an equal
chance of occurrence.
In tossing an unbiased coin the occurrence of head or tail are equally likely.
If A and B are any two events, and are not disjoint, then
P( A B) = P( A) + P( B) − P( A B)
Proof:
From the Venn diagram, the events A and A B are disjoint.
Therefore A B = A ( A B)
P( A B) = P[ A ( A B)]
= P( A) + P( A B)
Adding and subtracting P( A B) ,
P( A B) = P( A) + P( A B) + P( A B) − P( A B)
= P( A) + P[( A B) ( A B)] − P( A B)
P( A B) = P( A) + P( B) − P( A B)
Conditional Probability
Proof:
The inner circle represents the event A.
A can occur along with B1 , B2 ,...., Bn that are exhaustive and mutually exclusive.
Therefore AB1 , AB2 ,...., ABn are also mutually exclusive.
Bayes theorem
Proof:
P( Bi A) = P( Bi ) P( A / Bi )
P( Bi A) = P ( A) P( Bi / A)
P( Bi ) P( A / Bi )
P( A / Bi ) =
P( A)
P ( Bi ) P ( A / Bi )
= n
P ( B ) P (A / B )
i =1
i i
Random Variable:
Page 3
(FOUNDATION IN STATISTICS)
A real – valued function defined on the outcome of a probability experiment is called
a random variable.
Example :Suppose that a coin is tossed twice so that the sample space is S = {HH, HT,
TH, TT}. Let X represent the number of heads that can come up. With each sample
point we can associate a number for X as shown in Table . Thus, for example, in the
case of HH (i.e., 2 heads), X = 2 while for TH (1 head), X = 1. It follows that X is a
random variable.
Table
Sample HH HT TH TT
Point
X 2 1 1 0
It should be noted that many other random variables could also be defined on this
sample space, for example, the square of the number of heads or the number of
heads minus the number of tails.
A random variable whose set of possible values is either finite or countably infinite is
called discrete random variable.
Example: Number of transmitted bits received in error.
Let X be a discrete random variable assuming values x1, x2,…, xn with corresponding
probabilities P1, P2,…, Pn. Then
E(X) = x i p(x i ) is called the expected value of X.
i
E(X) is also commonly called the mean or the expectation of X. A useful identity
states
that for a function g,
E[g(x)] = g(x
xi
i ) p(x i )
Page 4
proposition of defective parts among 1000 tested, number of transmitted in error.
(FOUNDATION IN STATISTICS)
Cumulative distribution function of a continuous random variable:
Suppose X is a continuous random variable with probability density function f(x). The
mean or expected value of X, denoted as or E(X) is
= E(X) =
−
x f(x) dx
A useful identity is that for any function g,
E[g(x)] = g(x) f(x) dx
−
Variance of X:
− −
= E[X ] – [E(X)]
2 2
MX(t) = E[etX] = x
e tx p(x) , if X is discrete
e
tx
f X (x) dx , if X is continuous.
−
Tchebyshev's Inequality:
Let X be a random variable with mean E(X) = and variance var(X) = 2 . Then the
Tchebyshev’s inequality states that
2
P( X − t)
t2
2
P ( X − t ) 1−
t2
P ( X − n )
1
n2
Problems: Page 5
(FOUNDATION IN STATISTICS)
1. Find the chance of throwing (a) four (b) an even number with an ordinary six faced
die.
1
P (throwing four) = 6
3 1
P (getting an even number) = = 2.
6
2. A bag contains 8 white balls and 6 red balls. Find the probability of drawing two balls
of the same colour.
Two balls out of 14 balls can be drawn in 14𝐶2 ways.
Two white balls out of 8 can be drawn in 8𝐶2 ways.
8C 28
P (drawing two white balls) = 14C2 = 91
2
6C 15
P (drawing two red balls) = 14C2 = 91
2
Probability of drawing 2 balls of same colour (either both white or both red)
28 15 43
= 91 + 91 = 91
3. Find the probability of drawing an ace or a spade or both from a deck of cards?
4
Probability of drawing an ace event (A) = 52.
13
Probability of drawing a spade event (B) = 52
1
Probability of drawing an ace of spade (A ∩ 𝐵) = .
52
The events drawing an ace or a spade are not mutually exclusive , therefore
P(AUB) = P(A) +P(B) - P (A ∩ 𝐵)
4 13 1
= + -
52 52 52
4
= 13.
4. What is the chance that a leap year selected at random will contain 53 Sundays?
A leap year contains 52 full weeks and extra two days (total of 366 days).
5. When A and B are 2 mutually exclusive events such that P(A) = ½ and
P(B) = 1/3 , find P( AUB) and P(A∩ 𝐵).
n(S) = 25 =32
n(A) = at least one head = 31
P(A) = 31/32
7. Given that P(A) =0.31, P(B) = 0.47 , A and B are mutually exclusive. Then find P(A∩
𝐵̅ ).
𝑃(𝐴̅ ∪ 𝐵̅ ) = P𝐴
̅̅̅̅̅̅̅
∩ 𝐵 = 1- P(A∩ 𝐵) = 0.86.
9. Given P(A) =1/3 , P(B) =1/4 , P(A∩ 𝐵) = 1/6 find the following probability
𝑃(𝐴̅), 𝑃(𝐴̅ ∩ 𝐵̅ ).
10. What is the probability of obtaining 2 heads in two throws of a single coin?
12. A box contains tags marked 1,2,…,n. two tags are chosen at random without
replacement. Find the probability that the numbers on the tags will be consecutive
integers.
Soln:
No. of ways of choosing any one pair from the (n-1)pairs = (n − 1)C1 = n − 1
Total no. of ways of choosing 2 tags from the n tags = nC 2
n −1
Therefore the required probability = =2/n
n(n − 1) / 2
13. Among the workers in a factory only 30% receive a bonus. Among those receiving the
bonus only 20% are skilled. What is the probability of a randomly selected worker
who is skilled and receiving bonus.
Soln:
P(A)=0.3
P(B/A)=0.2
P( A B) = P( A) P( B / A)
= 0.6
14. Prove that the events A and B are independent, then A and B are also independent.
Proof: P( A B) = P( A B)
= 1 − P( A B)
Using addition and multiplication theorems,
P( A B) = P( A) P( B)
15. A and B alternately throw a pair of dice. A wins if he throws 6 before B throws 7 and
B wins if he throws 7 before A throws 6. If A begins, show that his chance of winning
is 30/61.
Soln: A- Event of A throwing 6.
B – Event of B throwing 7.
5 1
P( A) = P( B) =
36 6
P( Awins) = P( Aor ABAor ABABAor...)
= P( A) + P( ABA) + P( ABABA) + ...
= 30/61
Page 8
(FOUNDATION IN STATISTICS)
16. In a coin tossing experiment, if the coin shows head, 1 dice is thrown and the result is
recorded. But if the coin shows tail, 2 dice are thrown and their sum is recorded. What
is the probability that the recorded number will be 2?
Soln:
When a single die is thrown, P(2)=1/6.
When 2 dice are thrown, the sum will be 2, only if each dies shows 1.
Therefore P(getting 2 as sum with 2 dice) =1/6 X 1/6=1/36
by theorem of total probability,
P(2) = P( H ) P(2 / H ) + P(T ) P(2 / T )
= 7/72.
17. If atleast 1 child in a family with 2 children is a boy, what is the probability that both
children are boys?
Soln:
P=probability that a child is a boy = ½
q=1/2
P(atleast one boy) = P(exactly 1 boy)+P(exactly 2 boys)
=¾
1
3
P(both are boys/atleast one is a boy)= 4 =
3 4
4
18. In a shooting test, the probability of hitting the target is ½ for A, 2/3 for B and ¾ for
C. If all of them fire at the target, find the probability that none of them hits the target.
Soln:
Let A,B, and C are the event of hitting the target.
P(A)=1/2 ; P(B)=2/3 ; P(C)= ¾
P( A B C ) = P( A) P( B) P(C )
=1/24
19. If A is the complementary event of A, prove that P( A) = 1 − P( A) 1
Proof: If A and are mutually exclusive events, such that A A = S
P( A A) = P(S )
P( A) + P( A) = 1
P( A) = 1 − P( A)
Since P( A) 0 , it follows that P( A) 1
20. Two fair dice are thrown independently. Three events A, B and C are defined as
follows.
(i) Odd face with the first die
(ii) Odd face with second die
(iii) Sum of the numbers in 2 dice is odd. Are the events A, B and C mutually
independent?
Soln:
P(A)= ½; P(B)= ½; P(C)=1/2
P( A B) = P( B C ) = P( A C ) = 1/ 4
P( A B C ) = 0
Since C cannot happen when A and B occur. Therefore Page 9
(FOUNDATION IN STATISTICS)
P( A B C ) P( A) P( B) P(C )
Therefore the events are pairwise independent, but not mutually
independent.
21. Two defective tubes get mixed up with 2 good ones. The tubes are tested, one by one,
until both defectives are found. What is the probability that the last defective tube is
obtained on (i) the second test (ii) the third test and (iii) the fourth test.
Soln:
Let D represent defective and N represent non-defective tube.
(i) P(Second D in the II test)=P(D in the I test and D in the II test)
= P ( D1 D2 )
= P( D1 ) P( D2 ) =1/6
26. An urn contains 10 white and 3 black balls. Another urn contains 3 white and 5 black
balls. Two balls are drawn at random from the first urn and placed in the second urn
and then 1 ball is taken at random from the latter. What is the probability that it is a
white ball? Page 11
(FOUNDATION IN STATISTICS)
Soln:
The two balls transferred may be both white or both black or 1 white and 1
black.
Let B1 be the event of drawing 2 white balls from the first urn and B2 be the
event of drawing 2 black balls from it and B3 be the event of drawing 1 white and
1black ball from it.
Let A be the event of drawing a white ball from the second urn after transfer.
P(B1)= 15/26, P(B2)=1/26, P(B3)=10/26,
P(A/B1)=P(drawing a white ball/2 white balls have been transferred)’’
= 5/10.
Similarly, P(A/B2)=3/10 and P(A/B3)=4/10
Therefore P( A) = P( B1 ) P( A / B1 ) + P( B2 ) P( A / B2 ) + P( B3 ) P( A / B3 )
= 59/130
27. A bag contains 5 balls and it is not known how many of them are white. Two balls are
drawn at random from the bag and they are noted to be white. What is the chance that
all the balls in the bag are white?
Soln:
since 2 white balls have been drawn out, the bag must have contained 2, 3, 4
or 5 white balls.
Let B1 be the event of the bag containing 2 white balls, B2 be the event of the
bag containing 3 white balls, B3 be the event of the bag containing 4 white balls and
B4 be the event of the bag containing 5 white balls.
Let A be the event of drawing 2 white balls.
P(A/B1)=1/10; P(A/B2)=3/10; P(A/B3)=3/5; P(A/B4)=1
P(B1)= P(B2)= P(B3)= P(B4)=1/4
By Bayes theorem,
P ( B4 ) P ( A / B4 )
P ( B4 / A) = 4
, i = 1, 2,3, 4
P( B ) P(A / B )
i =1
i i
=1/2.
28. In a bolt factory, machines A,B and C produce 25, 35 and 40% of the total output
respectively. Of their outputs 5, 4 and 2% respectively are defective bolts. If a bolt is
chosen at random from the combined output, what is the probability that it is
defective? If a bold chosen at random is found to be defective, what is the probability
that it was produced by B?
Soln:
P ( E1 ) = 0.25 ; P ( E2 ) = 0.35 ; P ( E3 ) = 0.40
Let X be the event of drawing defective bolt.
P( X / E1 ) = 0.05
P ( X / E2 ) = 0.04
P ( X / E3 ) = 0.02
By Baye’s theorem
P( E2 ) P( X / E2 )
P( E2 / X ) =
P( E1 ) P( X / E1 ) + P( E2 ) P( X / E2 ) + P( E3 ) P( X / E3 )
=0.406. Page 12
(FOUNDATION IN STATISTICS)
29. The contents of three urns 1, 2, and 3 are as follows:
Urns White Black Red
Balls
I 1 2 3
II 2 3 1
III 3 1 2
An urn is chosen at random and from it two balls are drawn at random. The two
balls are one red and one white. What is the probability that they come from the
second urn.
Soln:
1
P( B1 ) = P( B2 ) = P( B3 ) =
3
2
P( A / B1 ) =
15
2
P( A / B2 ) =
5
1
P( A / B3 ) =
5
By Baye’s theorem,
P( Bi ) P( A / Bi )
P( Bi / A) = n
, i = 1, 2,..., n
P( B ) P(A / B )
i =1
i i
P( B2 ) P( A / B2 )
P( B2 / A) = 3
, i = 1, 2,3
P( B ) P(A / B )
i =1
i i
= 2/11
30. A Given lot of IC chips contains 2% defective chips. Each is tested before delivery.
The tester itself is not totally reliable. Probability of tester says the chip is good when
it is really good is 0.95 and the probability of tester says chip is defective when it is
actually defective is 0.94. If a tested device is indicated to be defective, what is the
probability that it is actually defective.
Soln:
E be the event of chip is actually good and D be the event of tester says it is
good.
P( E ) = 0.02
P( E ) = 1 − P( E ) = 0.98
Given that the probability of tester says the chip is good when it is really good is 0.95
P( D / E ) = 0.95
P( D / E ) = 1 − P( D / E ) = 0.05
P( D / E ) = 0.94
The probability of actually defective
By Baye’s theorem,
P ( E / D)P ( E )
P( E / D) =
P ( E / D)P ( E ) + P( D / E )P( E )
=0.2773.
Page 13
(FOUNDATION IN STATISTICS)
31. A certain firm has plant A, B and C producing IC chips. Plant A produces twice the
output from B and B produces twice the output from C. The probability of a non-
defective product produced by A,B and C are respectively 0.85, 0.75 and 0.95. A
customer receives a defective product. Find the probability that it came from plant B.
Soln:
P(A)=1; P(B)=0.5; P(C)=0.25
P(E/A)=0.85 ; P(E/B)=0.75 ; P(E/C)=0.95
P( E / A) = 0.15
P( E / B) = 0.25
P( E / C ) = 0.05
The probability that the customer receives a defective product from plant B is
P ( B ) P ( E /B )
P( B / E ) = =0.4348
P( A) P( E / A) + P( B) P( E /B) + P(C ) P( E /C )
32. There are 3 true coins and 1 false coin with ‘head’ on both sides. A coin is chosen at
random and tossed 4 times. If ‘head’ occurs all the 4 times, what is the probability that
the false coin has been chosen and used?
Soln:
P(T)=P(the coin is a true coin)=3/4
P(F)=P(the coin is a false coin)=1/4
Let A be the event of getting all heads in 4 tosses.
1 1 1 1 1
P( A / T ) = =
2 2 2 2 16
P( A / F ) = 1
By Baye’ theorem,
P( F ) P( A / F )
P( F / A) =
P( F ) P( A / F ) + P(T ) P( A / T )
= 16/19
33. A coin with is tossed n times. Show that the probability that the number of heads
obtained is even is 0.5 1 + (q − p)n .
Soln:
P(even no.of heads are obtained)=P(0 head or 2 head or 4 head or …)
=P(0 head or 2 head or 4 heads or …)
= nC0 qn p0 + nC2 qn−2 p2 + nC4 qn−4 p4 + ... --------(1)
Page 14