






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







For an event E, the probability of the E occurring, denoted P(E), is a number such that
where
P(E) = 0 =) E is impossible,
P(E) = 1 =) E is certain.
Example 8.1 (Rolling a die). The set of all possible outcomes is the sample space, denoted
S, i.e.
S = { 1 , 2 , 3 , 4 , 5 , 6 }
Let A be the event of getting an even number in one roll. Then we have
and therefore
P(A) =
Example 8.2. We randomly select 2 lightbulbs from a set of 5 bulbs (numbered 1 to 5).
The sample space consists of 10 possible outcomes:
Note that |S| = 10 is the number of elements in S, also known as the cardinality of the set
S. We may be interested in the following events:
A: No faulty bulbs
B: One faulty bulb
C: Two faulty bulbs
Now assume that bulbs 1, 2 and 3 are all faulty. We see that event A occurs only if we
draw bulbs 4 and 5 (i.e. outcome { 4 , 5 }).
Event B occurs if we draw { 1 , 4 } , { 1 , 5 } , { 2 , 4 } , { 2 , 5 } , { 3 , 4 } or { 3 , 5 }. Hence
Meanwhile, Event C occurs if we draw { 1 , 2 } , { 1 , 3 } , { 2 , 3 }, and therefore
Definition 8.1. The set of all elements (outcomes) not in E in the sample space S is
called the compliment of E, usually denoted E c or E¯.
Example 8.3. E = randomly rolled die gives an even number, i.e.
then Ec^ = randomly rolled die gives an odd number, i.e.
c = { 1 , 3 , 5 }
Let A and B be two events in an experiment.
Definition 8.2. The event consisting of all the elements of the sample space that belong
to either A or B is called the union of A and B and is denoted as A [ B.
Figure 8.1: A Venn diagram. The union A \ B is shaded in green.
Definition 8.3. The event consisting of all the elements of the sample space that belong
to both A and B is called the intersection of A and B and is denoted as A \ B.
Example 8.4. Suppose that we are rolling a die, then consider the following events:
A: The die gives a number not smaller than 4.
B: The die gives a number that is a multiple of 3
A: The event that an even number is given.
B: The event that a number greater than 4 turns up.
Example 8.6. Five coins are tossed simultaneously. What is the probability of obtaining
at least one head?
Note: There are in total 2^5 = 32 possible outcomes, only one of which has no heads.
Therefore
P(At Least One Head) = 1 P(No Heads)
Example 8.7. The probability that a person watches TV is P(T ) = 0.6; the probability
that the same person listens to the radio P(R) = 0.3. The probability that they do both is
0.15. What is the probability that they do neither?
Using the addition law,
) P(They do neither) = 1 P(T [ R) = 0. 25.
Conditional probability
Often it is required to find the probability of an event B given that an event A has already
occurred. This is known as the conditional probability of B given A, and is denoted P(B|A).
The intuition behind this is that A gives a “reduced sample space”, and therefore
Example 8.8 (Conditional Probability). The probability P(A) that it rains in Manchester
on July 15 th is 0.6, while the probability P(A \ B) that it rains there on both the 15 th
and 16th^ is 0.35. Given that it rains on the 15th, what is the probability that it rains on
the next day?
Note: B is the event that it rains in Manchester on July 16th. We need to find P(B|A),
and using the formula for conditional probability :
= 0. 583. (3 d.p)
Example 8.9. A fridge contains 10 cans of lager, three of which are “4X” (to be avoided).
Robb selects 2 cans at random. Find the probability that none of the selected cans are
“4X”.
Let A = First can selected is not 4X,
B = Second can selected is not 4X.
We will look at two di↵erent cases...
1 The case with replacement, i.e. Robb puts the first can back in the fridge before
choosing the second. Then
and
P(A \ B) =
2 Sampling without replacement, i.e. the first can is NOT put back in the fridge.
Then...
P(A) =
, and P(B|A) =
Sometimes engineers must work with a variable X whose (real) value is subject to variations
due to chance (randomness). We call X a random variable.
So X can take on a set of possible di↵erent values, each with a corresponding probability.
We can say that for each possible value a, for
X = a the probability of this value is P(X = a).
We can then say that the probability that X assumes any value within the range:
Actually,
P(X c) + P(X > c) = P(All possible values of X) = 1,
or equivalently,
P(X > c) = 1 P(X c).
Figure 8.4: The p.d.f. for rolling two dice. Unsurprisingly, there is zero chance of gaining
a sum of thirteen!
i f (x) = 1 8 (1 + x)
ii f (x) = 1 10 (1 +^ x).
Only one of these is a valid p.d.f. Which one, and why?
Answer: (ii) is valid, but (i) is not.
Why: Need
j f^ (xj^ ) = 1. Only (ii) satisfies it.
Definition The mean, expectation or expected value μ of a discrete p.d.f:
[(E(X) =] μ =
j
xj f (xj ) = x 1 f (x 1 ) + x 2 f (x 2 ) + · · ·.
Example 8.14 (Expected value for rolling a fair die). Recall that
f (xj ) =
when j = 1, 2 ,... , 6
) μ = 1 ⇥
Granted, we can’t gain a score of 3.5 if we roll the die only once. But that is not what
μ means. Actually, μ represents the average “score” you would get if you rolled the die
many times.
Example 8.15. A stranger shows you a game where you draw a ball out of a bag. There
are 6 white balls and 4 blue balls in the bag.
Afterwards, the ball is replaced. What are your expected winnings? And is it worth playing
that game?
Let X = winnings obtained after drawing the ball out.
When X = 40 (x 1 ) P(x 1 ) =
X = 80 (x 2 ) P(x 2 ) =
Therefore for the expected value
) μ = x 1 P(x 1 ) + x 2 P(x 2 ) = 40 ⇥
= 8p.
) After playing n games you can expect to lose 8n pence!
Better o↵ to NOT play this game.
Definition The variance of a distribution, denoted 2 (or Var(X)) is defined by
2 = Var(X) =
j
(xj μ) 2 f (xj )
= (x 1 μ) 2 f (x 1 ) + (x 2 μ) 2 f (x 2 ) + · · ·.
Shortcut: 2 = E(X 2 ) μ 2 , where E(X 2 ) is the mean for X 2 .
2
j
f (xj )x 2 j.
Can interpret 2 as a measure of the spread of the data. Specifically, it is the expected
square deviation of X from the mean μ.
Example 8.16 (Coin toss). Let 1 and 0 denote heads and tails respectively. It is easy to
show that
μ = 0 ⇥
but what is the variance?
Take the shortcut...
2 ⇥
2 ⇥
Start by conducting an experiment (trial) with only two outcomes. They can be labelled
“success” or “failure”, and their repective probabilities are p and q = 1 p.
E.g. Scoring a 6 from a die roll: p = 1 6 ,^ q^ =^
5
Then if the trial is repeated a fixed number of times (n), define a new discrete random
variable:
X = Number of successes in n trials.
We assume four conditions:
Example 8.19. A factory produces plenty of board pens. However, 10% of the pens are
defective. If I open a random box containing twenty board pens, what is the probability
that:
i Exactly 3 pens are defective?
ii More than 3 pens are defective?
(Answer to 3 decimal places)
First, if X = number of faulty pens in a box of 20,
i We want
P(X = 3) =
3 (0.9)
17 ⇡ 0. 190.
ii This is P(X 3), i.e.
20
19
2 (0.9) 18
Mean and variance of B(n, p)
Since
f (x) =
n
x
p
x q
1 x ,
it turns out that
Mean: μ =
X^ n
x=
xf (x) =
X^ n
x=
n
x
p x q n x x = np
Variance:
2 = npq = np(1 p).
So for the board pen example, μ = 2, 2 = 1.8.
Consider the following scenarios:
i Number of phone calls arriving at a call centre per hour.
ii Number of cars crossing a bridge per hour.
iii Number of faults in a length of cable.
These problems require a distribution that involves an average rate μ. Actually, there is
one - it is the Poisson distribution, and its p.d.f. is:
P(X = x) =
e μμx
x!
where X = 0, 1 , 2 ,... , to 1.
Example 8.20. On average, 240 cars per hour pass a check point, and a queue forms if
more than three cars pass through in a given minute.
What is the probability of a queue forming in a randomly selected minute?
Average number of cars per minute =
= 4 = μ.
Let
X = Number of cars passing at a randomly selected minute.
Then X ⇠ Po(4), and we require
One important use of the Poisson distribution is to APPROXIMATE the Binomial distri-
bution, because Poisson is easier to compute.
Recall that for binomial,
f (x) =
n
x
p x q n x .
Then if you let p ! 0 and n ! 1 with μ = np fixed and finite,
f (x) ! Po(μ).
Moreover, the Poisson distribution has mean μ and variance μ.
Example 8.21. A factory produces screws. The probability that a randomly selected
screw is defective is given by p = 0.01.
In a random sample of 100 screws, what is the probability that there will be more
than two defective screws?
Let A = More than two defective screws
C = At most 1 defective.
C ) =
0 (0.99)
100
1 (0.99)
99
2 (0.99)
98 .