Unit-3 Probability and Random Variables
Unit-3 Probability and Random Variables
E1 E2
If you choose a number between 1 and 100, what is
the probability that it is divisible by 2 or 5 or both?
Let n be the number chosen
– p(2 div n) = 50/100 (all the even numbers)
– p(2 div n) or p(5 div n) = p(2 div n) + p(5 div n) - p(10 div
n)
= 3/5
Problems
1. a bag contains 7 white, 6 red and 5 black balls. Two balls are drawn
at random. Find the probability that they will both be white.
2. in a game of die a shooter can win outright if the sum of two
numbers showing up is either 7 or 11 when two dice are through
what is his probability of winning outright.
3. Machines A and B make components, which are them placed on a
conveyor butt, of those made by machine A, 93% are acceptable, of
those made by machine B, 95% are acceptable. Machine A makes
60% of the components and machine B makes the rest. Find the
probability that a component selected at random from the conveyor
butt is a) made by machine A b) made by Machine A and acceptable
c) made by machine B and acceptable d) made by machine B and
unacceptable.
Joint and Conditional Probability
Joint Probability:
Some events are not mutually exclusive because of common elements in
the sample space. These elements correspond to the simultaneous or
joint occurrence of the nonexclusive events. For two events A and B the
common elements from the event A∩B.
The probability P(A∩B) is called the joint probability for two events A
and B which intersect in the sample space.
P(A∩B)=P(A)+P(B)-P(AUB)
Equivalently P(AUB)=P(A)+P(B)-P(A∩B)
i.e. the probability of the union of two events never exceeds the sum of
the event probabilities. For mutually exclusive events A∩B=Φ
Conditional Probability
Let A and B be events with P(B) > 0. The conditional probability of A
given B, denoted by P(A|B) is defined to be:
P(A|B) = P(AB) / P(B).
The probability P(A/B) simply reflects the fact that the probability of an
event A may depend on a second event B.
If A and B are mutually exclusive P(AB)=0 and P(A/B)=0.
F
E
Example: Conditional Probability
A bit string of length 4 is generated at random so that each of the 16 bit possible
strings is equally likely. What is the probability that it contains at least two
consecutive 0s, given that its first bit is a 0?
So, to calculate:
P (E|F) = P(EF) / P(F).
where
F is the event that “first bit is 0”, and
E the event that “string contains at least two consecutive 0s”.
So, to calculate:
P(E|F) = P(EF) / P(F).
where F is the event that first bit is 0 and E the event that string contains at least two
consecutive 0’s.
P(F) = ? 1/2
P(EF)? 0000 0001 0010 0011 0100 (note: 1st bit fixed to 0)
X 1011
1000 1001 1010 X 1100 So, P(E) = 8/16 = 1/2
A bit string of length 4 is generated at random so that each of the 16 bit strings is
equally likely. What is the probability that the first bit is a 0, given that it contains at
least two consecutive 0s?
So, to calculate:
P(F|E) = P(EF) / P(E)
where F is the event that first bit is 0 and E the event that string contains
at least two consecutive 0’s.
We had:
P(EF) = 5/16 So, P(F|E) = (5/16) / (1/2) = 5/8
P(F) = 1/2 So, all fits together.
P(E) = 1/2
Sample space F E (EF)
0000 0000 0000 0000 0000 0000
0001 0001 0001 0001 0001 0001
0010 0010 0010 0010 0010 0010
0011 0011 0011 0011 0011 0011
0100 0100 0100 0100 0100 0100
0101 0101 0101
0110 P(EF) = 5/16 0110
0110
0111 0111 0111
1000 1000 1000
P(F) = 1/2 P(E|F) = 5/8
1001 1001 1001
1010
1011
1100 1100 1100
1101
1110 P(E) = 1/2 P(F|E) = 5/8
1111
Note:
1. The events E and F are independent if and only if
P(EF) = P(E) x P(F).
2. Multiplication rule: P(EF) = P(E) x P(F|E) (defn. cond. prob.)
where P(E)>0.
So, independent iff P(F|E) = P(F).
(Also, P(F|E) = P(E F) / P(E) = (P(E)xP(F)) / P(E) = P(F) )
Bayes Theorem
Combined Experiments and Bernoulli Trials
4. Given P(A)=1/2, P(B)=1/3 and P(A∩B)=1/4 find i) P(A/B), ii)
P(AUB), iii) P(AI/BI).
6. A bag contains 2 white and 2 black balls and a second bag contains
2 white and 4 black balls. i) If one ball is drawn from each bag what is
the probability that they will be of the same color? ii) If bag is selected
at random and one ball is drawn from it, what is the probability that it
will be white?
7. Suppose that we have a fuse box contains 20 fuses of which 5 are
defective. If two fuses are selected at random and removed from the box
in succession without replacing the first. What is the probability that
both fuses are defective?
8. Two cards are drawn in succession from a deck without replacement,
what is the probability that both cards are >2 and <8.
9. The life spans of 5000 electrical components are measured to assess
their reliability, the lifespan L is recorded and the results are shown in
table 28.2. Find the probability that a randomly selected component will
last a) more than 3 years b) between 3 and 5 years c) less than 4 years
Table: the lifespans of 5000 electrical (components lifespan of
component Years Number
L>5 500
4 < L≤5 2250
3<L≤4 1850
L≤3 400
10. Machine A and B make components, machine A makes 60% of the
components. The probability that a component is acceptable is 0.93,
when made by machine A and 0.95 made by machine B. A components
is picked at random. Calculate the probability that it is a) made by
machine A and is acceptable b) made by machine B and acceptable c)
acceptable.
11. The probability that a component is faulty is 0.04. Two components
are picked at random. Calculate the probability that both components are
faulty, both components are not faulty, one of the component is faulty,
one of the components is not faulty, at least one if the component is not
faulty, at least one of the component is faulty.
12. In a certain assembly plant, three machines, A, B and C make 30%,45%
and 25%, respectively, of the products. It is known from past experience that
2%,3% and 2% of the products made by each machine, respectively are
defective. Now, suppose that a finished product is randomly selected. What is
the probability that it is defective? if a product were chosen randomly and
found to be defective, what is the probability that it was made by machine C?
13. There are two identical urns containing four white and three red balls and
three white and seven red balls respectively. 2 balls are drawn at random from
the first urn and put in the second urn. Then a ball is drawn at random from the
second urn. What is the probability that it is a white ball?
14. Three persons the chances that a politician, a businessman, or an
academician would be appointed the Vice Chancellor of a university are 0.5,
0.3, 0.2 respectively. Probabilities that research is promoted by these persons if
they are appointed as VC are 0.3, 0.7, 0.8 respectively.
15. The probability of X,Y and Z becoming managers are 4/9 , 2/9, 1/3
respectively. The probabilities that the bonus scheme will be introduced if X, Y
and Z become managers are 3/10, 1/2 and 4/5 respectively.
ii) If the bonus scheme has been introduced, what is the probability that the
manager appointed was X?
16. An elementary binary communication system consists of a transmitter that
send one of two possible symobls ( a 1 or a 0) over a channel to a receiver. The
channel occasionally causes errors to occur that a 1 shows up at the receiver as
a 0, and vice versa. Find the probabilites of correct system transmission and
system error probabilites
Random Variables
• A (scalar) random variable X is a function
that maps the outcome of a random event
into real scalar values
W X(w)
Mean
Variance V=
2. Continuous p.d:
Mean
Variance V=