Q1.1. You are recording the result of rolling two dice. The sample

Mathematics for Electrical Engineering | S2 Solutions
2001/2002
Q1.1. You are recording the result of rolling two dice. The sample space consists of the sum of values obtained.
Let A be the event that the sum is divisible by 3. B is the event that the sum is less than c7. C is the event
that the sum is divisble by 5. What are the events, S, A, B, C, A \ B, B [ C, and B ? Are A and C
disjoint?
A1.1. Assuming that the dice are cubes(!), then the sums obtained run from 2 to 12. Hence
S = (2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12):
The various events required are
A = (3; 6; 9; 12)
B = (2; 3; 4; 5; 6)
C = (5; 10)
A \ B = (3; 6) B [ C = (2; 3; 4; 5; 6; 10); B c = (7; 8; 9; 10;11;12):
The events A and C have no outcomes in common, and therefore they are disjoint. This is equivalent to
A \ C = .
Q1.2. Repeat question 1.1 for a pair of octahedral dice, i.e. ones with 8 faces.
A1.2. The sums now run from 2 to 16. Therefore we have
S = (2; 3; 4; 5; 6;7; 8; 9;10;11; 12; 13; 14; 15; 16);
A = (3; 6; 9; 12; 15); B = (2; 3; 4; 5; 6); C = (5; 10; 15);
A \ B = (3; 6); B [ C = (2; 3; 4; 5; 6; 10;15); B c = (7; 8; 9; 10; 11; 12; 13; 14; 15;16):
Events A and C have the outcome, 15, in common, and therefore they are not disjoint: A \ C = (15).
Q1.3. In set theory DeMorgan's laws are well known. They are
(A [ B)c = Ac \ B c
and
(A \ B)c = Ac [ B c :
Use Venn diagrams to check that these are correct. Verify the laws using the data given in question 1.1.
A1.3. The appropriate Venn diagrams consist of identifying the intersection (or union) of Ac and Bc and comparing
that with the complement of of union (or intersection) of A and B.
(A [ B)c
A
B
Showing the law (A [ B)c = Ac \ B c . This region is depicted
by those subregions displaying the symbol .
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
A
B
A\B
Showing the law (A [ B)c = Ac \ B c . This region consists of
everything outside of A \ B.
For the data of question 1.1 we have
A [ B = (2; 3; 4; 5; 6; 9; 12)
(A [ B)c = (7; 8; 10; 11)
)
Similarly we have
Ac = (2; 4; 5; 7; 8; 10; 11); B c = (7; 8; 9; 10;11; 12)
)
Ac \ B c = (7; 8; 10; 11):
Q1.4. Using Venn diagrams, graph and check the rules
A [ (B \ C) = (A [ B) \ (A [ C)
and
A \ (B [ C) = (A \ B) [ (A \ C):
Verify these rules using the results of question 1.2.
A1.4. Again, we have the Venn diagrams:
A
B
C
Showing the law A [ (B \ C) = (A [ B) \ (A [ C). This region
is depicted by those subregions displaying the symbol .
2
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
A
B
3
C
Showing the law A \ (B [ C) = (A \ B) [ (A \ C). This region
is depicted by those subregions displaying the symbol .
Using the results of Q1.2 we have
A = (3; 6; 9; 12;15)
and hence
and
B \ C = (5)
A [ (B \ C) = (3; 5; 6; 9; 12; 15):
On the other hand,
A [ B = (2; 3; 4; 5; 6; 9; 12; 15)
and
A [ C = (3; 5; 6; 9; 10; 12; 15);
and hence
(A [ B) \ (A [ C) = (3; 5; 6; 9; 12;15);
which is consistent with the rule. The second formula may be veried in the same way.
Q1.5. You have in your possession a dodecahedral die numbered from 1 to 12. What is the probability of rolling
(i) a prime number, (ii) an even number, (iii) either a number over 8 or an even number, (iv) both a prime
number and an even number.
A1.5. The number of outcomes in the sample space is 12. If A is the event whereby we obtain a prime number,
then A = (2; 3; 5; 7; 11), which is comprised of 5 outcomes. Given that each outcome is equally likely, then
P(A) = 125 . Similarly, we have
Even numbers:
Over 8 or even:
Prime and even:
B = (2; 4; 6; 8; 10; 12)
) P(B) = 126 = 12 :
C = (2; 4; 6; 8; 9; 10; 11; 12)
) P(C) = 128 = 23 :
D = (2)
) P(D) = 121 :
Q1.6. What is the appropriate addition formula for three mutually exclusive events? (Hint: sketch a Venn diagram).
Extend this to n mutually exclusive events.
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
4
A1.6. Suppose the three events are denoted by A, B and C. For three mutually exclusive events, the appropriate
Venn diagram is as follows.
A
B
C
The probability of the union of all three events is clearly the sum of the individual probabilities:
P (A [ B [ C) = P(A) + P(B) + P(C):
The more general case is as shown in the next Venn diagram.
A
(e)
(c)
(b)
(a)
(g)
(f)
B
(d)
C
In this diagram is shown the probability of each part of each intersection. These were constructed by rst
stating the probability of the triple intersection, A \ B \ C. Then the probabilities of the remaining parts
of the double intersections were found, and nally those parts of A, B and C which do not form part of the
intersections. Hence we get
P(A [ B [ C) = P(A \ B \ C)
+ [P (A \ B) , P(A \ B \ C)]
+ [P (A \ C) , P (A \ B \ C)]
+ [P (B \ C) , P(A \ B \ C)]
+ [P(A) , P(A \ B) , P(A \ C) + P(A \ B \ C)]
+ [P(B) , P (A \ B) , P(B \ C) + P(A \ B \ C)]
+ [P(C) , P (A \ C) , P(B \ C) + P(A \ B \ C)]
= P(A) + P (B) + P(C) , P(A \ B) , P(A \ C) , P(B \ C) + P(A \ B \ C):
Q1.7. Consider a roll of the dodecahedral die and determine P(A [ B [ C) where
A is the set of outcomes where an even number is obtained,
B is the set of outcomes where a multiple of 3 is obtained,
C is the set of outcomes where numbers over 7 are obtained.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
5
by sketching the Venn diagram for the situation. Find also P(A), P(B), P(C), P (A \ B), P(A \ C), P(B \ C)
and P(A \ B \ C).
Sketch a general Venn diagram of three arbitrary events, A, B and C, and determine the appropriate addition
formula for P(A [ B [ C). Verify that your formula is correct using the specic examples of A, B and C
given in the rst part of the question.
A1.7. We have the following Venn diagram,
S
A
2 4
6
8 10
12
11
C
3
B
9
1
5
7
As A = (2; 4; 6; 8; 10; 12), then P (A) = 12 . As B = (3; 6; 9; 12), then P(B) = 31 . As C = (8; 9; 10; 11; 12),
then P (C) = 125 .
From the Venn diagram, we have
A [ B [ C = (2; 3; 4; 5; 8; 9;10; 11; 12)
Further,
P (A \ B) = 122 = 16 ;
Finally, P (A \ B \ C) = 121 .
)
P(A \ C) = 123 = 14 ;
P(A [ B [ C) = 129 = 34 :
P(B \ C) = 122 = 16 :
Q1.8. In the
last example quite a few results derived earlier have been used. Make a list of these results (e.g.
P(Ac \ B c ) = 1 , P(A [ B)). Make sure that you are able to use a Venn diagram to prove them.
A1.8. I won't list this results | that is left for you. However, the book of Tables and Basic Formulae which is
available in the exams does not have such set theory formulae. Therefore it is important for you not only to
be familiar with the list of results, but also that you are able to derive them using Venn diagrams. I have a
copy and it is available for inspection.
Q1.9. The following Venn diagram shows the probabilities associated with the various subsets of the sample space.
Determine all three simple probabilities, P(A), P(B), P(C), all three intersections, P(A \ B), P(A \ C),
P(B \ C), and the intersection P(A \ B \ C). Find all six conditional probabilities. Which pair of events
out of A, B and C are independent?
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
6
S
A
0:1
0:2
0:2
0:15
B
0:1 0:05
0:2
C
A1.9. P (A) = 0:6, P (B) = 0:5, P(C) = 0:55.
P(A \ B) = 0:3, P(A \ C) = 0:3, P (B \ C) = 0:15.
P(A \ B \ C) = 0:1.
The conditional probabilities may be derived using the standard formula, such as P(AjB) = P (A \ B)=P (B),
or may be derived using rst principles from the Venn diagram.
\ B) 0:3
P (AjB) = P(A
P(B) = 0:5 = 0:6
\ B) = 0:3 = 0:5
P(B jA) = P(A
P(A)
0:6
Similarly, we get
P(AjC) = 116 ;
P (C jA) = 12 ;
P(B jC) = 113 ;
P(C jB) = 0:3:
From these results we see that
P(A) = P (AjB)
and
P(B) = P(B jA);
and hence the events A and B are independent.
Q1.10. Use a Venn diagram to determine a simple expression for P(AjB\C). The resulting expression for P(AjB[C)
is more complicated, but if it is written in terms of simple probabilities and probabilities of intersections it
has an aesthetically pleasing form; use a Venn diagram to determine this formula. What are the values of
conditional probabilities given the data in the last question?
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
7
A1.10. For P(AjB \ C) consider the Venn diagram,
A
B
C
Showing how P(AjB \ C) is derived. A \ B \ C is shown by ,
while B \ C is shown by .
We see that the only part of A which lies within B \ C is A \ B \ C. Hence
\ B \ C) :
P (AjB \ C) = P(A
P(B \ C)
Note that it is also possible to get this formula directly from P(AjD) = P(A \ D)=P(D) by setting D = B \ C.
For P (AjB [ C) consider the Venn diagram,
A
B
C
Showing how P (AjB [ C) is derived. A \ (B [ C) is shown by
, while B [ C is shown by .
The probability we require is the ratio of the probabilities of those events in A which are also in B [ C,
and those events in B [ C. Thus
\ (B [ C)) :
P (AjB [ C) = P(AP(B
[ C)
From the Venn diagram we see that
P (A \ (B [ C)) = P(A \ B) + P(A \ C) , P(A \ B \ C)
while
P (B [ C) = P(B) + P(C) , P(B \ C):
Hence
B) + P(A \ C) , P(A \ B \ C) :
P(AjB [ C) = P(A \P(B)
+ P(C) , P(B \ C)
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
8
Using the values given in Q1.9 we have
0:1 = 2
P (AjB \ C) = 0:15
3
0:5 = 5 :
P(AjB [ C) = 0:9
9
Q1.11. (CDH x28.6 Q5 on Page 897.) Components are made by machines A,B,C and D. Machine A makes 17% of
them, B makes 21%, C makes 20% and D makes the remainder. The machines are 96%, 89%, 92% and 92%
reliable, respectively. A component is picked at random. Calculate the probability that it is
(a) reliable
(b) not reliable
(c) reliable, given that it is made by machine B
(d) not reliable, given that it is made by machine D
(e) made by machine A given that it is reliable
(f) made by machine C given that it is unreliable.
A1.11. Once again the easiest way to answer this question is to draw a suitable Venn diagram:
R
0:17 0:96 0:21 0:89 0:20 0:92 0:42 0:97
0:17 0:04 0:21 0:11 0:20 0:08 0:42 0:03
A
B
C
D
The data given is:
P(A) = 0:17 P (B) = 0:21
P (RjA) = 0:96 P (RjB) = 0:89
P(C) = 0:20 P(D) = 0:42
P(RjC) = 0:92 P(RjD) = 0:97:
(a) In terms of outcomes, 0:96 of A lies in R and hence P(A \ R) = 0:96 0:17 = 0:1632: The other intersections
with R may calculated similarly. therefore
P (R) = P(RjA)P (A) + P (RjB)P(B) + P(RjC)P(C) + P(RjD)P (D) = 0:9415:
(b) Given that reliability and unreliability are mutually exclusive, then
P(Rc) = 1 , 0:9415 = 0:0585:
(c) Ths information is already given; it is P(RjB) = 0:89:
(d) Again reliability and unreliability are mutually exclusive. Hence
P (Rc jD) = 1 , P(RjD) = 0:03:
(e) Using the formula for conditional probabilities, we have
\ R) = 0:96 0:17 = 0:1733:
P (AjR) = P(A
P(R)
0:9415
(f) Again we have
c
\ R 0:20 (1 , 0:92) = 0:2735:
P(C jRc) = P(C
P(Rc) =
0:0585
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
9
Q1.12. A box contains 10 left-handed screws and 20 right-handed screws. Two screws are drawn. What is the
probability of drawing (i) two right-handed screws, (ii) at least one right-handed screw. How do these
probabilities change if the sampling is with replacement?
A1.12. With replacement rst. The probability of getting a left handed screw is
in all cases since screws are
20
replaced each time one is chosen. Likewise the probability of obtaining a right handed screw is 30
. Successive
events are independent. Denoting R1 as meaning obtaining one right handed screw, and L2 as obtaining two
left handed screws, etc., we have the following tree diagram
10
30
10
30
L2
L1 10
30
20
30
20
30
R1L1
10
30
R1
20
30
R2
10
20
10
= 19 , P(R2) = 20
= 49 and P(L1 R1) = 2 20
= 49 . Therefore the probability of
Hence P (L2) = 10
30 30
30 30
30 30
8
getting at least one right handed screw is P (R2) + P(L1R1 ) = 9 . This is, of course, the same as 1 , P (L2).
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
10
Without replacement: the probabilities now depend on how many screws remain after the the rst sample
is made.
Thus the probability of getting a second right handed screw given that one has already been taken
19
is 29
since there are 19 left out of a total of 29. The tree diagram is now
L2
9
29
L1 10
30
20
30
20
29
R1L1
10
29
R1
19
29
9
= 879 . Similarly P(R2) =
We have P(L2) = 10
30 29
getting at least one right handed screw is 78
.
87
R2
38
87
and P(L1R1) = 40
. Therefore the probability of
87
Q1.13. Determine the probability that 2 people drawn at random do not share the same birthday. If three people
are drawn, then what is the probability? Likewise for 4 and 5 people. How many people must be drawn at
random to obtain a probability that at least two people share the same birthday?
A1.13. We begin with the observation that any single person has a birthday! This gives us a reference date.
364
The probability that a second person does not share that birthday is 365
since there are 364 possible days
out of 365 which are dierent from that of the rst person. Obvious, really!
Now we have two reference dates.
The probability that a third person has yet a dierent birthday given that
the rst two are dierent is 363
. Therefore the probability that all three have dierent birthdays is 364
363
.
365
365
365
For 4 people to have dierent birthdays gives us a probability of
364:363:362 = 0:9836:
3653
For 5 people the probability is
364:363:362:361 = 0:9729:
3654
Continuing this way gives the following probabilities
for 22 and 23 people: 0:5243 and 0:4927. Therefore we
need 23 people for the probability to be less than 12 that no two share a birthday.
Q1.14. A tyre has a lifetime of 30000 miles with probability 0:9. What is the probability that 4 new tyres on a car
will exceed 30000 miles safely?
A1.14. For this question we have to assume that event is independent, since there is no further information given.
Therefore all four exceed their lifetimes with probability (0:9)4 = 0:6561.
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
11
Q1.15. What is the probability of obtaining at least one Six when rolling four fair dice?
A1.15. This is a Binomial distribution question. The solution is obtained by rst obtaining the probability of
obtaining no sixes: ( 65 )4 . The answer is, therefore,
P (at least one six) = 1 , ( 65 )4 = 0:5177:
Q1.16. Which option gives the higher probability of hitting the target at least once: (a) hitting with probability 0:5
and ring one shot, or (b) hitting with probability 0:25 and ring two shots? First guess, then calculate.
A1.16. For case (a) the answer is clearly P (H ) = 0:5. For case (b) we may use a tree diagram similar to those
1
above. At least one hit is equivalent to not getting two misses, and therefore the probability of at least one
hit is
1 , P (M2) = 1 , ( 43 )2 = 167 < 0:5:
Therefore getting at least one hit is more probable in case (a).
Q1.17. What is the probability of obtaining 2 sixes when throwing 10 dice? What if the dice are octahedral?
A1.17. The probability of getting 2 sixes given cubical dice is
10 1 2 5 8
2 ( 6 ) ( 6 ) = 0:29071:
When the dice are octahedral (assuming that they are numbered from 1 to 8) we get
10 1 2 7 8
2 ( 8 ) ( 8 ) = 0:24160:
Q1.18. Rework the wet day / dry day example above using a tree diagram.
A1.18. This was answered explicitly in one of the lectures.
Q1.19. Rework Q1.12 for `sampling without replacement' where three screws are sampled, using a tree diagram.
What is the probability of drawing 2 left-hand and 1 right-hand screw. Generalise this problem, and determine the probability of obtaining 3 right-hand and 2 left-hand screws on sampling 5 screws.
A1.19. Full security in getting the answer to this question will rely on a tree diagram similar to that on page 15 of
the printed lecture notes.
3 (10 9) (20)
P (L2 R1) = 1 30 29 28 = 0:2216:
5 (10 9) (20 19 18)
P(L2R3) = 3 30 29 28 27 26 = 0:35998:
It is possible to generalize this further by nding the probability of n left handed screws and m right handed
screws from an initial population of N and M, respectively. We get
, 1) (N , n + 1)] [M(M , 1) (M , m + 1)]
P (Ln Rm ) = n +n m [N(N
(N
+ M , 1) (N + M , n , m + 1)]
n + m N! + M)(N
M! (N + M , n , m)! :
=
n
(N , n)! (M , m)!
(N + M)!
12
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
Q1.20. The probability of failure of an aircraft engine in ight is 0:1. An aircraft may continue to y if at least half
its engines are operative. Is it better to y in a two-engined aircraft or a four-engined aircraft? (I wouldn't
y at all given these probabilities!) Use a tree diagram if you need.
A1.20. We will denote n working engines by En. For a two-engined aircraft. we need P(E ) + P (E ). This is the
same as 1 , P (E ). As P(E is the probability of two failed engines we have P(E ) = (0:1) = 0:01. Hence
1
0
0
0
we have a working aircraft with probability 0:99.
For a 4-engined aircraft we get the probabilities,
P(E0) = (0:1)4 = 0:0001
P(E1) = 4(0:1)3(0:9) = 0:0036
P(E2) = 6(0:1)2(0:9)2 = 0:0486
P(E3) = 4(0:1)(0:9)3 = 0:2916
P(E4) = (0:9)4 = 0:6561
The probability of a reliable aircraft is
2
2
P (E2 [ E3 [ E4 ) = 0:0486 + 0:2916 + 0:6561 = 0:9963:
Therefore it is better to have a 4-engined aircraft from a reliability point of view.
You may wonder therefore why modern wide-bodied aircraft such as the Boeings 767 and 777 are 2-engined
craft. The reason is that two engines of a given total power give much less noise pollution than a four-engine
set with the same combined power.
Q1.21. The probability that a component is defective is p. A box contains 20 components. What is the probability
that no more than 1 component is defective? In particular, what is this probability when p = 0:02 and when
p = 0:03? What value must p take if we wish this probability to be 0:9? (You will need to play with the
calculator to get this answer).
A1.21. If we let Dn be the event that n components are defective out of 20 components. Then we require P(D ) +
0
P(D1 ). We have
P(D0) = (1 , p)20 = q20
and
P(D1) = 20(1 , p)19p = 20q19(1 , q);
where p + q = 1. Hence
P (D0 ) + P (D1 ) = q20 + 20q19(1 , q) = q19(20 , 19q):
When p = 0:02 the probability is 0:9401. When p = 0:03 it is 0:8802.
A little ddling around with a calculator yields a probability of 0:9 when p = 0:0269141.
13
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
Q1.22. The following part of a circuit consists of four identical components whose probability of failure is p. The
circuit is regarded as reliable if there is at least one reliable path for the current to follow. Derive an
expression for the probability that the circuit is reliable. [Hint: in this case it is easier to enumerate all
possible cases, to assign probabilities to them, and to determine the probability of failure.]
A1
A2
A3
A4
A1.22. We shall label the four components as A (upper left), A (upper right) A (lower left) and A (lower right).
All work with probability (1 , p) . The circuit is reliable.
There are four ways in which only one component is defective, and each of these has probability p(1 , p) .
1
2
3
4
4
3
In these cases the circuit remains reliable.
There are 6 ways that two components may fail, and each of these has probability p2(1 , p)2 . Of these six
ways four yield reliable circuits: A1A2 , A1A4 , A2 A3 and A3 A4 .
There are 4 ways that three components may fail, each with probability p3 (1 , p). But all of these cases
yield unreliable circuits.
All four may fail with probability p4.
Adding all probabilities of the reliable cases gives
(1 , p)4 + 4(1 , p)3 p + 4(1 , p)2 p2
=
(1 , p2 )2:
The nal result was obtained after a little bit of factorisation.
Q1.23. What is the probability of obtaining 5 tails and 5 heads on tossing a fair coin 10 times? What is the
probability of obtaining 10 tails and 10 heads after 20 throws?
A1.23. Back to Binomials.......
P(T5 H5) =
10 1 10
5 ( 2 ) = 0:2461:
20 P (T10H10) = 10 ( 12 )20 = 0:1762:
Q1.24. In the lecture notes we determine how many throws of a coin were necessary to obtain 4 successive tails with
a probability exceeding 0:5. Your task now is to determine how many throws are required to obtain two
successive tails with probability of at least (1) 0:5, (2) 0:95 and (iii) 0:99. [You will need to use matlab to
perform the 3 3 matrix multiplications, or perhaps a pretty decent calculator could do it.]
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
14
A1.24. We will let A, B and C denote the same as in the lecture notes, namely \Last throw not a tail", \Last throw
a tail, but not preceded by a tail" and \Last two throws tails". Subscripts denote how many times the coin
has been tossed. The tree diagram is as follows
An
Bn
Cn
1
2
1
2
1
2
1
1
2
An+1
Bn+1
This translates into matrix/vector notation as follows,
0A1 n
0
@BA = @
( +1)
C
We begin with the vector
Cn+1
10 1
0
A (n)
0 0A @B A :
C
0 12 1
1
2
1
2
1
2
0 A 1 0 11
@ B A = @ 0A
(0)
C
0
since we have not yet thrown a tail. Successive multiplication by the matrix of probabilities gives the
sequence,
011 0 1 1 0 2 1 0 3 1 0 5 1
@ 0 A ! @ 212 A ! @ 414 A ! @ 828 A ! @ 16163 A :
1
3
8
0
0
4
8
16
Therefore we achieve 2 successive tails with probability 0:5 after 4 throws, as shown by the 3rd entry in the
last vector.
This probability rises to just above 0:9 after 12 throws and 0:99 after 23 throws.
15
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
Q2.1. You are given that f(x) = kx for ,1 x 1 is a probability density function. (i) what is the value of k?
(ii) What is the probability that x > 0:5? (iii) If P(x > c) = 0:5, then what is the value of c? (N.b. this
value is called the median.
2
A2.1. If f(x) = kx in the range ,1 x 1 is a pdf, then it must integrate to 1. Therefore
2
1=
(ii)
Z
1
,1
P(x > 0:5) =
(iii)
)
kx2 dx = 23 k
)
P(x > c) = 0:5
Z
1
:
05
1
2
3
2
k = 32 :
x2 dx = 167 :
=
Z
1
c
3
2
x2 dx = 12 , 21 c3;
and hence c = 0.
Q2.2. A p.d.f. is given by f(t) = 2e, t for t 0. (i) If 200 measurements of t are made, how many will be
2
greater than 1 on average? (ii) If 50% of measurements are less than k, then what is k? (iii) How many
measurements will give the value t = 0:5?
A2.2. For part (i) we have
Z1
P (t > 1) =
1
2e,2t dt = e,2 = 0:1353:
Therefore with a sample of 200 measurements we would expect roughly 200e,2 ' 27 to be greater than 1.
(ii) To nd the median, k:
Zk
1
=
2e,2t dt = 1 , e,2k :
2
0
Hence k = 12 ln 2 = 0:3466.
(iii) The answer is zero because the chances of getting a particular predetermined value out of an innite number
is zero. Mathematically, the integral is evaluated over a zero interval.
Q2.3. A p.d.f. h(x) is given by h(x) = (1 , x ) in the range jxj 1. Calculate (i) P (0 x 0:5); (ii) P(,0:3 x 0:7); (iii) P (jxj 0:5); (iv) P(x 0:8); (v) P(x > 0:8).
3
4
A2.3. (i) We have
2
P(0 x 0:5) =
Z
:
05
0
3
4
(1 , x2) dx = 11
= 0:34375:
32
= 0:6575.
(ii) P (,0:3 x 0:7) = 263
400
(iii) P(x 0:8) = 0:028.
(iv) P(x > 0:8) = 0:028.
Q2.4. Calculate the mean, median and mode of the discrete random variable, x, whose probability distribution is
x
P(x)
1
0:32
1:5
0:24
1:7
0:17
2:1
0:15
3:2
0:12
16
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
A2.4. The mean is
(0:32 1) + (0:24 1:5) + (0:17 1:7) + (0:15 2:1) + (0:12 3:2) = 1:668:
The median is 1:5 and the mode is 1.
Q2.5. Calculate the mean, median and mode of the discrete random variable, x, whose probability distribution is
x
P (x)
2
0:07
2:5
0:36
3:0
0:21
3:5
0:19
4:0
0:10
4:5
0:07
A2.5. The mean is 3:05, the median is 3 and the mode is 2:5.
Q2.6. What are the mean, median and mode of the results of the National Lottery in terms of the numbers of balls
guessed correctly? You may use the probabilities derived in an earlier lecture.
A2.6. The mean number of balls selected correctly in the National Lottery is
(0 0:4360) + (1 0:4130) + (2 0:1324) + (3 0:0177) + (4 0:0000969) + = 0:7349:
The median is 1 ball correct and the mode is 0 balls correct.
Q2.7. A random variable satises the uniform distribution, f(x) = 1 for 0 x 1. What are the mean, median
and mode for this distribution? What are the 3rd decile and 97th percentile. What is the interquartle range?
A2.7. A uniform distribution is trickier than it seems. At the very least one must distinguish between the meanings
of the mean value of a function, and the mean of a pdf. The mean value of the function f(x) = 1 is 1, but
the denition of the mean value of a pdf is
=
Z
1
0
x f(x) dx = 12
in this case:
Recall that an interpretation of the mean of a pdf is its centre of gravity.
R
The median, xm , satises 12 = 0xm f(x) dx. Hence xm = 12 .
The mode is usually that value of x at which the pdf attains its maximum.1 In this case it attains its maximum
everywhere between 0 and 1. Therefore we can take the mode as being 2 .
R
The 3rd decile satises 0:3 = 0d3 f(x) dx: Hence d3 = 0:3. Similarly p97 = 0:97.
Q2.8. Repeat the above question for the p.d.f. f(x) = (1 , x ) for ,1 x 1.
3
4
2
A2.8. The pdf is symmetric and attains its maximum at x = 0. Therefore the mean, median and mode are all 0.
The third decile satises
0:3 =
Zd
3
,1
f(x) dx:
After integration and a little bit of calculator work (perhaps using Newton's method; see later in the course)
we get d3 = ,0:2735. Similarly p97 = 0:7927.
Q2.9. Repeat the above question for the p.d.f. f(x) = 2 , 2x for 0 x 1.
p
A2.9. The mean is . The median is 1 , 1= 2 = 0:2929. The mode is 0. The 3rd decile is d = 0:1633 and the
1
3
97th percentile is p97 = 0:8268.
3
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
17
Q2.10. Is the mean value of a p.d.f. necessarily one of its possible outcomes?
A2.10. The answer is no. One can easily construct such pdfs. For example if we have f(x) = 1 in the ranges
0:5 < jxj < 1, then the mean is 0.
Q2.11. Find the mean, mode, median and standard deviation of the following data:
0, 2, 2, 3, 3, 3, 3, 5, 7, 8.
A2.11. The mean is
36
10
= 3:6. The mode is 3. The median is 3. The standard deviation is given by
n
X
2 = n1 x2i , 2 = 182
, (3:6)2:
10
i=1
Hence = 2:289.
Q2.12. Find the mean, mode, median and standard deviation of the following data:
0, 3, 3, 3, 3, 3, 3, 3, 3, 4.
A2.12. The mean is 2:8. The mode is 3. The median is again 3. The standard deviation is 0:9898.
Q2.13. Show that
v
u
N
uX
= t xi P(xi ) , :
2
2
i=1
A2.13. We expand the summation as follows,
2 =
=
=
=
=
N
X
i=1
(xi , )2 P(xi)
Nh
X
i=1
N
X
x2i P(xi) , 2xiP(xi) + 2 P(xi)
N
X
N
X
i=1
i=1
x2i P(xi) , 2
i=1
N
X
i=1
xiP(xi ) + 2
i
P(xi)
x2i P(xi) , 22 + 2
N
X
i=1
x2i P(xi) , 2 :
Q2.14. Find the mean and standard deviation of the scores obtained when tossing a coin four times with heads
counting 0 and tails counting 41 . If you are able to program Matlab for this, determine the mean and
1
standard deviation for 100 tosses with tails now counting 100
.
18
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
A2.14. The table of probabilities is
x
P (xi)
0
( )
1
4
1 4
2
1
2
1 4
2
4( )
1 4
2
6( )
1
3
4
4( 21 )4
( 12 )4
The distribution is symmetric and therefore the mean is = 12 .
The standard deviation is given by
2 =
X
4
i=0
(xi , 12 )2P(xi )
h
= ( 12 )4 ( 12 )4 + 4( 14 )2 + 6 02 + 4( 41 )2 + ( 12 )4
= 161 :
i
Hence = 41 :
For the 100 coin case it should be no surprise that the mean remains 21 . However, since I cannot program in
Matlab, I have had to do this case analytically by looking at N coin tosses. The standard deviation comes
out to be
= p1
2 N
1
and therefore = 20 for 100 coins. You may check this general formula against the above 4-coin case and
the 8-coin case given in the lecture notes.
Q2.15. Find the standard deviation of the National Lottery results where you should count each correct ball as a
score of 1 and each incorrect ball as a score of 0.
A2.15. The mean was calculated as 0:7349 in Q2.6.
We have
2 =
X
6
i=0
xi P(xi) , 2
= [02 0:4360] + [12 0:4130] + [22 0:1324] + [32 0:0177] + , 0:73492
= 0:5640 )
= 0:7510:
You may notice that this is a strange result because , (one standard deviation below the mean) lies
outside of the range of outcomes. This does happen occasionally, and especially when the distribution is
weighted heavily towards one end. For example, if we had the three outcomes, 0, 1 and 2 occurring with
probabilities 0:5, 0:4 and 0:1, respectively, then = 0:6 and = 0:6633.
Q2.16. A discrete random variable z has the probability distribution
z
,1
,0:5
0
P (z)
0:10
0:17
Find the mean, median, mode, and standard deviation.
0:40
A2.16. Mean=0:04, median=0 and mode=0. = 0:5598.
Q2.17. Show that an alternative form for is
=
2
Z1
,1
x2 f(x) dx , 2:
0:5
0:21
1
0:12
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
A2.17. This follows in the same way as the previous two reformulations:
Z1
=
(x , ) fx ) dx
2
=
=
=
Z,1
1
Z,1
1
Z,1
1
,1
19
2
x2 f(x) dx , 2
Z1
,1
x f(x) dx + 2
Z1
,1
f(x) dx
x2 f(x) dx , 22 + 2
x2 f(x) dx , 2 :
Q2.18. A continuous random variable has p.d.f f(x) = 1 for 0 x 1. What are its mean and standard deviation?
A2.18. The mean has already been calculated in Q2.7, apologies. It is = . We get
Hence =
q
2 =
1
12
1
2
Z
1
0
x2 dx , ( 12 )2 = 13 , 41 = 121 :
.
Q2.19. A more general form of the exponential distribution is
f(t) = e,t for t 0.
Check that it is a p.d.f.. Then nd its mean and standard deviation.
A2.19. We get
Z1
e,t dt = 1
Further, a little bit of integration by parts yields,
0
=
and
=
Z1
0
sZ 1
0
so f(t) is a pdf.
t f(t) dt = 1
t2 f(t) dt , 2 = 1 :
Therefore the exponential distribution has the mean equal to its standard deviation.
Q2.20. You are an avid trainspotter who lives near Oldeld Park. On average 10 passenger services and 1 goods
train pass per hour. Are you more likely to see 1 goods train than to see either 10 or 11 passenger trains?
A2.20. For Poisson distributions
an average of events per given period implies that the mean is and hence
, n
P(x = n) is e =n!. In this problem the mean for passenger trains is = 10. Therefore
,10 10
P (x = 10) = e 10!10 = 0:12511
and
,10 11
P(x = 11) = e 11!10 = 0:11374
Therefore the probability of observing either 10 or 11 such trains is the sum of these: 0:23885.
For goods trains the mean is = 1. Therefore
,1 1
P (x = 1) = e 1!1 = 1e = 0:24712:
Therefore it is marginally more likely that 1 goods train will be seen.
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
20
Q2.21. In a typical year a cutting edge consultancy with 500 Unix workstations nds that 2:5 break down. What is
the probability that there are two breakdowns on any particular day? What is the probability that all will
work satisfactorily on any day?
A2.21. The mean number which breakdown in a year is 2:5. Therefore the mean number per day is = 2:5=365 =
0:0068493. Therefore, as a Poisson distribution of events is assumed to apply, we have
,2:5=365(2:5=365)n
P (x = n) = e
:
n!
The required results are
P (x = 0) = e,0:0068493 = 0:99317 and P(x = 2) = 12 e,0:0068493(0:0068493)2 = 0:0000233:
Clearly a wise company.
Q2.22. A second rate engineering consultancy operates with 500 PCs running WindowsME. On average, during
any four-week period, 50 of these will require major servicing. What is the probability that there are two
breakdowns on any particular day? What is the probability that all will work satisfactorily on any day?
A2.22. This question may be answered in the same way as Q2.21. Here = 50=28 = 1:7857. Therefore the required
answers are
P (x = 0) = e,1:7857 = 0:1677 and P(x = 2) = 21 e,1:7857(1:7857)2 = 0:2673:
For the sake of interest, here are the probabilities of breakdown for various numbers of days, since most of
us, for some strange reason, tend to buy PCs rather than workstations.
P(x = 1) = 0:2994 P(x = 3) = 0:1591 P(x = 4) = 0:07104 P(x = 5) = 0:025372:
The equivalent numbers for the Unix example in Q2.21 are
P(x = 1) = 0:006803 P(x = 3) = 5:319 10,8 P(x = 4) = 9:108 10,11:
All I can say is that my PC at work crashes on average once a month, not that it is used for much, whereas
my Unix workstation has only recently needed to be switched o and on again for the rst time in 8 years.
Q2.23. The probability of getting one puncture per month on cycling to work is 4 times as great as the probability
of obtaining two punctures. What is the probability of getting (i) 3 punctures in a month, (ii) no punctures
in a month,and (iii) 2 punctures in one day?
A2.23. This is slightly dierent type of question since it does not give direct information about the mean of the
Poisson distribution. Rather, it gives relative information about two dierent probabilities. If we assume
that the mean is , then we know that
P (x = 1) = e, and
P(x = 2) = e, 2=2:
Hence
P(x = 1) 2
P(x = 2) = = 4
Therefore the mean number of punctures obtained in a month is = 12 The distribution gives
,0:5 n
P(x = n) = e n!0:5 :
Therefore P (x = 3) = e,0:50:53=3! = 0:012636 and P(x = 0) = e,0:5 = 0:60653.
If the mean per month is 12 , then the mean per day is 621 . Therefore, if we consider a day as the unit of time,
then
P (x = 2) = 12 e,1=62=622 = 1:2799 10,4 andP(x = 0) = 0:98400:
21
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
Q3.1. Determine an explicit form for the following sequences (note that possible explicit forms for the sequence, 1,
2, 4, 8, are x[k] = 2k with x[0] = 1 and x[k] = 2k, with x[1] = 1 and therefore answers are not unique):
(a) 1; ; ; ; ; (b) 1; , ; ; , ; ; (c) 0; p ; 1; p ; 0; , p ; ,1; , p ; 0; (d) 1; 0; , ; 0; ; 0; , ; 0; (e) 1; 0; ; 0; ; 0; ; 0; (f) 0; 0; 1; 3; 6; 10; 15; 21; (g) 1; ; ; ; ; ; 1
1
2
1
3
1
4
1
2
1
2
1
2
3
5
1
2
1
5
1
3
2
3
1
5
4
7
1
4
1
8
1
16
1
2
1
3
1
5
1
7
1
7
5
9
6
11
Write as many of the above as is possible in terms of a recurrence relation. Which sequences are convergent,
and what are their limits?
A3.1. (a) x[k] = k , k = 1; 2; . x[k] = k,k x[k , 1]; with x[1] = 1. The limit is zero.
(b) x[k] = (,1)k =2k , k = 0; 1; . x[k] = , x[k , 1] with x[0] = 1. The limit is zero.
(c) x[k] = sin( k ), k = 0; 1; . No simple recurrence relation. No limit, but it is bounded.
(d) x[k] = k sin( k ), k = 1; 2; . x[k] = , k,k x[k , 2] with x[1] = 1 and x[2] = 0. The limit is zero.
(e) x[k] = k sin ( k ), k = 1; 2; . x[k] = k,k x[k , 2] with x[1] = 1 and x[2] = 0. The limit is zero.
(f) x[k] = (k , k), k = 0; 1; . x[k] = x[k , 1] + k , 1 with x[0] = 0. No limit.
(g) x[k] = kk, , k = 1; 2; . x[k] = k,k k,k, x[k , 1], with x[1] = 1. Limit is .
1
1
1
2
4
1
2
2
2
1
1
2
2
2
1
2
2
(
(2
3)
1)(2
1)
1
2
Q3.2. What are the limits as k ! 1 of the following sequences?
3k , 1 ,
(a) x[k] = 1= log k,
(b) x[k] = 3kk ++100k
(c) x[k] = kk ++13 ,
,1
(d) y[i] = 5i , sin i
2
10
2
2
2i + 1 + i,1
A3.2. (a) 0,
(b) 13 ,
(c) 0,
(d) 52 .
Q3.3. Show that the terms in the sequence 1 +1 x , 1 ,1 x , 1 ,1 x , are in arithmetic progression, and nd the n
th
2
term of the sequence.
A3.3. If these terms are in arithmetical progression then they should have a common dierence. Checking it out,
we get
1
1 = 1
1 ,1 = x
,
2
1,x 1+x 1+x 1,x
1 , x2
and
1 , 1 = 1 1 , 1 = x :
1 , x 1 , x2 1 , x
1 + x 1 , x2
These are the same and therefore the sequence is an arithmetic progression. If we regard the rst term above
as being designated the rst term (i.e. k = 1), then the sequence may be written in the form
y[k] = 1 +1 x + (k , 1) 1 ,x x2 = 1 +1(k, ,x22)x :
Q3.4. The numbers 1, 2 + x, 1 + x , form a geometric progression, but only do so for the correct value of x. What
2
is that value of x? What is the value of the kth term in the series?
22
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
A3.4. If these terms are in geometric progression, then they have a common ratio. Hence
2 + x = 1 + x2
1
2+x
)
(2 + x)2 = 1 + x2
)
from which we get x = , 34 . The three terms are, therefore, 1, 45 ,
y[k] = ( 45 )k,1 for k = 1; 2; .
4 + 4x + x2 = 1 + x2 ;
25
16
. Hence the sequence is given by
Q3.5. Write down the general term of the following sequences and evaluate the 20th term of each.
(a) 5; 8; 11; 14; (b) 8; 4; 2; 1; (c) 1, 1:1, 1:21, 1:331, 1:4641, .
A3.5. (a) x[k] = 5 + 3(k , 1). x[20] = 62.
1
(b) x[k] = 16=2k . x[20] = 65536
.
(c) x[k] = (1:1)k,1. x[20] = 6:1159 to 4DP.
Q3.6. (a) An arithmetic progression has 6 as its 8th term and 15 as its 26th; what is the 51st term? (b) A
geometric progression has 12 as its 4th term and 96 as its 7th term; what is the 12th term?
A3.6. (a) A general arithmetic progression has the form x[k] = a + (k , 1)d. Using this we get x[26] , x[8] =
(26 , 8)d = 18d. Hence 18d = 15 , 6 = 9 and so d = . Using the 8th term we now have 6 = a + (8 , 1)
and hence a = 2 . The general term is now x[k] = 2 + (k , 1) , or, more concisely, x[k] = 2 + k. Hence
1
2
1
2
1
2
1
2
1
2
1
2
x[51] = 27 .
(b) Similar ideas may be used to show that the geometrical progression is given by x[k] = 43 2k = 3 2k,2.
1
2
Q3.7. Evaluate the rst 5 terms of the following sequences and determine their limits:
(a) x[k] = (x[k , 1] + 2) with x[1] = 0, (b) x[k] = x[k , 1] + 1=x[k , 1] with x[1] = 1.
1
3
1
2
A3.7. For case (a) we have
0 ! 0:666667 ! 0:888889 ! 0:962963 ! 0:98765 ! 0:995885;
which looks as though 1 is the limit. If we set X to be the limit, then
)
X = 13 (X + 2)
X = 1:
For case (b) we have,
1 ! 1:5 ! 1:416667 ! 1:414216 ! 1:414214 ! 1:414214;
and so we already have convergence. Using the same method we get
X = 12 X + X ,1
)
X2 = 2
)
p
X = 2:
Q3.8. Solve x[k] = 4x[k , 1] , 3x[k , 2] subject to x[0] = 1 and x[1] = 3. Verify your result by using the recurrence
relation for k = 2; 3; 4; 5.
A3.8. We obtain Ark = 4Ark, , 3Ark, and hence Ark, (k , 4k + 3) = 0. Therefore k = 1 or k = 3 and the
1
2
2
2
general solution is x[k] = A + B3k . When k = 0 then x[0] = 1; this means that 1 = A + B. The condition
x[1] = 3 gives 3 = A + 3B. Hence A = 0 and B = 1 and the solution is x[k] = 3k . To verify, we get the
sequence,
1 3 9 27 81 243 :
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
23
Q3.9. Find an expression for the general term of the Fibonacci sequence, for which x[k] = x[k , 1]+x[k , 2] subject
to x[1] = x[2] = 1.
A3.9. Using the usual technique we get
r2 , r , 1 = 0;
from which we get
and hence
p
r = 1 2 5
x[k] = A
If we set k = 1 and k = 2 in turn, we get
1 + p5 k
1=A
and
2
1 + p5 2
+B
+B
1 , p5 k
2
:
1 , p5 2
p
p
1 = A 3 +2 5 + B 3 ,2 5 :
Solution of these simultaneaus equations gives,
A = ,B = p1 :
5
Hence the Fibonacci sequence may be written in the form,
1 + p5 k 1 1 , p5 k
1
x[k] = p
,p
;
5 2
5 2
believe it or not.
Q3.10. Try to solve x[k] = 4x[k , 1] , 4x[k , 2] with x[1] = 2 and x[2] = 8 using the same technique. You will nd
that it will not work! So a bit of lateral thinking may be required: : :: : :
A3.10. We get r , 4r + 4 = 0 and therefore r = 2; 2. We cannot set x[k] = A2k because the application of x[1] = 2
2
yields A = 1, and this is incompatible with the given value of x[2]. So let's investigate the sequence by
evaluating
the rst 5 terms: 2, 8, 24, 64, 160. Still not obvious! But 2k must play a role, so let's calculate
x[k]=2k: 1, 2, 3, 4, 5. O.k. we must therefore have the solution x[k] = k2k . Clearly, then, for one repeated
value of r we have to take a general solution of the form
x[k] = (A + Bk)rk :
For the present problem, application of the values of x[1] and x[2] yields A = 0 and B = 1, and therefore
x[k] = k2k .
Q3.11. Houses increase in price by r% per year. If my house doubles in price in 12 years, what is the percentage
increase per year? (Musical corollory: What has this to do with Johann Sebastian Bach?)
A3.11. Let r% be equivalent to a factor x (i.e. x = 1 +
r
). Hence x12 = 2 and so x = 21=12 = 1:0594631 or
r = 5:94631.
Old J.S.Bach enters here because he was tired of having his keyboard tuned perfectly in C major which
meant that keys sounded increasingly badly as the number of ]s and [s increase. Therefore he invented the
equal temperament in which the ratio of frequencies of two neighbouring notes is always the same; this is the
reason for the existence of his well{known 48 preludes and fugues which use all 24 major and minor keys.
Given that 12 semitones are equivalent to an octave (i.e. a frequency ratio of 2), the semitone is dened as
a frequency ratio of 21=12 = 1:0594631.
Apologies to the nonmusicians: : :: : :
100
24
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
Q4.1. The Sierpinski carpet is an example of a fractal surface. It may be dened recursively as follows. Take a
square and divide it into 9 subsquares and remove the middle subsquare. This leaves the original square
with a hole in the middle. Now repeat this process for each of the 8 remaining subsquares by dening 9
subsubsquares for each subsquare and removing each central subsubsquare. Continue like this indenitely.
What is the area of the Sierpinski carpet compared with the original square?
The Sierpinski sponge may also be dened in a recursive fashion. Divide a cube into 27 equal subcubes and
remove the central subcube and all those subcubes with a face in common with the central one. Continue this
process ad innitum for each subcube, subsubcube etc.. What is the nal volume of the sponge compared
with that of the original cube? You might nd it entertaining to try to draw the sponge.
A4.1. If the original square has area equal to 1, then the removal of the central subsquare reduces it to . Similarly,
8
9
each subsquare has its area reduced by when each central subsubsquare is removed. The area is now ( 89 )2.
After removal of all central subsubsubsquares the area is reduced to ( 98 )3 . Applying the process n times
yields an area of ( 89 )n , and hence the area of the nal carpet is zero.
The same argument applies for the sponge except that the fraction 20is dierent.
Here 7 subcubes are excised
from the original cube. Hence after n such excisions the volume is ( 27 )n. Therefore the sponge has a volume
of zero.
8
9
Q4.2. Use the series Tn = (1 , 0 ) + (2 , 1 ) + (3 , 2 ) + + (n , (n , 1) ) to prove that Sn = Pnr r =
3
3
3
3
3
3
3
3
n(n + 1)(2n + 1).
P
P
Extend this idea to nd Cn = nr=1 r3 and Qn = nr=1 r4 (note that the latter is quite lengthy).
1
6
=1
A4.2. Clearly Tn = n and therefore
3
n3 =
n
X
n
X
r=1
r=1
Rearranging, we get
[r3 , (r , 1)3] =
[3r2 , 3r + 1] = 3Sn , 3 12 n(n + 1) + n:
Sn = 13 [n3 + 32 n(n + 1) , n] = 61 n(n + 1)(2n + 1):
P
When Cn = nr=1 r3 we use Tn = (14 , 04 ) + (24 , 14) + + (n4 , (n , 1)4). Hence Tn = n4 and so
n4 =
n
X
n
X
r=1
r=1
[r4 , (r , 1)4] =
[4r3 , 6r2 + 4r , 1] = 4Cn , 6Sn + 4[ 21 n(n + 1)] , n:
After much algebra we get
Cn = 14 n2 (n + 1)2 which is equal to
Similarly, we get
Qn =
n
X
r=1
n X
2
r=1
r :
r4 = 301 n(n + 1)(2n + 1)(3n2 + 3n , 1):
2
25
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
Q4.3. Triangular numbers form the sequence 1, 3, 6, 10, 15, , and may be represented as triangular arrays of
dots on the page. Each term in this sequence may be expressed as a series | for example the 5th term is
15 = 1 + 2 + 3 + 4 + 5. The nth triangular number (call it Tn ) is given by
Tn = 1 + 2 + 3 + + n = 12 n(n + 1):
P
If we now dene pyramidal numbers, Pn, according to Pn = nr=1 Tr , then this represents the stacking of
successive triangles above one another to form a triangular pyramid.
Find an explicit expression for Pn in terms of n. (Corollory: wrong time of year, I know, but how many gifts
did \my true love give to me" over the 12 days of Christmas. Count the partridge in a a pear tree as one
gift.)
A4.3.
P
P
P
P
Pn = nr=1 Tr = nr=1 12 r(r + 1) = 12 nr=1 r2 + 21 nr=1 r = 12 [ 16 n(n + 1)(2n + 1)] + 12 [ 21 n(n + 1)]: This may
be simplied to obtain Pn = 16 n(n + 1)(n + 2).
Therefore, on the 12th day of Christmas my true love gave me P12 = 364 gifts. Presumably one for each
shopping day of the year?
Q4.4. Sn =
1
1
+ 12 13 + 13 14 + 14 15 + + n1 n+1
. Express the general term, k1 k+1
, in terms of partial fractions and
hence nd Sn explicitly. What is limn!1 Sn ?
11
12
A4.4. Partial fractions yield k k = k , k and hence the series becomes
Sn = ( , ) + ( , ) + ( , ) + + ( n , n ):
Almost all the terms cancel out and we are left with Sn = 1 , n . Clearly limn!1 Sn = 1.
1
1
+1
1
1
+1
1
1
1
2
1
2
1
3
1
3
1
4
1
1
+1
1
+1
Q4.5. Find the sum of the rst N terms of series (a) and (b), and hence nd their sums to innity. Find the sum
to innity of (c).
(a) : + : + : + : + + N N :
(b) : : + : : + : : + + N N N :
(c) + + 2 + 3 + 4 + + NN,1 :
1
1
1
1
13
24
35
46
1
1
1
123
234
345
1
2
3
4
5
1
2
2
2
2
(
(
1
+2)
1
+1)( +2)
2
Hints: In parts (a) and (b) use partial fractions. The trick with part (c) is to use y(x) =
dierentiate.
N
X
N
X
P1 ( x )n and
n
=0 2
[ n , n ]. On writing this out in full we see that it comes to [1 + ,
A4.5. (a) We have n n =
n
n
N
N , N ] = [ , N N ]. Hence the sum to innity is .
(b) Using partial fractions we get n n n = [ n , n + n ]. Writing out the summation in full we
1
+1
have
N
X
1
+2
=1
1 3
2 2
1
( +2)
(
1
2
1
1
+2
1
2
=1
2 +3
+1)( +2)
1
2
3
4
1
( +1)( +2)
1 1
2
2
+1
1
+2
1
= 12 [(1 + 12 + 13 + + N1 ) , 2( 12 + 13 + + N1 + N1+1 ) + ( 13 + + N1 + N1+1 + N1+2 )]
n(n
+
1)(n
+
2)
n=1
= 12 [(1 + 12 ) , 2( 21 + N1+1 ) + ( N 1+1 + N 1+2 ] (all other terms cancel out)
1
= 41 , 2(N +1)(
N +2) :
The sum to innity is 41 .
P ( x )n then using the formula for the summation of a geometric series, we
(c) Using the hint, if y(x) = 1
n=0 2
get y(x) = 1=(1 , x2 ). If we dierentiate the series for y(x) with respect to x we get
1 (n,1) 1 h
2 3
i
X
y0 (x) = 12 n x2
= 2 1 + 2 x2 + 3 x2 + 4 x2 + :
n=0
The sum to innity of the original series is 2y0 (1). As y0 (x) = 2=(2 , x)2 , we have the sum, 4.
26
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
Q4.6. An extended version of an old English rhyme takes the form: As I was going to St. Ives, I met a man with
seven wives. Each wife had 7 cats, each cat had 7 kits [kittens] and kit had 7 mice. Man, wives, cats, kits
and mice, how many were going to St. Ives? Well, how many?
A4.6. The answer is 1. For it is I who was going to St. Ives. Sorry about that.
Q4.7. Dick Feynmann's problem: Given that 12 = 1728 use the Binomial Theorem to evaluate 1729 = to 3
3
decimal places.
A4.7.
1 3
1
17291=3 =(1728 + 1)1=3 = 12[1 + 1728
]1=3
1
1
=12[1 + ( 13 )( 1728
) + 12 ( 13 )(, 23 )( 1728
)2 + ]
=12[1 + 0:0001929 , 3:7 10,8 + ]
=12:002 using the rst two terms only.
Q4.8. Obtain the binomial series for (1 + x ), and hence nd a power series representation for tan, x. Use this
result to show that = 1 , + , + .
A4.8. If y(x) = tan, x, then y0 (x) = (1 + x ), . Given that y0 (x) = 1 , x + x , x + , we can integrate
term-by-term to obtain y(x) = x , x + x , x + . Note that the constant of integration is zero since
2
4
1
3
1
5
1
1
1
7
1
2
1
3
3
1
1
5
2
1
7
5
4
6
7
tan,1 0 = 0. The result for 4 is obtained on setting x = 1.
Q4.9. Use the binomial expansion of (1 + x)n, where n is a positive integer, to show that
n X
n
i=0
n
i =2
A4.9. Using the Binomial Theorem we have
n
X
(,1)i ni = 0:
i=0
and
(1 + x)n = n0 xn + n1 xn,1 + + n ,n 1 x + nn ;
and therefore when x = 1 we have the rst result immediately, and the second follows when x = ,1.
Q4.10. Write out the Binomial Expansions for both (1+x)n and (1+x, )n where n is an integer. Use these results
to show that
n h i
X
n
r=0
A4.10. We have
and
r
2
=
2n 1
n :
(1 + x)n = n0 xn + n1 xn,1 + + n ,n 1 x + nn
(1)
(1 + x,1 )n = n0 x,n + n1 x,n+1 + + n ,n 1 x,1 + nn :
(2)
The left hand side of the result we need to prove may be seen to be the x-independent coecient of the
product of the right hand sides of equations (1) and (2). This must be equal to the x-independent part of
the Binomial expansion of the product of the left hand sides of (1) and (2), which is
(1 + x)n (1 + x,1)n ;
or, equivalently,
(1 + x)2n :
(3)
xn
The term we want is the coecient of xn in the Binomial expansion of (1 + x)2n which is
2n n :
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
27
Q6.1. Given the vectors, a = (1; 0; 1), b = (2; 1; 2) and c = (0; 1; 1), evaluate the following:
(a) a + b (b) a + b + 2c
(c) b , 2a
(d) jaj
(e) jbj
(f) ja , bj
(g) ^a (h) ^b (i) a b
1
2
where a^ is the unit vector in the a direction.
A6.1. (a) a + b = (3; 1; 3)
a + 12 b + 2c = (2; 52 ; 4)
b , 2ap= (0; 1; 0)
p
jaj = p 12 + 02 + 12 = 2
jbj = 22 + 12 + 22 = 3 p
ja , bj = j(,1; ,1; ,1)pj = 3
^a = a=jaj = (1; 0; 1)= 2
^b = ( 23 ; 31 ; 23 )
i j k (i) a b = 1 0 1 = (,1; 0; 1)
2 1 2
(b)
(c)
(d)
(e)
(f)
(g)
(h)
Q6.2. The vectors a and b are directed along adjacent sides of a parallelogram. Find an expression for the angle
between the lines joining the opposite corners of the parallelogram. Hence show that these diagonals intersect
at right angles only when the parallelogram is a rhombus.
A6.2. After drawing a suitable sketch it is straightforward to see that the vectors which join the opposite corners
of the parallelogram must be (a + b) and (a , b). If is the angle between these two lines, then
(a + b):(a , b) = ja + bj ja , bj cos :
The left hand side of this last expression may be multiplied out:
(a + b):(a , b) = a:a , b:b:
Hence cos = (jaj2 , jbj2)=ja + bj ja , bj.
Since cos = 0 only when jaj = jbj, then the diagonals intersect at right angles only when all four sides are
of the same length, that is, when the shape is a rhombus.
Q6.3. Show that the vectors (2; ,4; ,1), (3; 2; ,2) and (5; ,2; ,3) form the three sides of a triangle (i.e. that
they are co-planar). What is the length of each side? Show that the triangle is right angled.
A6.3. The usual way of determining whether or not three vectors are coplanar is to evaluate their scalar triple
product. However, in this case we need to test a stronger result, namely that when two of the vectors are
added or subtracted we obtain the third. If the three vectors are denoted by a, b and c, respectively, then
a + b = (5; ,2; ,3) which is precisely c.
The length of the sides are given by
p
jaj = (4 + 16 + 1)1=2 = 21
p
jbj = (9 + 4 + 4)1=2 = 17
p
jcj = (25 + 4 + 9)1=2 = 38:
Pythagoras's theorem holds for a right angled triangle. Here we have jaj2 + jbj2 = jcj2. Using a vectorially
based method we have a:b = 0, and hence these two sides are orthogonal.
Q6.4. Prove that the four points with position vectors (2; 1; 0), (2; ,2; ,2), (7; ,3; ,1) and (12; 2; 4) are coplanar.
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
28
A6.4. The three vectors which join these points are,
a = (2; 1; 0) , (2; ,2; ,2) = (0; 3; 2)
b = (2; ,2; ,2) , (7; ,3; ,1) = (,5; 1; ,1)
c = (7; ,3; ,1) , (12; 2; 4) = (,5; ,5; ,5)
The test for coplanarity is that the scalar triple product is zero. Here a b is
i j k a b = 0 3 2 = (,5; ,10; 15):
,5 1 ,1
Hence a b:c = (,5; ,10; 15):(,5; ,5; ,5) = 0, and the points are coplanar. Note that if a, b and c lie in
the same plane, then a b is perpendicular to c, and hence a b:c = 0.
Q6.5. Use vectorial methods to nd the internal angles of the triangles ABC where
,!
(i)
OA = (1; 3); ,!
OB = (4; 6); ,!
OC = (,3; 7);
,!
(ii)
OA = (,1; 3; 1) ,!
OB = (2; 6; 2) ,!
OC = (3; 3; 8):
A6.5. (i) From the position vectors of the three vertices we obtain the following vectors along the sides of the
triangle:
,!
AB = ,!
OB , ,!
OA = (3; 3);
,!
BC = ,!
OC , ,!
OB = (,7; 1);
,!
AC = ,!
OC , ,!
OA = (,4; 4):
p
p
p
From this we get jAB j = 3 2, jBC j = 5 2 and jAC j = 4 2. Hence, for vertex A we have:
,!
AB:,!
AC = 0
) = 90
while for vertex B:
and for vertex C:
,!
BA:,!
BC = 18 = 30 cos ) cos = 35
) = 53:13
,!
CA:,!
CB = 32 = 40 cos ) cos = 45
) = 36:87:
In all three cases the vectors used in the dot products use the vertex as the reference point.
(ii) From the position vectors of the three vertices we obtain the following vectors along the sides of the
triangle:
,!
AB = ,!
OB , ,!
OA = (3; 3; 1);
,!
,!
,!
BC = OC , OB = (1; ,3; 6);
,!
AC = ,!
OC , ,!
OA = (4; 0; 7):
p
p
p
From this we get jAB j = 19, jBC j = 46 and jAC j = 65. Hence, for vertex A we have:
p p
,!
AB:,!
AC = 19 = 19 65cos while for vertex B:
p p
) cos = 19= 65
,!
BA:,!
BC = 0
and for vertex C:
p p
,!
CA:,!
CB = 46 = 46 65cos ) = 57:27
) = 90
p p
) cos = 46= 65
) = 32:73:
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
29
Q6.6. ABC is a triangle with vertices at the points0 given
by the
position vectors, a, b and c. If the midpoints of
0
0
the sides opposite0 A, B0 and C are0 labelled A , B and C , respectively, then use vectorial methods to show
that the lines AA , BB and CC meet at a point.
A6.6. It is essential to sketch the triangle and to label all six points, A, B, C, A0 , B 0 and C 0.
The vectors along the three sides of the triangle are
,!
AB = b , a
,!
BC = c , b
,!
AC = c , a:
From your diagram of the triangle, it clear that
,,!0 ,! 1 ,!
AA = AB + 2 BC = (b , a) + 21 (c , b) = ,a + 12 b + 12 c:
Therefore the line joing the points A and A0 is given by
r = a + (,a + 12 b + 21 c:)
Similarly the line joining points B and B 0 is given by
s = b + (,b + 12 a + 21 c):
At their point of intersection we have r = s and therefore
(1 , )a + 12 b + 12 c = 12 a + (1 , )b + 12 c:
On equating the coecients of a, b and c we nd that
1 , = 12 1
2
= 1,
= :
Hence we get = = 23 which indicates that the point of intersection is 23 of the way from the vertex to the
opposite midpoint. Given this, the point of intersection is
r = s = 13 (a + b + c):
Now, although two specic lines out of the three were taken, the symmetry of the answer is enough to show
that we would get the same result if a dierent pair of lines were chosen. Therefore all three intersect at a
common point.
Note that the line from a vertex to the opposite mid point is called a median, and that the point of
intersection of the three medians is called the centroid.
Q6.7. (a) Find the vector equation of the line through the points with position vectors, a = (2; 0; ,1) and
b = (1; 2; 3).
(b) What is the equivalent Cartesian form of this equation?
(c) Does this line intersect with the line through the points with position vectors, c = (0; 0; 1) and d =
(1; 0; 1)?
(d) Do either of these lines intersect with the line through the points with position vectors, e = (0; 4; 5)
and f = (3; ,2; ,1)?
A6.7. (a) The equation of the line is given by
r = (2; 0; ,1) + [(1; 2; 3) , (2; 0; ,1)] = (2; 0; ,1) + (,1; 2; 4);
where is an arbitrary parameter. Note that the line travels in the direction given by a , b.
(b) In terms of Cartesian coordinates the line becomes,
x = 2 , ;
y = 2;
z = ,1 + 4:
30
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
It is possible to eliminate the parameter by substituting = 2 , x:
y = 4 , 2x and z = 7 , 4x:
(c) The second line, that between c and d, is given by
s = (0; 0; 1) + [(1; 0; 1) , (0; 0; 1)] = (0; 0; 1) + (1; 0; 0);
where is arbitrary. If these two lines intersect then r = s for some value of and some value of . If this
is so, then
(2; 0; ,1) + (,1; 2; 4) = (0; 0; 1) + (1; 0; 0):
Taking the three components in turn we get
2 , = ; 2 = 0; ,1 + 4 = 1;
for which there is no solution and hence no intersection.
(d) The third line is given by
t = (0; 4; 5) + (3; ,6; ,6)
If r = t then
2 , = 3; 2 = 4 , 6; ,1 + 4 = 5 , 6:
1
Hence = 1 and = 3 and the point of intersection is (1; 2; 3).
If s = t then
= 3; 0 = 4 , 6; 1 = 5 , 6:
2
Hence = 2 and = 3 and the point of intersection is (2; 0; 1).
Q6.8. (a) Find a general formula for the shortest distance of the point with position vector a to the line through
the point with position vector b which is in the direct c.
(b) The corresponding formula for the shortest distance between two lines is very complicated indeed, but
it may be broken down into more manageable pieces. Determine how you would nd this distance if one line
passes through b1 in the direction c1 and the other passes through b2 in the direction c2 . Apply the formulae
to the case,
b1 = (1; 0; 0) c1 = (0; 1; 0) b2 = (1; 1; 1) c2 = (1; 1; 1):
A6.8. (a) The line is r = b + c. And we require (r , a):c = 0 to ensure that the vector from the point to the
line is perpendicular to the direction of the line. Hence
r:c = a:c ) b:c + c:c = a:c ) = (a ,c:cb):c :
Therefore the perpendicular distance is
jr , aj = b , a + (a ,c:cb):c c:
(b) The two lines are r1 = b1 + 1c1 and r2 = b2 + 2c2 . A line joining a point on one line with a point on
the other line has direction r1 , r2. If this latter line is perpendicular to the given lines, then we require
(r1 , r2):c1 = 0 and (r1 , r2 ):c2 = 0:
Hence we have
(b1 , b2 ):c1 + c1:c1 , c1 :c2 = 0
and
(b1 , b2 ):c2 + c1 :c2 , c2:c2 = 0:
This is a pair of simultaneous
linear
equations
for and , the solution
of which may
be written in the form,
1
,c2:c2 c1:c2 (b1 , b2):c1
= (c1 , c2):(c1 , c2 ) ,c1:c2 c1:c1 (b1 , b2):c2 :
Given these values of and the required answer is
jr1 , r2 j = jb1 , b2 + c1 , c2j:
For the given vectors we get
,3 1 ,1 1 1
2
= 2 ,1 1 ,2 = , 1 :
2
Hence r1 = (1; ; 0) and r2 = ( ; ; ), and the required perpendicular distance is
1
2
1
2
1
2
1
2
q
1
2
.
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
31
Q6.9. Find the unit vector which is perpendicular to both (1; 4; 1) and (2; 1; ,1).
A6.9. A vector which is perpendicular to the two given is obtained by taking the cross product:
i j k (1; 4; 1) (2; 1; ,1) = 1 4 1 = (,5; 3; ,7):
2 1 ,1
p
p
The magnitudep of this third vector is 52 + 32 + 72 = 83. Hence the unit vector in the same direction is
(,5; 3; ,7)= 83.
Q6.10. (a) Find the equation of the plane through the points with position vectors,
a = (1; 1; 1) b = (0; 1; 2) c = (,1; 1; ,1):
(Hint: you will need to nd two independent vectors in the plane and use two arbitrary constants.) In this
case can you simplify the resulting equation?
(b) Now allow the position vectors a, b and c to be arbitrary and write down the equation of the plane
through these points. Find p, a vector which is perpendicular to the plane, and multiply the equation for
the plane by p to obtain an alternative form for the equation which does not use arbitrary constants. Obtain
a similar equation using the information in part (a).
A6.10. (a) The vectors a , b and a , c both lie in the plane. Here
a , b = (1; 0; ,1) and a , c = (2; 0; 2):
Given that a corresponds to a point in the plane, we may write the equation for the plane in the following
form:
(1)
r =a + (a , b) + (a , c)
=(1; 1; 1) + (1; 0; ,1) + (1; 0; 1)
In Cartesian coordinates we have
x = 1 + + ;
y = 1 z = 1 , + ;
and therefore the plane is given by y = 1. (Note that it is more usual to eliminate the two arbitrary constants
and to obtain an equation of the form x + y + z = .
(b) Equation (1) above is the general form of the equation of the plane. A vector, p, which is perpendicular
to the plane must be perpendicular to the two chosen vectors which lie in the plane, a , b and a , c. Therefore
we take
p = (a , b) (a , c):
If we now take the scalar product of equation (1) with p, we obtain
r:p = a:p + (a , b):p + (a , c):p:
Given the denition of p, the last two scalar products must be zero, and hence
r:p = a:p
is the general equation for the plane where a is the position vector of any point within the plane and p is
a vector which is normal to the plane. (Note that it is more customary to use the unit normal, n, where
n = p=jpj, and therefore r:n = a:n is the usual form of this equation.)
Returning to the specic case given in part (a), the normal to the plane is given by
(a , b) (a , c) = (0; ,4; 0):
The corresponding unit vector normal to the plane is (0; 1; 0), by inspection. Hence the equation of the plane
is
r:(0; 1; 0) = (1; 1; 1):(0; 1; 0) = 1:
Therefore, in Cartesians, we get y = 1.
Mathematics for Electrical Engineering 2001/2002 | S2 Solutions
32
Q6.11. [Lengthy] Find the equation of the line through (,1; 5; 3) which cuts at right angles the line through the
points (-1,0,1) and (3,2,1). What is the minimum distance of the given point from the given line? What is
the equation of the plane containing the two lines, and how close to the origin does the plane get?
A6.11. The given line satises the equation,
r = (,1; 0; 1) + [(3; 2; 1) , (,1; 0; 1)] = (,1; 0; 1) + (4; 2; 0):
The minimum distance of the line from the point (,1; 5; 3) is when
[r , (,1; 5; 3)]:(4; 2;0) = 0:
This takes place when = 21 , and hence the nearest point on the line to the given point is (1; 1; 1).
The smallest distance between the given point and the given line is
p
j(1; 1; 1) , (,1; 5; 3)j = j(2; ,4; ,2)j = 12 2:
Hence the equation of the line joining the given point and (1; 1; 1) is
s = (,1; 5; 3) + [(1; 1; 1) , (,1; 5; 3)] = (,1; 5; 3) + (2; ,4; ,2):
The equation of the plane containing the vectors (2; ,4; ,2) and (4; 2; 0) and which passes through (1; 1; 1)
is
t = (1; 1; 1) + (2; ,4; ,2) + (4; 2; 0):
The nearest approach to the origin is when the position vector, t, is perpendicular to both (2; ,; 4; ,2) and
(4; 2; 0). Using the dot product of t with these vectors in turn we nd that = 16 and = , 103 . Therefore
theqpoint of nearest approach to the origin is t = 152 (1; ,2; 5). And therefore the distance of nearest approach
is 158 .
Q6.12. My house has a south-facing aspect. From my front door I walk 1 mile south, followed by 1 mile east and
then 1 mile north, whereupon I have returned to my house. A bear chooses that moment to walk past. What
colour is the bear?
A6.12. Perhaps this is a vectors question, but it is not to do with Cartesian coordinates. The only way I can travel
in way described and return to my house is if it is at the North Pole. Clearly the bear is white.