11
11
MathsWorld Mathematical Methods Units 3 & 4
Discrete random variables
Mathematical Methods Units 1 & 2 includes an introductory study of basic concepts of probability and some methods of calculating probabilities.
Now these ideas will be extended to cover the notion of random variables; ways of presenting random variables; calculation of associated probabilities, central values and measures of spread, and applications of these.
In this chapter attention will be restricted to random variables that can take only particular discrete values.
Probability—a review
If A is any event, then Probability(A occurs) = Pr(A) has the property 0 ≤ Pr(A) ≤ 1. .For equally likely outcomes:
.0 ≤ Pr(success) ≤ 1
.If
ε
represents the set of all possible outcomes, then Pr(ε
) = 1..A′ means everything which is not in A and is called the complement of A so Pr(A) + Pr(A′) = 1
.Expected number of successes = (Probability of success) × (total number of trials) .The addition law of probability: Pr(A∪B) = Pr(A) + Pr(B) − Pr(A∩B).
.If A and B are mutually exclusive events, they cannot occur simultaneously so Pr(A ∩ B) = 0.
Then Pr(A ∪ B) = Pr(A) + Pr(B).
.A tree diagram is useful where there are not many events, and not many possible outcomes for each event.
The pathways formed by the branches of the tree diagram represent the outcomes of the compound event.
.A table is useful for a somewhat larger sample space such as when two dice are rolled. .Conditional probability refers to the probability of an event occurring if some condition
has been applied. We write Pr(A|B) to mean Pr(A occurs given that B has occurred). Questions involving conditional probability can be solved by restricting the sample space or by using the conditional probability formula:
Probability(event occurs) Pr(success) number of successful outcomes total number of possible outcomes
---= =
Pr(A B) = Pr---(PrA( )∩B B)
11.1
Discrete random variables
chapter
11
Random variables
A random variable (denoted by X, Y, …) is a variable whose value is determined by the outcome of a random experiment. For example, if an experiment consisted of tossing two standard dice, the random variable X could be defined as the number of 6s obtained. In this case, X could have the value 0, 1 or 2. Then X= 2 would denote the event of rolling two 6s; X ≥ 1 the event of rolling at least one 6, and so on. As these are events, we can consider their probabilities, such as Pr(X = 2), i.e. the probability of rolling two 6s.
We shall investigate these ideas more fully with reference to the random experiment of tossing a coin three times, and noting each time whether a head (H) or a tail (T) is obtained. A common way of listing the outcomes in the sample space is {HHH, HHT, HTH, THH, HTT, THT, TTH, TTT}.
Let X = the number of heads obtained. Then X can equal 0, 1, 2 or 3. The events X = 0, X = 1, X = 2 and X = 3 are shown on the right, in the Venn diagram of the sample space.
As the eight outcomes are equally likely, we have
Pr(X = x) = 0, if X is any number other than 0, 1, 2 or 3.
We can represent the distribution of probabilities in tabular and graphical form.
x 0 1 2 3
Pr(X=x)
Tabular representation
.Two events A and B are independent if one event has no influence on the likelihood of the other event occurring. Then it follows that Pr(A|B) = Pr(A), as the occurrence of B
has no effect on A. Using the conditional probability formula, if A and B are independent, then
, so Pr(A ∩ B) = Pr(A)Pr(B).
It is also true that if Pr(A ∩ B) = Pr(A)Pr(B), then A and B are independent. The law of total probability: Pr(A) = Pr(A|B)Pr(B) + Pr(A|B′)Pr(B′).
.The number of ways (combinations) of choosing r objects from n different objects is
given by .
Pr(A B) Pr( )A Pr(A∩B)
Pr( )B
---= =
C n
r n r
⎝ ⎠
⎛ ⎞ n!
r!(n r– )!
---= =
HHH
Sample space
TTT HHT
HTH
THH
HTT
THT
TTH
X=3
X=2
X=1
X=0 Pr(X=0) = 1 8⁄ = 0.125
Pr(X=1) = 3 8⁄ = 0.375
Pr(X=2) = 3 8⁄ = 0.375
Pr(X=3) = 1 8⁄ = 0.125 Pr(X=x)
0.5
0.1
0 0.2 0.4
0.3
1 2 3 x
Graphical representation
1 8 --- 3
8 --- 3
8 --- 1
8
Let p(x) = Pr(X = x). Then p(x) ≥ 0 for all values of x, and ∑p(x) = ∑Pr(X = x) = 1. (∑ is shorthand for ‘the sum of’, so this says that the sum of all of the probabilities is 1.) The word discrete is used to indicate that the non-zero probabilities only occur for a discrete set of values of x.
To evaluate a probability such as Pr(X ≥ 2), i.e. Pr(at least 2 heads), note that the only values of X with non-zero probabilities are Pr(X = 2) and Pr(X = 3) and clearly these are mutually exclusive. So
Pr(X ≥ 2) = Pr(X = 2) + Pr(X = 3)
=
From the table and graph shown, we can recognise that p(x) is a function of x. It is referred to as a probability function, or the probability distribution of the random variable X.
E x a m p l e
1
State, with reasons, whether each of the following could represent a probability function.
a
b
c
d
S o l u t i o n
a Yes. p(x) ≥ 0 for all x and the sum of probabilities is one i.e. ∑p(x) = 1.
b Yes. All probabilities are between zero and one inclusive and the sum of probabilities is one. The negative value for x is not relevant; it might represent a loss with positive values representing a gain.
c No. Probabilities cannot be negative and p(2) =−0.2.
d No. ∑p(x) ≠ 1.
3 8
--- 1
8
---+ 1
2
---=
Conditions for a probability function
For p(x) to be a probability function of a discrete random variable X, we require: .p(x) ≥ 0 for all real numbers x
.the sum of the probabilities is 1, i.e. ∑p(x) = 1.
x 0 1 2 3
p(x) 0.2 0.1 0.3 0.4
x −2 0 1 3 4
p(x) 0.1 0.3 0.1 0.2 0.3
x 0 1 2 3 4 5
p(x) 0.3 0.2 −0.2 0.5 0.1 0.1
x 0 1 2 3 4 5
E x a m p l e
2
Each of the following tables shows the probability distribution of a discrete random
variable X. Find the value of the unknown in each case and graph each probability function.
a b
S o l u t i o n
a ∑p(x) = 1 so we have
0.1 + 0.3 + a + 0.2 = 1 a + 0.6 = 1
a = 0.4
We then check that all probabilities are between 0 and 1.
b ∑p(x) = 1, so we have
b + b + 0.1 + 4b − 0.9 + 0.15 + 0.4 − b = 1
5b − 0.25 = 1
5b = 1.25 b = 0.25
We then check that all probabilities are between 0 and 1.
E x a m p l e
3
State, with reasons, whether the following are probability functions.
a ; b
S o l u t i o n
a . p(x) ≥ 0 for all x and
∑p(x) = , so p(x) is a probability function.
b . p(x) ≥ 0 for all x and
∑p(x) = so p(x) is a probability function.
x 2 3 4 7
p(x) 0.1 0.3 a 0.2
x −3 0 2.3 4.5 6
p(x) b b + 0.1 4b− 0.9 0.15 0.4 −b
p(x)
0.1
0 0.2 0.4
0.3
1 2 3 4 5 6 7 x
p(x)
0.1
0 0.2 0.4
0.3
4 5 6 7
1 2 3
–3 –2 –1 x
p x( ) 1
85
---(25 4– x),x∈{0 1 2 3 4, , , , }
= p x( ) 1
148
---(x2+7x+10),x∈{–5,–2 3 7, , } =
p( )0 25 85
---,p( )1 21 85
---,p( )2 17 85
---,p( )3 13 85
---,p( )4 9 85
---= = = = =
25+21+17+13+9 85
--- = 1
p( )–5 0,p( )–2 0,p( )3 40 148
---,p( )7 108 148
---= = = =
40+108 148 --- = 1
E x a m p l e
4
Find the value of k if the following is a probability function.
S o l u t i o n
; ; ; ∑
So p(x) ≥ 0 for all x and ∑p(x) = 1 if k= 57. E x a m p l e
5
A card is chosen randomly from a standard deck of 52 playing cards. A second card is then chosen randomly. Construct a table of the probability distribution for the number of clubs chosen, if:
a each card is replaced before the next card is chosen.
b each card is chosen without the previous card being replaced.
c at least one club is chosen and
i each card is replaced before the next card is chosen
ii each card is chosen without the previous card being replaced. S o l u t i o n
Let X = number of clubs chosen.
Let C1 = choosing a club on the first selection, N2 = not choosing a club on the second selection, and so on.
a
So the probability distribution can be represented as:
We check and the sum of all probabilities is equal to 1. We could also have used a tree diagram as shown at right.
x 0 1 2
p(x)
t i p
The TI-89 can be used to solve this problem as shown. p x( ) = 1---k(18 3– x),x∈{–2 1 2 4, , , }
CAS 11.1 p( )–2
1
k ---( )24
= p( )1 1
k ---( )15
= p( )2 1
k ---( )12
= p( )4 1
k ---( )6 =
p x( ) 24---+15k+12+6 57 k --- 1
= = =
k = 57
Pr(X= 0) = Pr(N1∩N2) = 4---3×34--- = 16---9
Pr(X= 1) = Pr(C1∩N2)+Pr(N1∩C2) = 4---1×34---+43---×---41 = 38
---Pr(X= 2) = Pr(C1∩C2) = 4---1×14--- = 16---1
9 16 --- 3
8 --- 1
16
---C1
N1
1 4 3 4
C2
N2
1 4 3 4
C2
N2
1 4 3 4
1 16
3 16
3 16
b
So the probability distribution can be represented as:
Check: sum of all probabilities is equal to 1. We could also use a tree diagram:
c i Given that at least one club is chosen, it is impossible to choose zero clubs, so Pr(X = 0|X ≥ 1) = 0.
Pr(X = 1|X ≥ 1) = (using Pr(A|B) = )
= (since (X= 1) ⊂ (X≥ 1))
=
=
=
Pr(X = 2|X ≥ 1) =
= (since (X= 2) ⊂ (X≥ 1))
=
=
=
So the probability distribution can be represented as:
Check: sum of all probabilities is equal to 1.
x 0 1 2
p(x)
x 1 2
Pr(X=x|X≥ 1)
Pr(X= 0) Pr(N1∩N2) ---34×3851--- 12---×1917--- 19
34
---= = = =
Pr(X= 1) Pr(C1∩N2)+Pr(N1∩C2) 14--- 39
51 --- 3 4 --- 13 51 ---× + × 13 34 ---= = =
Pr(X= 2) Pr(C1∩C2) 1
4 --- 12 51 ---× 1 17 ---= = = 19 34 --- 13 34 --- 1 17 ---C1 N1 1 4 3 4 C2 N2 12 51 39 51 13 51 38 51 1 17 13 68 13 68 19 34 C2 N2
Pr((X =1)∩(X≥1)) Pr(X≥1)
--- Pr(A∩B)
Pr( )B
---Pr(X =1) Pr(X≥1) ---3 8 --- 7 16 ---÷ 3 8 --- 16 7 ---× 6 7
---Pr((X =2)∩(X≥1)) Pr(X≥1)
ii Again Pr(X= 0|X≥ 1) = 0 Pr(X = 1|X ≥ 1) =
= (since (X= 1) ⊂ (X≥ 1))
=
=
=
Pr(X= 2|X ≥ 1) =
= (since (X= 2) ⊂ (X≥ 1))
=
=
=
So the probability distribution can be represented as:
Check: sum of all probabilities is equal to 1.
exercise
11.1
1 State whether or not each of the following could represent a probability function. Give reasons if the answer is no.
a b
c d
2 State whether or not each of the following could represent a probability function. Give reasons if the answer is no.
a b
c d
x 1 2
Pr(X=x|X≥ 1)
Pr((X =1)∩(X≥1)) Pr(X≥1)
---Pr(X =1) Pr(X≥1)
---13 34 --- 15
34 ---÷ 13 34 --- 34
15 ---× 13 15
---Pr((X =2)∩(X≥1)) Pr(X≥1)
---Pr(X =2) Pr(X≥1)
---1 17 --- 15
34 ---÷ 1 17 --- 34
15 ---× 2 15
---13 15 --- 2
15
---x 0 1 2 3
p(x) 0.1 0.4 0.4 0.1
x 2 3 4 8
p(x) 0.3 0.5 −0.2 0.4
x 1 4 5 9
p(x) 0.2 0.2 0.3 0.4
x −5 −3 1 4
p(x) 0.2 0.1 0.2 0.5
x 0 1 2 3 4
p(x) 0.3 0.2 0.1 0.1 0.3
x 0 2 3 5 7
p(x) 0.2 0.4 0.3 0.2 −0.1
x −3 2 4 5 7
p(x) 0.5 0.1 0.1 0.2 0.1
x 2 3 4 7 9
3 Each of the following tables shows the probability distribution of a discrete random variable X. Find the value of the unknown in each case.
a b
4 Each of the following tables shows the probability distribution of a discrete random variable X. Find the value of the unknown in each case.
a b
5 For the discrete random variable X with probability distribution given in the table, find:
a Pr(X ≤ 3) b Pr(X > −2) c Pr(−3 ≤ X < 3) d Pr(X ≤ 2|X ≤ 5)
6 For the discrete random variable X with probability distribution given in the table, find:
a Pr(X ≥ −1.5) b Pr(X ≤ 0.5)
c Pr(−0.3 ≤ X < 1.8) d Pr(X > 1|X ≥ 0)
7 For the discrete random variable X with probability distribution given in the table, find:
a Pr((X ≤ 0) ∩ (X > 1)) b Pr((X ≤ 1) ∩ (X > −1)) c Pr((X > 0) ∪ (X ≥ −1))
8 For the discrete random variable X with probability distribution given in the table, find:
a Pr((X < 6) ∩ (X > 2)) b Pr((X ≤ 6) ∩ (X ≥ 2)) c Pr((X ≤ 8) ∪ (X < 6))
9 State, with reasons, whether the following are probability functions.
a b
c d
10 Find the value of k if the following are probability functions.
a b
x −4 −2 1 3 6
p(x) 0.23 0.15 0.16 0.12 0.34
x −1 0 1 2 3
p(x) 0.14 0.21 0.32 0.17 0.16
x −2 −1 0 1 2
p(x) 0.09 0.11 0.22 0.31 0.27
x 2 4 6 8 10
p(x) 0.22 0.13 0.16 0.25 0.24
x −5 −3 2 6
p(x) 0.2 0.1 a 0.1
x −1 1 π 5
p(x) 2b 4b 3b 5b b 3
x −2 0 2 4
p(x) 2c 0.15 0.2 0.15
x 4 11 3π 13
p(x) 5d 3d− 0.3 2d d 0.6 − 4d
5 2
p x( ) 1 8
---(5–2x),x∈{0 1 2 3, , , }
= p x( ) 1
38
---(3x–4),x∈{2 4 5 7, , , } =
p x( ) 1 26
---(x2–x–12),x∈{–5,–3 4 5, , } =
p x( ) 1 116
---(x2+5x+6),x∈{–1 0 2 4 5, , , , } =
p x( ) 1 k
---(23–5x),x∈{–1 2 3 4, , , }
= p x( ) = k(7x+2),x∈{0 1 3 4, , , }
11 A couple has three children. Find a probability function for the number of girls the couple has if:
a there are no restrictions.
b the couple has a daughter who studies Maths Methods.
12 A jar contains five red balls, four white balls and three black balls. Find a probability distribution for the number of red balls drawn if:
a two balls are drawn with replacement after each draw.
b two balls are drawn without replacement.
c three balls are drawn without replacement.
13 A spinner has three equally likely sectors numbered from 1 to 3.
a Find the probability distribution for the number spun, X, if the spinner is spun once.
b Find the probability distribution for the sum of the numbers spun, Y, if the spinner is spun twice.
c Find Pr(X = 2|X ≠ 1).
d Find Pr(Y > 4|3 < Y < 6).
e Find the probability that the sum of the numbers spun in two spins is at least 4 if the first number spun is at most 2.
14 A multiple-choice question has five alternatives. Lazy Larry has not studied and needs to have a random guess at the correct answer. If Larry guesses a wrong answer, he will be told that the answer is wrong and can have another guess at the alternatives that remain. This procedure is continued until Larry guesses the correct answer.
a Find the probability distribution of X, the number of guesses Larry takes to obtain the correct answer.
b Find Pr(X = 2|X ≠ 1).
c Find Pr(X = 3|(X ≠ 1 ∩ X ≠ 2)).
d Find Pr(X > 3|X ≠ 1). E x a m p l e
6
In the table, find the value(s) of k
if the table represents a probability function.
S o l u t i o n
∑p(x) = 1, so we have
k2+ 0.3 −k+ 0.3k+ 0.24 + 0.2k+ 0.5 = 1
k2− 0.5k+ 1.04 = 1
k2−0.5k+ 0.04 = 0 (k− 0.4)(k− 0.1) = 0
k= 0.4, 0.1
We check and find that if k= 0.4, p(0) < 0, so k= 0.4 is not a valid solution. We check and find that k= 0.1 is a valid solution. Therefore the only solution is k= 0.1.
x − 0 1 5
p(x) k2 0.3 −k 0.3k+ 0.24 0.2k+ 0.5
exercise
11.1
15 In the following tables, find the value(s) of the unknown if the tables represent probability functions.
a
b
c
16 In the following tables, find the value(s) of the unknown if the tables represent probability functions.
a
b
17 In the game of backgammon a player rolls two fair dice and then makes a move. The maximum number of spaces the player can move is equal to the sum of the numbers on the dice, unless the number is a double (both dice have the same number). If a double is rolled, the maximum number of spaces the player can move is equal to double the sum of the numbers on the dice so that, for example, if a double three is rolled the player can move 12 spaces.
a Find the probability distribution for the sum of the numbers, X, on the dice.
b Hence, find the probability distribution for the maximum number of spaces the player can move, Y.
c Find Pr(X > 7).
d Find Pr(Y > 7).
e Find the probability that after rolling the dice, the maximum number of spaces the player can move is less than 8, given that the sum of the numbers on the dice is less than 8.
continued
x −2 2 3 5
p(x) 0.6a 0.2 a2+0.3 0.5 −a
x 0 π 5
p(x) 0.1b+ 0.4 b2 −0.1b −0.1b+ 0.54
7 –
x −1 1 π 5
p(x) 0.4 − 0.2k 0.32 0.3 − 0.1k k2
x −5 −3 0.3 3
p(x) 0.1c+ 0.65 0.2c+ 0.1 0.1c+ 0.2 c2
x −0.2 −0.08 2.3
p(x) d2 d+ 0.4 0.3− 0.1d 0.45 − 0.1d
11 –
MathsWorld Mathematical Methods Units 3 & 4
18 A game has the following rules. A card is randomly chosen from a standard deck of 52 playing cards. Each card is given a numerical value: an ace counts as 1, cards 2–10 count as the number on the card, and a jack, queen and king count as 11, 12, and 13 respectively. The numerical value of a card earns points according to the formula that 2 is added to the numerical value of the card and this total is then divided by 3. The number of points earned is equal to the integer part of this quotient. For example, if an ace
is drawn, the number of points earned is . If a five is drawn, the number of
points earned is .
a Find the probability distribution for the number of points earned, X, if the game is played once.
b If the game is played twice, find the probability that the total number of points earned will be 10 if
i the first card is replaced before the second is drawn.
ii the first card is not replaced before the second is drawn.
c If the game is played twice, find the probability that the total number of points earned will be 3 if
i the first card is replaced before the second is drawn.
ii the first card is not replaced before the second is drawn.
Distributions involving sampling
A common type of probability distribution ariseswhen sampling occurs, for example, in quality-control procedures and games of chance.
Sampling without replacement
When sampling is done without replacement, successive outcomes are dependent on one another, and, as a result, the probabilities of successive events are not constant. For example, if a hat contained five red balls and four blue balls, the probability of a randomly selected ball being
red is . If a second ball is randomly selected
without replacing the first ball, the probability of
it being red is .
We recall that combinations are concerned with the number of ways in which we can select or choose a number of objects and the order of those objects is not important.
It should be noted that the event of sampling k items one at a time without replacement between successive items is identical to the event of sampling k items at once.
We have defined the number of ways in which we can select r items from n items to be
, where and are alternative notations.
Int 1+2 3
---⎝ ⎠
⎛ ⎞ = 1
Int 5+2 3
---⎝ ⎠
⎛ ⎞ = 2
5 9
---4 8
--- 1
2
---=
C
n r
n r
⎝ ⎠
⎛ ⎞ n!
r!(n–r)!
---= = nCr
n r
For example, the number of ways two items can be selected from nine items is
=
= = 36
E x a m p l e
7
Each of the whole numbers from 1 to 11 is printed on a different card. If two cards are randomly selected without replacement, find the probability that one odd and one even number have been selected, using:
a elementary probability and the multiplication principle
b combinations. S o l u t i o n
a To select one odd and one even number, we could have selected the odd number first or second. So we have:
Pr(one odd and one even) = Pr(O1 ∩ E2) + Pr(E1 ∩ O2) where O1 = odd first and so on
Pr(O1 ∩ E2) + Pr(E1 ∩ O2) =
=
b There are ways of selecting an odd number and there are ways of selecting an even number. So there are ways of selecting one odd and one even number. The total number of ways in which we can select two cards from a group of 11 is .
Pr(one odd and one even) =
=
=
GC 1.8 CAS 1.8
t i p
can be calculated as shown in the screenshot on the right. C 9 2 C 9 2 9!
2!(9–2)!
---9!
2×7!
---Properties of combinations
It is useful to recall some of the properties of combinations:
. = . = . =
. = as =
C n n n n ⎝ ⎠
⎛ ⎞ = 1 nC
0
n
0 ⎝ ⎠
⎛ ⎞ = 1 nC
1
n
1 ⎝ ⎠ ⎛ ⎞ = n
n r
⎝ ⎠
⎛ ⎞ n
n r–
⎝ ⎠
⎛ ⎞ n!
r!(n r– )!
--- n! n r– ( )!r! ---6 11 --- 5 10 --- 5 11 --- 6 10 ---× + × 6 11 ---⎛ ⎜ ⎝ ⎞ ⎟ ⎠ 6 1 = 6
⎛ ⎜ ⎝ ⎞ ⎟ ⎠ 5 1 = 5
⎛ ⎜ ⎝ 6 1 × ⎞ ⎟ ⎠ ⎛ ⎜ ⎝ 5 1 ⎞ ⎟ ⎠ ⎛ ⎜ ⎝ ⎞ ⎟ ⎠ 11
2 = 55 6
E x a m p l e
8
A Maths Methods class of 16 students consists of five students who are also studying Specialist Maths and 11 who are not. The class must send a delegation of six to represent them at a meeting. If the delegation is randomly chosen, find the probability that the delegation will contain:
a exactly two students who are studying Specialist Maths
b at least four students who are studying Specialist Maths. S o l u t i o n
a There are ways of selecting two of the students who are studying Specialist Maths. We must then select four of the students who are not studying Specialist Maths and there are ways of doing this. The total number of ways in which we can select six from a group of 16 is .
Let X = the number in the delegation who are studying Specialist Maths. The probability
that the delegation will contain exactly two students who are studying Specialist Maths is given by
Pr(X = 2) =
=
b Here we require Pr(X ≥ 4).
Pr(X ≥ 4) = Pr(X = 4) + (Pr(X = 5)
= +
=
t i p
A useful check that the numbers in the combinations ‘make sense’ when calculating
a probability is that the sum of the ’top’ numbers in the numerator equals the ’top’ number in the denominator and the sum of the ’bottom’ numbers in the numerator equals the ’bottom’ number in the denominator. This is because the sum of the number of items in each category equals the total number of items, and the sum of the number of items chosen in each category equals the total number of items chosen. In example 7, 6 + 5 = 11 and 1 + 1 = 2.
⎛ ⎜ ⎝ ⎞ ⎟ ⎠ 5 2 = 10
⎛ ⎜ ⎝ ⎞ ⎟ ⎠ 11
4 =330 ⎛
⎜ ⎝ ⎞ ⎟ ⎠ 16
6 = 8008
---exercise
11.1
19 Show that the following are probability functions.
a p(x) = , x ∈ {0, 1, 2}; b p(x) = , x ∈ {0, 1, 2, 3};
c p(x) =2Cx(0.6) x
(0.4)2 −x, x ∈ {0, 1, 2}; d p(x) = (0.2)x(0.8)3 −x, x ∈ {0, 1, 2, 3}.
20 In the racing industry, a quinella is a bet in which a person must select two competitors to finish in the first two placings, in either order. If a person randomly selects two competitors, find the probability that the quinella will be correctly forecast if the race has:
a eight competitors. b twelve competitors.
21 In the game of Tattslotto, to win the major prize a person must correctly select the numbers on the six balls drawn from 45 balls numbered from 1 to 45. If a person randomly selects six numbers, what is the probability that they will win the major prize?
22 In an earlier version of the game of Tattslotto, to win the major prize a person needed to correctly select the numbers on the six balls drawn from 40 balls numbered from 1 to 40. If a person randomly selected six numbers, what was the probability that they would win the major prize?
23 If a hand of five cards is randomly dealt from a standard deck of 52 playing cards, find the probability that:
a four aces are contained in the hand. b four twos are contained in the hand.
c exactly three aces are contained in the hand.
d at least three aces are contained in the hand.
24 If a committee of seven is to be chosen from 15 people of whom eight are men, what is the probability that the committee will comprise three women and four men?
25 A football tipping competition is devised in which entrants randomly select six of the 16 AFL clubs. An entrant wins a prize if the top four teams for the season are among the six clubs selected. What is the probability that an entrant wins a prize?
26 A person randomly takes two socks from a drawer that contained four brown socks, six blue socks, and eight black socks. What is the probability that the two socks taken are the same colour?
27 A photocopier has a fault so that 15% of copies made are smudged. A person makes 80 copies and randomly selects 10 of the copies to distribute at a meeting. Let X = the number of smudged copies. Find:
a Pr(X = 0) b Pr(X = 3)
continued
2 x
3 2–x
5 2
⎞ ⎟ ⎠ ⎛
⎜ ⎝
⎛ ⎜ ⎝ ⎞ ⎟ ⎠
⎞ ⎟ ⎠ ⎛ ⎜ ⎝
3 x
4 3–x
7 3
⎞ ⎟ ⎠ ⎛
⎜ ⎝
⎛ ⎜ ⎝ ⎞ ⎟ ⎠
⎞ ⎟ ⎠ ⎛ ⎜ ⎝
3 x
⎛ ⎜ ⎝
⎞ ⎟ ⎠
Number
sense with the spence
93
When we don’t count the elements formed by smashing others together at ridiculously high speeds, or those that exist for only 0.000 000 001 of a second before saying, ‘Thanks, I’m out of here’, there are only 93 naturally occurring elements.
Sampling with replacement
If sampling is done with replacement, successive outcomes are independent of one another and, as a result, the probabilities of successive events are constant.
For example, if a hat contained five red balls and four blue balls, the probability of a
randomly selected ball being red is . If a second ball is randomly selected after replacing
the first ball, the probability of it being red is still .
E x a m p l e
9
A card is chosen randomly from a standard deck of 52 playing cards. The card is replaced and another card is chosen randomly from the deck. Find the probability that:
a two queens have been chosen. b no queens have been chosen.
c exactly one queen has been chosen. S o l u t i o n
Let X= the number of queens chosen.
We define success S as the act of choosing a queen. If we choose one card from the deck, . This probability is constant as we are replacing the card we choose, so the trials are independent.
a The probability of two successes is given by: Pr(X= 2)=
=
b The probability of no successes is given by: Pr(X = 0)=
=
c The probability of one success is given by: Pr(X= 1)=
=
We check and find that the sum of the probabilities is equal to 1.
exercise
11.1
28 A marble is chosen randomly from a bag that contains eight green marbles and eight gold marbles. The marble is replaced and another marble is chosen randomly from the bag. Find the probability that:
a two gold marbles have been chosen.
b no gold marbles have been chosen.
c exactly one gold marble has been chosen.
5 9 ---5 9
29 A card is chosen randomly from a standard deck of 52 playing cards. The card is replaced and another card is chosen randomly from the deck. What is the probability that:
a two royal cards (ace, king, queen or jack) have been chosen?
b no royal cards have been chosen?
c exactly one royal card has been chosen?
30 A ball is chosen randomly from a bag that contains 10 balls numbered from 1 to 10. The ball is replaced and another ball is chosen randomly from the bag. What is the probability that:
a two balls with prime numbers have been chosen?
b no balls with prime numbers have been chosen?
c exactly one ball with a prime number has been chosen?
Markov chains
Sampling with replacement helps when calculating probabilities in a sequence of independent trials (these are sometimes referred to as a Bernoulli sequence or a Bernoulli trial; see section 11.3 for more about this).
In some practical situations, this independence between successive trials is not a reasonable assumption. For example, experience with rainfall data provides evidence that knowing whether it rains on one day is helpful in predicting whether it will rain the next.
A Markov chain is a chain of events for which the probabilities of outcomes or states depend on what has happened previously. For the rainfall example, the probabilities of it being wet or dry on a particular day depend (to some extent) on whether it was wet or dry on the previous day.
For example, consider the following scenario that arises from a two state situation (wet state or dry state). Each of the following statements express a conditional probability.
.If it is wet today, the probability that it will be wet the next day is 0.8.
.If it is wet today, the probability that it will be dry the next day is 0.2.
.If it is dry today, the probability that it will be wet the next day is 0.3.
.If it is dry today, the probability that it will be dry the next day is 0.7.
A transition probability table shows the probabilities of moving (i.e. making a transition) from each state to every other state. Note that the sum of the elements in each column is 1.
Transition probability tables
In general, a transition probability table used to form a transition matrix will look as shown where Pr(B|A) means the probability that event B will occur given that event A has previously occurred.Today
Tomorrow Wet Dry
Wet 0.8 0.3
Dry 0.2 0.7
Event A Event A′
Event B Pr(B|A) Pr(B|A′) Event B′ Pr(B′ |A) Pr(B′ |A′)
This information can also be displayed as a tree diagram such as the following, which shows how the state of each day (i.e. whether it is wet or dry) is dependent only on the state of the preceding day.
Today 1 day later 2 days later 3 days later
0.8 Wet
0.8 Wet
0.2 Dry
Wet
0.8 0.3 Wet
0.2 Dry
0.7 Dry
Wet
0.8 Wet
0.3 Wet
0.2 0.2 Dry
Dry
0.3 Wet
0.7 Dry
0.7 Dry
0.8 Wet
0.8 Wet
0.2 Dry
Wet
0.3 0.3 Wet
0.2 Dry
0.7 Dry
Dry
0.8 Wet
0.3 Wet
0.7 0.2 Dry
Dry
0.3 Wet
0.7 Dry
0.7 Dry
E x a m p l e
1 0
In a particular city, it is asserted that the probability of rain is dependent on whether it has rained the previous day.
.If it rains today, the probability that it will rain tomorrow is 0.75. .If it is dry today, the probability that it will rain tomorrow is 0.35.
On a particular day, it rains.
a Use the above information to construct a transition probability table.
b If it has rained on a particular day (Monday), use a tree diagram to represent the possible states on the following two days (Tuesday and Wednesday).
c Calculate the probability that if there is rain on Monday, then:
i Tuesday and Wednesday will be dry.
S o l u t i o n
a The transition probability table is as follows. b Note that the initial state is rain.
c i Pr(dry on Tuesday and Wednesday|rain on Monday) = 0.25 × 0.65 = 0.1625
ii Pr(it will rain on exactly one of Tuesday and Wednesday|rain on Monday) = 0.75 × 0.25 + 0.25 × 0.35 = 0.275
exercise
11.1
31 A transition probability table is given on the right.
a Give the values of
i Pr(B|A)
ii Pr(B|A′)
b If the current state is equally likely to be A or A′, find the probability that the next state will be B.
32 Convert the following information to a transition probability table.
33 In a particular café, only two styles of coffee are served: café latte or long macchiato. Based on observation of customer preferences over a short period, the manager notices that 90% of customers who order a café latte one day will also order a café latte the next day, whereas only 30% of those who order a long macchiato will repeat this order the next day. [Assume that customers have only one coffee each day, and that it is one of these two coffee types.]
a Represent this information as a transition probability table.
b Construct a tree diagram to represent the outcomes in the two days following a day on which a customer orders a long macchiato.
c If a customer orders a café latte on a particular day, what is the probability that they will order a long macchiato on:
i each of the next two days.
ii exactly one of the next two days.
Today
Tomorrow Rain Dry
Rain 0.75 0.35
Dry 0.25 0.65
Monday Tuesday Wednesday
0.75 Rain
0.75 Rain
0.25 Dry
Rain
0.35 Rain
0.25 Dry
0.65 Dry
continued
Current state
Next state A A′
B 0.95 0.15
B′ 0.05 0.85
Day 1 Day 2 Day 3
0.6 Warm
0.6 Warm
0.4 Cool
Warm
0.3 Warm
0.4 Cool
0.7 Cool
34 Rashid and Khalil are friends who play a weekly game of squash against each other. If Rashid wins the weekly game, there is a 40% chance that he will lose to Khalil the next week. If Khalil wins the weekly game, then there is a 45% chance that he will lose the next game.
a Represent this information as a transition probability table.
b If Khalil wins the game in the first week, what is the probability that he wins on:
i each of the next 2 weeks? ii neither of the next two weeks?
c If Khalil wins the game in the first week, what is the probability that he wins the next week, then Rashid wins the two weeks after that?
The following table shows a probability function.
a i Find the value of k.
ii What value of k which was found algebraically was discarded and why?
b Use the probability function to determine the following:
i Pr(X ≤ 2)
ii Pr(X > 1)
iii Pr(1 ≤ X < 3)
iv Pr(X ≤ 1|X ≤ 2)
The X values in the table above relate to the result of an experiment and the probability of each outcome occurring.
c If the experiment is performed twice, and the result of each experiment is independent of the result of the other experiment, find the probability that:
i X = 1 occurs twice.
ii X = 1 occurs exactly once.
iii X < 2 does not occur.
iv X < 2 occurs exactly once.
x 0 1 2 3
p(x) k2 0.5 − 0.1k 0.42 −0.1k
analysis task 1—
know your tables
SAC
Number
sense with the spence
In 1742, the mathematician Christian Goldbach claimed that every even number can be written as the sum of 2 prime numbers. For example, 24 = 11 + 13 and 50 = 19 + 31. No-one has ever proven Goldbach’s conjecture. It’s even been shown to be correct for all even numbers up to 100 000 000 but not for every even number. So if you manage to work out why, don’t forget to write it down and give me a call.
Can you write 94 as the sum of 2 primes?
94
11.1Know your tables
CD
Statistics of discrete random
variables
The important statistics for any random variable are the mean, the median, the mode, the variance and the standard deviation. The mean, median and mode provide a picture of the distribution of the random variable by giving measures of the central tendency of the distribution. The standard deviation, which is the square root of the variance, is a measure of the spread of the distribution.
Mean, median and mode
The mean, μ (pronounced ‘mu’), is the value we expect the long-run average to be when an experiment is repeated many times. Let μ= E(X), the expected value of X. For a discrete random variable, the expected value of X is defined to be the sum of each of the possible values of X multiplied by its corresponding probability.
The median m for a discrete random variable X is the ‘half-way’ mark or value of X. Let x1
and x2 be successive values of X with x2 > x1.
If Pr(X ≤ x1) < 0.5 and Pr(X ≤ x2) > 0.5, then m = x2 since we have reached half-way.
If Pr(X ≤ x1) = 0.5, then it follows that Pr(X ≥ x2) = 0.5. In this case, the median is usually
taken to be the average of these values: .
The mode is the most common X value. For a discrete random variable this will be the X value with the highest probability. There can be more than one mode if two or more X values have the equal highest probability.
The mean and the median do not necessarily take one of the discrete X values.
E x a m p l e
1
The graph of the probability function of a discrete random variable X is shown at right. Find the following values and for each of parts d–f, discuss its relationship with E(X).
a the median b the mode c E(X)
d E(2X) e E(4X + 1) f E(X2)
S o l u t i o n
a The median is 2.5, the average of 2 and 3 as Pr(X ≤ 2) = 0.5 and Pr(X ≥ 3) = 0.5.
b The mode is 3, as this X value has the highest probability.
Mean (expected value) of a discrete random variable
μ = E(X) = ∑xp(x)In general, E[f(X)] = ∑f(x) p(x).
m x1+x2 2
---=
p(x)
0.1
0 0.2 0.4
0.3
1 2 3 4 x
11.2
c Using the definition for E(X), we have: E(X) = ∑xp(x)
= 1 × 0.2 + 2 × 0.3 + 3 × 0.4 + 4 × 0.1 = 2.4
It can help to write the probabilities in table form:
Then E(X) is the sum of the products of each of the column number pairs.
d For E(2X), insert a row for 2x in the table in part a:
Using the definition for E[f(X)], we have: E(2X) =∑2xp(x)
= 2 × 0.2 + 4 × 0.3 + 6 × 0.4 + 8 × 0.1 = 4.8
Again, note that E(2X) is the sum of the products of the number pairs in the 2nd and 3rd rows of the table. Observe that E(2X) = 2E(X). This is what we would expect. If a game of chance was played and the return was doubled for every possible outcome, we would expect, on average, to receive twice as much as we would have expected previously.
e For E(4X + 1), we can insert a row for 4x + 1 in the table again:
E(4X + 1) =∑(4x+ 1) p(x)
= 5 × 0.2 + 9 × 0.3 + 13 × 0.4 + 17 × 0.1 = 10.6
Observe that E(4X + 1) = 4E(X) + 1. This is a combination of the two previous parts.
If a game of chance was played and we received $1 more than four times the return for every possible outcome, we would expect, on average, to receive $1 more than four times what we would have expected previously.
f For E(X2), we could insert a row in the table again, but here we use the definition directly: E(X2) = ∑x2p(x)
= 12× 0.2 + 22× 0.3 + 32× 0.4 + 42× 0.1 = 1 × 0.2 + 4 × 0.3 + 9 × 0.4 + 16 × 0.1 = 6.6
There is no obvious relationship between E(X2) and E(X).
x 1 2 3 4
p(x) 0.2 0.3 0.4 0.1
x 1 2 3 4
2x 2 4 6 8
p(x) 0.2 0.3 0.4 0.1
x 1 2 3 4
4x+ 1 5 9 13 17
p(x) 0.2 0.3 0.4 0.1
t i p
If b = 0, it follows that E(aX) = aE(X). Also, if a = 0, it follows that E(b) = b. Of course, a constant does not vary, so the average or expected value for that constant must be itself.
Also, E(X + Y) = E(X) + E(Y), which can be shown using methods similar to those above.
These results are quicker and easier to use than finding the expected value by using the direct approach shown in the examples above.
E x a m p l e
2
Given E(X) = 4, find:
a E(7X) b E(X + 5) c E(3X− 2)
S o l u t i o n
a As E(aX+b) =aE(X) +b, E(7X)= 7E(X) = 28.
b As E(aX + b) = aE(X) + b, E(X + 5) = E(X) + 5 = 9.
c As E(aX+b) =aE(X) +b, E(3X− 2) = 3E(X) − 2 = 10. E x a m p l e
3
Use the probability function given in the table to find the mean μ and the median m of the associated discrete random variable X. S o l u t i o n
To find μ, we first need to find the value of a. Using ∑p(x) = 1, we find that a = 0.2. Then:
μ = E(X) =∑xp(x)
=−2 × 0.4 + 0 × 0.3 + 2 × 0.2 + 5 × 0.1 = 0.1
Since Pr(X ≤ −2) = 0.4 and Pr(X ≤ 0) = 0.7, m = 0. E x a m p l e
4
The discrete random variable X has probability function p(x) given in the table. If E(X) = 0.4, find
the value of c. S o l u t i o n
∑xp(x) = −2 × 0.25 + c × 0.4 + 2 × 0.15 + 5 × 0.2
= 0.4 0.4c = −0.4
c = −1
Mean (expected value) of the linear function aX + b
E(aX + b) = aE(X) + bx −2 0 2 5
p(x) 0.4 0.3 a 0.1
x −2 c 2 5
p(x) 0.25 0.4 0.15 0.2
E x a m p l e
5
A discrete random variable X has probability function
p(x) given in the table. Find the values of a and b, if μ = 2.8.
S o l u t i o n
As usual, to find two unknowns we need two pieces of information. These are ∑p(x) = 1 and μ = 2.8.
The first of these gives: 0.3 +a+ 0.1 +b= 1
a+b= 0.6 (1)
The second gives:
μ = E(X) =∑xp(x)
2.8 = 1 × 0.3 + 2a+ 3 × 0.1 + 4b
2a+ 4b= 2.2
a+ 2b= 1.1 (2)
Solving simultaneously, (2) − (1) gives b = 0.5, and substituting into either equation gives a = 0.1.
Variance and standard deviation
We have stated that the variance is a measure of how much the possible values in the distribution vary from the mean or average. We do not get a sensible statistic if we simply add the amounts by which each X value varies from the mean because this would allow cancellation. An X value three above the mean would cancel an X value three below the mean, implying that there was no variation from the mean, which is clearly not true. We therefore define the variance of X, var(X) or σ2, for a discrete random variable to be:
var(X) = E[(X −μ)2]
= E(X2− 2Xμ+μ2)
= E(X2) − E(2Xμ) + E(μ2)
= E(X2) − 2μE(X) +μ2
= E(X2) − 2μ2 +μ2 (since μ= E(X))
= E(X2) −μ2
= E(X2) − [E(X)]2
We use this equation to find the variance.
In a practical sense, a small variance tells us that the X values are clustered close to the mean; a large variance tells us that the X values are spread some distance away from the mean.
x 1 2 3 4
p(x) 0.3 a 0.1 b
Variance of a discrete random variable
Variance: var(X) = σ2= E(X − μ)2]Standard deviation
There are occasions when we need to use or find the standard deviation of X. Recall from MathsWorld Mathematical Methods 1 & 2 that this is equal to the square root of the variance. So sd(X) = =σ.
E x a m p l e
6
A discrete random variable X has probability function shown. Find the following values, and for parts b and c, discuss its relationship with var(X).
a var(X) b var(3X) c var(4X + 1) S o l u t i o n
a E(X) = ∑xp(x)
= 1 × 0.2 + 2 × 0.3 + 3 × 0.4 + 4 × 0.1 = 2.4
So μ = 2.4 E(X2) = ∑x2p(x)
= 1 × 0.2 + 4 × 0.3 + 9 × 0.4 + 16 × 0.1 = 6.6
var(X) = E(X2) − μ2
= 6.6 − 2.42 = 0.84
b Using the equation for variance, we have var(3X) = E[(3X)2] − [E(3X)]2. E[(3X)2] = E(9X2)
= 9E(X2) = 9 × 6.6 = 59.4 E(3X) = 3E(X)
= 3 × 2.4 = 7.2
var(3X) = E[(3X)2] − [E(3X)]2 = 59.4 − 7.22 = 7.56
Observe that var(3X) = 9var(X) and that this is equal to 32var(X).
c Using the equation for variance, we have var(4X + 1) = E[(4X + 1)2] − [E(4X + 1)]2. E[(4X + 1)2] = E(16X2 + 8X + 1)
= 16E(X2) + 8E(X) + E(1)
= 16 × 6.6 + 8 × 2.4 + 1 = 125.8
var( )X
Standard deviation of a discrete random variable
Standard deviation: sd( )X = var( )X = σ = E( )X2 –μ2x 1 2 3 4
p(x) 0.2 0.3 0.4 0.1
E(4X+ 1) = 4E(X) + E(1) = 4 × 2.4 + 1 = 10.6
var(4X+ 1) = E[(4X+ 1)2] − [E(4X+ 1)]2 = 125.8 − 10.62
= 13.44
Observe that var(4X+ 1) = 16var(X) and that this is equal to 42var(X). The quantity added has no bearing on the variance. This is because adding a constant to each value will not contribute to the amount of deviation from the new mean.
From the previous example, the variance of a linear function of a random variable can be summarised:
E x a m p l e
7
Given sd(X) = σ = 3, find:
a var(5X) b var(X − 2) c var(4X − 7) S o l u t i o n
a var(aX + b) = a2var(X).
We are given σ = 3 so σ2 = var(
X) = 9.
var(5X) = 25var(X) = 25 × 9 = 225.
b var(X − 2) = var(X) = 9.
c var(4X − 7) = 16var(X) = 16 × 9 = 144. E x a m p l e
8
Find the mean and standard deviation of the discrete random variable X whose probability
function is given by .
S o l u t i o n
. Check ∑p(x) = 1:
μ = ∑xp(x) =
= = 0.1154 correct to 4 decimal places.
Variance of the linear function aX + b
var(aX + b) = a2var(X)t i p
A common mistake is to use the standard deviation and forget to convert to variance when using this rule.
p x( ) 1
26
---(9 2– x),x∈{–1 0 2 4, , , } =
p( )–1 11 26
---,p( )0 9 26
---,p( )2 5 26
---,p( )4 1 26
---= = = =
11 26 --- 9
26 --- 5
26 --- 1
26
---+ + + 26
26 --- 1
= =
1 – 11
26
--- 0 9 26
--- 2 5 26
---E(X ) =∑x p(x) =
=
var(X) = E(X2) − μ2 =
=
σ = = 1.3395 correct to 4 decimal places.
Since the form of the answer required, exact or decimal approximation, is not specified here, either can be given.
exercise
11.2
1 Given E(X) = 3, find:
a E(5X) b E(X − 3) c E(2X − 9)
2 If the mean of a discrete random variable X is 7, find:
a E(3X) b E(5 − X) c E(4X + 5)
3 Use the probability function below to find the mean, median and mode.
4 Use the probability function below to find the mean, median and mode.
5 Find the value of c if a discrete random variable X has the probability function shown and E(X) = −0.2.
x −2 0 2 5
p(x) a 0.1 0.4 0.2
x −4 −1 1 3
p(x) 0.35 0.15 0.3 b
x c −2 3 7
p(x) 0.25 0.45 0.1 0.2
1 11 26
--- 0 9 26
--- 4 5 26
--- 16 1 26 ---× + × + × + × 47 26
---47 26 --- 3
26 ---⎝ ⎠ ⎛ ⎞2 –
1213 676
---1213 676
---GC 6.2 CAS 6.2
With the values of x entered into L1 and the associated probabilities (frequencies) in L2, the command 1-var stats L1, L2 will produce the values for the mean and standard deviation as shown in the screenshots below.
t i p
6 Find the value of d if a discrete random variable X has the probability function shown and E(X) = 37.24.
7 For the discrete random variable X with probability function shown, find the values of a and b if E(X) = 1.16.
8 For the discrete random variable X with probability function shown, find the values of c and d if μ= 4.74.
9 Given var(X) = 3, find:
a var(9X) b var(X − 7) c var(7X + 5)
10 Given sd(X) = σ= 5, find:
a var(2X) b var(X + 4) c var(6X − 9)
11 Find the mean and variance of the discrete random variable X with probability function .
12 Find the mean and standard deviation of the discrete random variable X with probability function .
13 Find the mean and variance of the discrete random variable X with probability function .
14 Find the mean and standard deviation of the discrete random variable X with probability function .
x −5 15 30 d
p(x) 0.12 0.24 0.17 0.47
x −1 1 3 5
p(x) a 0.26 b 0.14
x 2 4 5 8
p(x) 0.16 c d 0.21
p x( ) 1 38
---(8–3x),x∈{–2,–1 0 1, , } =
p x( ) 1 22
---(3x–5),x∈{2 3 4 5, , , } =
p x( ) 1 21
---(x2–3),x∈{–2 2 3 4, , , } =
p x( ) 1 26
---(8–x2),x∈{–1 0 1 2, , , } =
11.2Be discr
eet, or is that discr
ete?
CD
SAC analysis task
a A discrete random variable X has the probability function in the following table. Find the values of a and b if E(X) = 3.15.
b Find the median of the distribution.
c Find the mode of the distribution.
d Show that correct to 3 decimal places σ = 2.197.
e Find E(3X + 4).
f Find var(2X − 5) correct to 3 decimal places.
g Find E[(X + 1)2].
x 1 2 4 6
p(x) 0.35 a 0.05 b
analysis task 2—
The binomial distribution
The binomial distribution is a very important distribution with numerous applications in a wide range of fields including genetics, branches of medical research and a number of disciplines and activities in which the results of trials are independent of each other. The binomial distribution describes the number of ‘successes’ in a sequence of independent trials. The trials are referred to as Bernoulli trials as a mark of respect to the famous Swiss
mathematician Jakob Bernoulli (1654–1705).
The binomial distribution has the following properties.
As there are only two possible outcomes, and the probability p of success is constant, it follows that the probability of failure is also constant and is equal to 1 − p. For convenience we generally write q instead of 1 − p so that Pr(failure) = 1 − p = q.
If X is a discrete random variable that has a binomial distribution with n trials and probability p of success, we write X ∼ Bi(n, p).
Calculating binomial probabilities
Suppose a fair die is rolled three times and we are interested in the number of times a number divisible by three is uppermost. Clearly there are two possibilities for each roll and the
probability of success is constant, so we can write . The sample space for rolling
the die three times would be {SSS, SSF, SFS, FSS, SFF, FFF, FFS, FSF} where S represents a success (3 or 6) and F represents a failure (1, 2, 4, or 5).
We see that there is only one arrangement for three successes and for no successes (three failures) but there are three arrangements for one success and for two successes. We can construct a table to display the probability of x successes for x ∈ {0, 1, 2, 3}.
Note that the sum of the probabilities is equal to 1, as it is for any probability function.
x 0 1 2 3
p(x)
Properties of a binomial distribution
.There are a fixed number of trials n..Each trial has two possible outcomes which we usually refer to as success and failure. .The trials are independent so the probability p of success is constant.
X Bi 3 1 3
---,
⎝ ⎠
⎛ ⎞
∼
1 3 ---⎝ ⎠ ⎛ ⎞3 1
27
---= 3 1
3 ---⎝ ⎠ ⎛ ⎞2 2
3 ---⎝ ⎠ ⎛ ⎞
× = 27---6 3 1 3 ---⎝ ⎠ ⎛ ⎞ 2
3 ---⎝ ⎠ ⎛ ⎞2
× = 1227--- 2 3 ---⎝ ⎠ ⎛ ⎞3 8
27 ---=
Here we have considered the case in which a die is rolled three times. It is important to note that this is exactly the same as the cases in which three dice are tossed either simultaneously or one after another.
t i p
11.3
It should be noted that if there are x successes there must be n − x failures. This explains the presence of the product pxqn −x in the formula above: x factors of p and n − x factors of q. The term arises as the number of ways the x successes and n − x failures can be arranged.
E x a m p l e
1
A card is chosen randomly from a standard deck of 52 playing cards. The card is replaced and another card is chosen randomly from the deck. This process is repeated until four cards have been chosen. What is the probability that:
a four hearts have been chosen? b no hearts have been chosen?
c three hearts have been chosen? d one or two hearts have been chosen? S o l u t i o n
Let X = the number of hearts chosen.
Define a success S as the act of choosing a heart.
If we choose one card from the deck, .
This probability is constant as we are replacing the card chosen so the trials are independent.
So this is a binomial distribution: .
a The probability of four successes is given by: Pr(X = 4) = p4q0
=
=
b The probability of no successes is given by: Pr(X = 0) =
=
Calculating probabilities for a binomial distribution
If X is a binomial random variable, the probability of x successes in n trials is given by: , where q = 1 − p.
p x( ) n x
⎝ ⎠ ⎛ ⎞px
qn x– = n x ⎝ ⎠ ⎛ ⎞
Warning
Replaced?
Note that if the card was not replaced, the probability of choosing a heart each time would not be constant, and so this would not be a binomial distribution. If we chose a heart the first time and did not replace it, the probability of choosing a heart the
second time would be 12 . 51
--- 4
17
---=
p Pr( )S 1
4
---= =
t i p
As and a0= 1, we only
need to concern ourselves with in part a and in part b. We need not write in the other ’bits’ of the equation. This can be generalised so that, for any question that involves all or none of the elements being a success, the answer wil require only pn or qn respectively.
n n
⎝ ⎠ ⎛ ⎞ n
0
⎝ ⎠ ⎛ ⎞ 1
= =
1 4
---⎝ ⎠ ⎛ ⎞4
3 4
---⎝ ⎠ ⎛ ⎞4
X Bi 4 1 4 ---, ⎝ ⎠ ⎛ ⎞ ∼ ⎛ ⎜ ⎝ ⎞ ⎟ ⎠ 4 4 1 1 4 ---⎝ ⎠ ⎛ ⎞4 3
4 ---⎝ ⎠ ⎛ ⎞0 × 1 256 ---3 4 ---⎝ ⎠ ⎛ ⎞4
---c The probability of three successes is given by: Pr(X = 3) = p3q1
=
=
=
d The probability of one or two successes is equal to the sum of the probability of one success and the probability of two successes and is given by:
Pr(X= 1 or 2) = Pr(X= 1) + Pr(X= 2) = p1q3 + p2q2
=
=
=
E x a m p l e
2
A new diagnostic test for Wobblers Disease has been trialled and has been found to give an accurate result in 90% of cases. If five people are tested for the disease, find the probability that the test gives an accurate result:
a every time. b three times.
c none of the times. d less than three times.
e at least once. f at least four times.
S o l u t i o n
Let X= the number of times that the test gives an accurate result, so that success S means the test gives an accurate result. If we test one person, p= Pr(S) = 0.9. So X∼ Bi(5, 0.9) since 5 people are tested, i.e. n= 5.
⎛ ⎜ ⎝ ⎞ ⎟ ⎠ 4 3 4 1 4 ---⎝ ⎠ ⎛ ⎞3 3
4 ---⎝ ⎠ ⎛ ⎞1 × 12 256 ---3 64 ---⎛ ⎜ ⎝ ⎞ ⎟ ⎠ 4 1 ⎛ ⎜ ⎝ ⎞ ⎟ ⎠ 4 2 4 1 4 ---⎝ ⎠ ⎛ ⎞1 3
4 ---⎝ ⎠
⎛ ⎞3 6 1
4 ---⎝ ⎠ ⎛ ⎞2 3
4 ---⎝ ⎠ ⎛ ⎞2 ×
+ ×
108+54 256 ---81 128 ---GC 10.3 CAS 11.3
t i p
The TI-83/84 and TI-89 can be used to calculate binomial probabilities. In example 1 part a, enter binompdf(4,0.25,4). The quantities inside the brackets represent n, p, and the number of successes x. To view the probabilities for all possible values of x, enter binompdf(4,0.25); i.e. enter the same information as before without specifying the value of x. The probabilities are then listed in order from x= 0 to the highest possible value of x (in this case x= 4).
a The probability of five successes is given by: Pr(X = 5) = p5 (using tip from example 1)
= 0.95 = 0.59049
b The probability of three successes is given by: Pr(X = 3) = p3q2
= 10 × 0.93× 0.12 = 0.0729
c The probability of zero successes is given by: Pr(X= 0) =q5
= 0.15 = 0.00001
d The probability of fewer than three successes is equal to the probability of 0, 1 or 2 successes and is given by:
Pr(X< 3) = Pr(X= 0) + Pr(X= 1) + Pr(X= 2) = q5 + p1q4 + p2q3
= 0.15+ 5 × 0.91× 0.14+ 10 × 0.92× 0.13 = 0.00856
e The probability of at least one success is equal to the probability of 1, 2, 3, 4 or 5 successes and this is equal to 1 minus the probability of zero successes.
Pr(X ≥ 1) = 1 − Pr(X = 0)
= 1 −q5
= 1 − 0.15 = 0.99999
f The probability of at least four successes is equal to the probability of 4 or 5 successes, and is given by:
Pr(X≥ 4) = Pr(X= 4) + Pr(X= 5) = p4q1 + p5
= 5 × 0.94× 0.11+ 0.95 = 0.91854
Note that as there are only six possibilities (0, 1, …, 5 successes), it follows that Pr(X ≥ 4) = 1 − Pr(X ≤ 3).
So the probability required can also be found using the
binomcdf command by entering 1–binomcdf(5,0.9,3)
as shown in the screenshot at right.
⎛ ⎜ ⎝
⎞ ⎟ ⎠
5 3
t i p
In part d, we can use the binomcdf command of a TI-83/84 or TI-89. Enter binomcdf(5,0.9,2). The quantities inside the brackets represent n, p, and x, where X≤x. GC 10.3
CAS 11.3 ⎛
⎜ ⎝
⎞ ⎟ ⎠
5 4
⎛ ⎜ ⎝
⎞ ⎟ ⎠
5 3
⎛ ⎜ ⎝
⎞ ⎟ ⎠
Graphs of the binomial probability function
There are situations when it is useful to be able to view the graph of a binomial probability function. In this section we will consider the effect of varying the values of the two
parameters of the binomial distribution, n and p.
The effect of varying the value of
n
If we keep p constant (in this case we let p = 0.5) and vary n, we can generate the graphs shown for n = 5, 10, and 30 respectively.
t i p
How many calculations?
We often make use of the fact that the sum of the probabilities for all possible events in the sample space is equal to 1. We do this to reduce the number of calculations required. In example 2 part e, we only need to calculate one probability instead of five. If a much larger number of trials such as 1000 was considered, and we still required the probability of at least one success, the saving in numbers of calculations would be substantial.
p(x) n=5, p=0.5
4 5
0.1 0.15
0.05 0 0.2 0.25 0.3
3 2 1 0.35
x
p(x)
n=10, p=0.5
4 5 0.1
0.15
0.05 0 0.2 0.25 0.3
3 2
1 6 7 8 9 10 x
n=30, p=0.5
20 25 30
0.05
0 0.1 0.15 0.2
15 10
5 x
p(x)
We observe that the graphs are symmetrical when p = 0.5 and that as n increases, the graph gets closer to being a bell-shaped curve that characterises the normal distribution, which we shall meet later.
11.3BINPROB
CD
GC/CAS pr
ogram
t i p
The BINPROB program is useful in working with the binomial probability distribution. It is written for the TI-83/84 and TI-89 and is available from the Teacher CD. Ask your teacher for help with this.
The effect of varying the value of
p
If we keep n constant (in this case we let n = 10) and vary p, we can generate the following graphs for p = 0.25, 0.5, and 0.75 respectively. As seen earlier, p = 0.5
corresponds to a symmetrical graph as shown on the right.
If p < 0.5, the graph appears to be pushed to the left so that its tail is to the right. This means that most of the x values are to the right or positive direction of the mean of the graph. We say that graphs with these characteristics are positively skewed.
If p > 0.5, the graph appears to be pushed to the right so that its tail is to the left. This means that most of the x values are to the left or negative direction of the mean of the graph. We say that graphs with these characteristics are negatively skewed.
E x a m p l e
3
Let X ∼ Bi(6, 0.2) i.e. X has a binomial distribution with n = 6 and p = 0.2.
a Construct a table for this binomial distribution giving each probability correct to 4 decimal places.
b Hence construct a graph of the binomial probability function.
c Comment on the skewness of the graph.
d State the median and the mode of X. S o l u t i o n
a
Positively skewed distribution
n=10, p=0.25
4 5 0.1
0.15
0.05 0 0.2 0.25 0.3
3 2
1 6 7 8 9 10 x
p(x)
Symmetrical distribution
n=10, p=0.5
4 5 0.1
0.15
0.05 0 0.2 0.25 0.3
3 2
1 6 7 8 9 10 x
p(x)
Negatively skewed distribution
n=10, p=0.75
4 5 0.1
0.15
0.05 0 0.2 0.25 0.3
3 2
1 6 7 8 9 10 x
p(x)
CD
11.4Binomial distribution graphs
TA
I
t i p
In practice, if n is ‘large’ and p is ‘near’ 0.5, the graph will be ‘approximately’ symmetrical. As
n increases, the graph gets closer to a bell-shaped distribution even though p≠ 0.5. This idea is explored further in the TAI: Binomial distribution graphs.
x 0 1 2 3 4 5 6
b
c The graph is positively skewed.
d The median is 1 and the mode is 1. Note that the median and the mode can both be easily seen by observing the table. The median and the mode can often be read from the graph, but not with the same degree of accuracy.
exercise
11.3
1 State which of the following is binomially distributed. In those that are, define the random variable X and define the particular distribution in the form X ∼ Bi(n, p).
a A fair coin is tossed six times and we define success as the act of tossing a head.
b A six-sided die is rolled four times and we define success as the act of rolling a 5.
c Two cards are drawn from a deck of 52 playing cards and we define success as drawing a king.
d A baby is born and we define success as the baby being female.
e Three cards are drawn from a deck of 52 playing cards and each card is replaced before the next one is drawn. We define success as drawing a queen.
f Two people are chosen from a group of seven and we define success as the act of choosing the tallest person.
2 Calculate:
a b c d
3 If X ∼ Bi(7, 0.4), find:
a Pr(X = 2) b Pr(X = 4) c Pr(X ≤ 5) d Pr(X > 3)
4 If , find:
a Pr(X = 5) b Pr(X = 3) c Pr(X < 4) d Pr(X ≥ 2)
5 A fair coin is tossed six times.
a What is the probability that:
i two tails are tossed? ii four heads are tossed?
b Comm