Professional Documents
Culture Documents
Caroline's Bucket of Poo
Caroline's Bucket of Poo
Caroline's Bucket of Poo
Quiz
Anthony Quinn
Instructions:
• Enter your student number below. Enter your name, student number and signature
at the bottom of the last page, and fold over.
Student Number:
1
Q1: Consider three propositions, S1 , S2 and S3 , such that S1 is a necessary condition
for S2 . Also, S1 is a necessary condition for S3 . There are no other logical constraints.
Furthermore:
Pr[S1 ] = 0.7,
Pr[(S2 ∧ S3 ) | S1 ] = 0.4.
Complete your probability model in any consistent way, and hence evaluate
Pr[S1 | S2 ∨ S3 ].
2
Q2: Consider three Bernoulli nodes (i.e. random variables), C, E1 and E2 , such that E1
and E2 are conditionally independent and identically distributed given C. Furthermore:
1
Pr[C = 1] = ,
4
1
Pr[E1 = 1 | C = 1] = Pr[E1 = 0 | C = 0] = .
3
Evaluate Pr[E2 = 0 | E1 = 0].
3
Q3: The probability parameters of a 4-state homogeneous Markov chain are:
2
0 61 1
1
3 6 2
1 2
1
1
6 3
0 6
4
T= 1
, p1 = ,
1
1 2
6 6 3
0
8
1 1 2 1
0 6 6 3 8
where, as usual, T is the transition probability matrix and p1 is the initial probability
vector.
Evaluate the probability that the first and third symbols have the same state.
4
Q4: Each component mass-produced by a factory is faulty with probability 0.1. In a
quality control exercise, a sample of 99 of these components is examined.
(i) Most probably, how many components will be faulty in this sample, and what is
this probability?
(ii) What is the least probable number of faulty components in this sample, and what
is this probability?
5
Q5: Images in a database are each classified into one of four classes, Cj , j = 1, 2, 3, 4,
where Pr[C1 ] = 0.5, Pr[C2 ] = 0.3 and Pr[C3 ] = 0.15. Consider the next four classified im-
ages. Write down an expression—which you do not need to evaluate—for the probabilty
that fewer of these four images will be classified as C1 than C2 .
6
Q6: Cars pass a particular point on a two-way, east-west road in both directions, with
the average rate being 5 cars per minute from east to west, and 3 cars per minute from
west to east. Given that altogether 7 cars passed this point in the last minute, what is
the probability that the majority of these pased from east to west?
7
Q7: A mobile phone user checks her phone on average 1.2 times per minute during a
particular period of the day. Consider the following three propositions relating to her
usage at this time of the day:
S1 : she checks her phone once in the next minute;
S2 : she checks her phone once in the second-next minute;
S3 : she checks her phone once in the interval of time between 90 seconds and 150 seconds
from now.
Demonstrate that these three propositions are not independent.
Name:
Student Number:
Signature:
8
313 Annual Quiz 2019 Solutions 9 1119
Q1
3
u 22
Prfs Szasz a
Bfsi 53 5 Prk 0.4 0.7 s 0.28
15 n
sing 0.22
Oc e
1
L N
I 0
I To 73
E
11
s
2
3 43
BE Ben I Be
Pfc II D BE j s's
Isis
Pfc.nl ojE7zyj ys
2g t Ix
element
77 144
Pr proposition It If 3
4
N Binomial n 99 o
p
D
Dp to modes are at N 9 and N 10
RIN 9 Vio
In p 2x Prfw b n p
2 193 ix 989
QIN 9 n e 3 P I 199
Green Ps fn In po 95 ix 999 I
to f Ex 34 x I t is x 35.21
to
54.33 x L
QI Jew 5 min
y 5 3 8 min
use 3 min
e III x e E e te e tessie
8 1 18 137
e
7
Tutorial 5 i
Solutions 22 10 19
22
M she misses a lecture
Prfm 21.520 V L2 on 521
Lecture
p p
Student
is in chooses
M27 M 20
f x L t f x s s
misses the Ah next lecture These are iid BTs with ps's
s
RIN 31ns p d
P n
the no of
missedlectures
among the next 5
attempts
23
s A 133,43 15,6
U
12,3435 15,6
U
12,3436 15,6
U
countably infinite
344
Prfs
26
Denote N k the no of error free days is 3h
4 0,1 2
0.95k
Prf N k m
PrIN h N a 85
night 9
Totp
0ghx Fo 0.8k x
Prf N 3h 0.95 s x t
27
Ri E
f 2 3 4 4 Candidates i l 2 12 42voters
B
a
3 313 3
b
Prf P
In 7 7 E 3 binomial amputation
I interpreting the
am
proposition asmeaning that
I receives the majority of 12votes
rather than assuming it means she receives
more than each of the others in which case we must
measure evaluate the probability of ma More elementary
propositions
Prfc so
to 13 binomial the first 3 propositions
Pr n
Prfan permutation of thebases
4 x
F x F x
3
Pr
iv I PYNE
syn 3
n
6 Pc
s
i
It would be best to assume this means atleast 2 C's
at atleast 2 A's might have been d d eh less ambiguously
2 2 6
Prf Na
n n
c
Prf i 2 Novo 2
I
a
nose
Pr 3 2,1 t
Prf2,3 I t
Prf4 2,0 t Prf2,4 J t Prf3,3OJ
is
ta5f5f5i
aI tI i t a
µ Interpreting consistently
Aldo l n
Nca Naa
n ia 13513 t t t
Pr n
Prf6666 v Cccc v
AAAA v TT TT
HI't t
Lviii Pr n
I Ps any way of partitioning 6 bases in 4
numbers all different
Q1: Consider a digital source generating length-5 quaternary (i.e. four-state) words.
How many distinct such words are there, and under what assumptions is it valid
to assign equal probability to each?
Q2: Three of the weekly lectures in a course take place in M20, the 4th in M21. A
particular student does not read the timetable, and so randomly chooses one of
these venues for each lecture. What is the probability that she misses at least 3 of
her next 5 lectures?
Q3: A gambler repeatedly throws a die until he observes a 5 or a 6. Specify the set of
events associated with the proposition, S =‘he throws the die more than 4 times’,
and evaluate Pr[S].
Q5: The sequential output of a binary source is observed until a 1 is released. Consider
propositions “N = k” meaning “the position of the first 1 is k”, so that k =
1, 2, 3, ....
Q7: 4 candidates stand for election before an electorate of 12 voters. Historically, the first
candidate has been twice as popular as any of the others. Stating any assumptions,
and justifying any probability model you use, compute
(i) the probability that all the candidates receive the same number of votes;
1
(ii) the probability that the first candidate receives the majority of the votes;
(iii) the probability that only 3 of the 4 candidates receive votes.
Q8: The CRISPR gene editing technology probes a DNA sequence at various points,
recording the base (G, C, A or T) at each point. For this sequence, it is known
that the frequencies of occurrence of the bases are in a ratio of 4:2:2:1, respectively.
Imposing and stating any reasonable assumptions, address each of the following:
(i) How many distinct recordings of length 4 are there? Which is the most prob-
able, and which the least? Evaluate the probability of each.
(ii) What is the probability that each base appears in a length-4 recording?
(iii) What is the probability that the first T appears somewhere between the 5th
and the 10th points?
(iv) What is the probability that at least 2 C’s appear in a length-6 recording?
(v) What is the probability that 2 C’s and 2 A’s appear in a length-6 recording?
(vi) What is the probability that a G, a C and an A appear in a length-5 recording?
(vii) What is the probability that a length-4 recording contains only one base?
(viii) What is the probability that a length-6 recording contains the same number
of certain bases?
3E3 Tutorial 4 Solutions 3 12 19
3 D element of T
a
PrfSz B
Is R
L's t
toy
b There are 3 6 elementary propositions making this true
G x f x t x
Fj Ip x t TNF I
p o
n
his new I above
dynamics must be
Amc etciteyspecifeh
Specify T s
I I column sums si
Then revert to a ash b proceeding as before In b the
States remain indistinguishable
IE E E a Ex's Exit
45
144
b 6 x x zx f
Qb
10100101010001 for example
sl
I Rfs sit 2
elicitingIspecifying
ftp si Pr si oJ
Llb7Prfm
l Prf3bitsequaY
l 2xfx'gxtg I
a as above a
value is 9
The minimal 5 2 occurring when there are no toggles
0000000000 or Il 11
3E3 Tutorial 4 (Sequential Experiments with
Dependence, and Markov Chains)
Anthony Quinn
8th October 2019
Q1: Students can take as many as three exams in a particular subject, in an attempt
to gain credits for that subject. In the summer exam, the pass rate is 70%, it’s
60% in the autumn, and 30% in the ‘specials’. Stating any assumptions, answer
the following:
(a) What is the probability that a student gains credits in this subject?
(b) In a class of 100 students, what is the probability that exactly 15 gain credits
in the autumn?
Q2: A certain football team has a 50:50 chance of making it through the first round of
a league, and a 60% chance of making it through the next round to the final. If it
gets to the final, it has a 70% chance of winning.
(a) Set up a probability space for this context, specifying the three elements of the
probability triple.
(b) In a sense, this is a sequential experiment. Define the sample space for each
of the sub-experiments.
(c) Find the probability that the team will reach the final.
Q3: Consider a sequential experiment with sample space, Ω. The sample space for
the ith sub-experiment is Ωi , i = 1, . . . , n. Bearing in mind your experience in
the previous questions, comment on the general relationship between ]Ω and ]Ωi ,
i = 1, . . . , n.
Q4: Rafael returns the tennis ball five times more often than not. In this respect, he is
50% better than Marin. Propose a simple two-state dynamic for the ball, specifying
all parameters.
(a) If Rafael currently has the ball, what’s the probability that he also has it after
two strokes?
(b) What is the probability that Marin has the ball after 10 strokes?
Q5: A student owns 3 pairs of socks: red, green and blue ones. He tries not to wear the
same pair two days in a row.
(a) If he wears the red pair on the first day, what is the probability he wears the
blue pair on the third?
1
(b) What is the probability that he wears all three pairs on three consecutive days?
(c) Re-evaluate your answers to (a) and (b) if he forgets his intention half the time.
0 12 0 1
0 0 1 0
T= 2
1 1 0 0 .
2
0 0 12 0
Q8: An object moves between regions A, B and C, being reflected always from A to B,
and absorbed by C. Complete your Markov chain model of these dynamics.
(a) Intuitively, what is the long-run behaviour of this system? Can you verify this?
(b) If the object does not start in C, what is the probability it is still not there
after 4 steps?
(c) It is noted that the object is in region B after 2 steps. Re-evaluate your last
answer.
Q9: In Q7, let there now be four regions, A, B, C and D, such that A is reflective (into
B), and D is also reflective (into C). You identify a drift in the dynamics, with the
object advancing (in the direction of higher-lettered regions) 10% more often than
retreating. Repeat Q7 in this case.
Q10: A binary source in telecommunications (i.e. a sequential generator of 1s and 0s)
toggles twice as often as not.
Q11: In a computer game, the square screen of side l is divided into a number of regions:
(i) the inside and outside of a centred circle, C, of radius 4l ; (ii) the inside and outside
of a centred circle, c, of radius 10l ; and (iii) the upper-half, H, and lower-half screens.
The dynamics of the ball during one-second intervals are studied and the following
are noted:
1. If inside c at the start of the interval, the ball always appears outside c but
inside C at the end of that interval; if inside C initially, it appears inside c a
second later, in 10% of cases;
2. If inside C initially, it is still there a second later, in 30% of cases; if outside
C, it stays there in 80% of cases;
3. If inside H initially, it is still there a second later, in 70% of cases; if outside
H, it stays there in 40% of cases;
Stating any assumptions that you make, specify an appropriate Markov chain model
for the dynamics of the ball. Hence, specify the computations needed—in Matlab
for instance—to evaluate each of the following probabilities:
(a) if the ball starts inside c, the probability that it appears inside C after 5
seconds;
(b) if the ball starts inside c, the probability that it appears outside H after 5
seconds;
(c) the probability that the ball appears inside H but outside C after 5 seconds;
after 10 seconds.
Q12: [HARD] A carpark with 5 places has a barrier control system which ensures that
a maximum of one car can enter in any one-hour period. There is no restriction
on the number of cars that can leave. There is no overnight parking allowed, and
the operating hours of the carpark are from 08:00 to midnight. In any hour, the
probability of there being a car seeking entry is 0.1 and, if admitted, it will not
leave within the hour. The probability that any previously parked car leaves in the
next hour is also 0.1. Specify a model for the number of cars in the carpark at any
hour of the day, stating your assumptions. Using Matlab judiciously, address each
of the following:
(a) What is the probability that there are no cars in the carpark at noon?
(b) If there are 3 cars at 14:00, what is the probability that the carpark will be
full at 17:00?
(c) If the carpark is full at 17:00, what is the probability that there were at least
3 cars at 14:00?
(d) What is the probability that the carpark is not full at midnight?
Q13: [EASIER] Address Q12 again, where the only change in wording is ”The proba-
bility that a car leaves in the next hour is also 0.1”. Criticize this model.
353 Tutorial 3 7 11 19
23
a
Prfl I I V O o o
PrifB 1 Bz o BI RIB 1 a Bz o
PrlBz o
V
Numerator Prf I I O I o o
sprfol.IR iljerlytPrplojPrplDPrlD
P 3
Y3x43xptYzxY3xp
Denominator PslI I o v l o o v Ost o v Osoof
73 73 xp t 43 5 xp t 13 43 fp t 4343 4 p
Ya s e
Re
fi 2,34
iii
b
PfH1 Rl GIRI117 Prl't 05 x I
0.02
72g
Prf
210 L o s N o 3 I as
Os TE 5
5 S TE lo
AT
t is
2 0.2
12 partition sets at most 11 probability parameters required
Those parameters 6 specified in the question are indicated
At least the following 2 parameters must be elicited specified
o 06 o 02
t.io
must be E K
eg O l readyspecified
0.2
Must be E I t
e g O2 A seat
specified
0.3
prfoaieis.INPrlN
must be E Ya f Tt2f
o 03
e g 0.4 Specified 0.3
0.4 0.3 0.12
Similarly we at theleast of it must split
the probability specified here as shown o z
1
0.05
x 0.5
eg Oy x 0.5 I 0.05
ss
814tsisf o.rs oz z o
TN
1 IN Exp in s.tn
BIT lol N e If In oi 2
1 II n
Expt s.tn Prftsis I e In 2
GIVEN
BI PIT 15
4 Prf
Then PrfLIT is
Prft is
5
I 0.5
e Io s t e
n
Io.rs t e 0.2
3
2 0.5
0 19
3 5
2 0.5 t 2 0.3 t 2 xD 3
212
13 pps
8
S H 53 4 52
531st
I
ss n San Sznsy
Hsfsa x Prky
3E3 Tutorial 3 (Conditional Modelling and
Independence)
Anthony Quinn
3rd October 2019
Q1: There are two coins, one unbiased, one showing heads twice as often as tails. A coin
is chosen and tossed.
Q2: In a gambling game of two steps, a player tosses a coin. If heads, she then rolls
a die. If tails, she then tosses the coin again. Stating your assumptions, evaluate
each of the following:
Q3: A digital source releases 3-bit binary words. In any word, each bit is twice as
probable to have the same value as the preceding one than otherwise. Stating any
other assumptions, find
(a) the probability that all three bits in a word are equal.
(b) the probability that not all three bits are equal.
(c) the probability that the first bit is 1 if the last bit is 0.
Q4: A computer game can be played a one of three levels: easy, medium and hard. 30%
of players play at the easy level and 60% at the medium level. All players have a
game-assigned skill level, ranging from 1 (super) to 4 (awful). 50% of easy-level
players have rank 1, 20% of medium-level players have this rank, and 5% of hard-
level players have this rank. At each level, the numbers achieving the other ranks
are about equal.
(a) What is the most probable rank for a player of this game?
(b) What is the probability that a rank-1 player is playing at the hard level?
Q5: Prove that two mutually exclusive propositions cannot be independent unless at
least one of them has probability zero.
1
Q6: A dart is thrown at a dartboard of radius one unit. Consider the two propositions,
S1 ≡ “the dart lands at most a half a unit from the centre/bullseye”; and Sx ≡
“the dart lands between 41 and x units from the centre/bullseye”. Stating your
assumptions, deduce a value for x such that these propositions are independent,
and interpret x geometrically.
Q7: Two real numbers are selected at random in the interval [0, 1]. Consider the propo-
sitions:
Q8: Consider three propositions, S1 , S2 and S3 , with probabilities 0.7, 0.6 and 0.6 re-
spectively. Given S3 , the first two propositions have probabilities 0.9 and 0.8 re-
spectively. S1 and S2 are jointly true with probability 0.72 if S3 is true, and they
are jointly true with probability 0.2 if S3 is false. Verify that S1 and S2 are condi-
tionally independent given S3 , but they are not (marginally) independent. Deduce
the probability of all the propositions inducing the partition of the sample space.
Q9: 100 patients participate in an experimental drug trial. 60 are women. After 6
months, the drug is found to be effective in 50% of the women, and 60% of the
men. At this time, all patients for whom the drug was ineffective are changed to a
new drug, while everyone else is kept on the original drug. After 6 more months, it
is found that the new drug is effective in 60% of the women, and 80% of the men.
Find the probability that
Q10: 50% of calls handled by a telephone exchange are local, 30% are national, and
the remainder are international. It is noted that half of the international calls last
more than 15 minutes, half of the national calls last more than 10 minutes, and
half of local calls last more than 5 minutes. Establish a complete probability model
(e.g. specify the probability triple, (Ω, A, Pr[·])) for this problem, and hence find a
bound on the probability that
Q11: In Fig. Q11, A and B are locations of two base stations and 1, 2 and 3 are the pos-
sible locations of a mobile phone. x is a measure of distance. A phone is connected
to one, and only one, base station with probability proportional to the inverse of
the phone’s distance from the base station. Stating any other assumptions, find
(a) the probability that one phone is connected to A and the other to B, given
that there are 2 phones;
(b) the probability that all phones are at location 1, given that there are 6 phones
in all, with 3 of them connected to base station A, and three to B.
Q2: Two cards are drawn from a standard pack without jokers. Propose a (strictly)
necessary condition, and also a (strictly) sufficient one for the proposition that the
sum of the two cards is 17. Here, the number value of a picture card is 0. Do your
answers depend on whether there is replacement of the first card? Adopting any
consistent probability model, evaluate the probability of the proposition, both with
and without replacement.
Q3: The time, TA (days), to failure of mechanical device, A, is measured. Prior experi-
ence leads to the assignment of the probabilities, 0.34 and 0.54, to the propositions,
TA > 4.3 and TA > 2.5, respectively. Are these assignments consistent? Deduce
the probability that TA ≤ 2.5 given that TA ≤ 4.3.
Q4: The uncertain experiment described in Q3 is augmented also to test the proposition,
TB ≤ 1.0, in respect of another mechanical device, B, with which A interacts.
Complete your probability model for this UE in any consistent way you wish,
making sure to state your assumptions, and hence evaluate the probability that
TB > 1 given that 2.5 < TA ≤ 4.3.
Q5: Consider three propositions, S1 , S2 and S3 . The latter two are mutually exclusive.
Write down an expression for the probability of Pr[S1 ∨ S2 ∨ S3 ], stating the number
of degrees of freedom in your probability model.
Q6: Prove the identity, Pr[S1 ∨ S2 ] = Pr[S1 ] + Pr[S2 ] − Pr[S1 ∧ S2 ]. Can you extend your
answer to N ≥ 2 propositions? Can you prove the union bound in this way?
Q7: Consider three propositions, S1 , S2 and S3 , with probabilities 0.2, 0.1 and 0.6 re-
spectively. Write down an inequality for Pr[S1 ∨ S2 ∨ S3 ].
Q8: In Q7, S1 and S2 are mutually exclusive. The probability of each is 0.1 if S3 is true.
(i) Deduce Pr[S3 |S 2 ]; and (ii) verify your answer to Q7.
Q9: ECG electrodes are used to measure the cardiac potential difference between various
attachment points on a patient’s chest. The following is a set of n = 14 such pairs
of measurements, (v1,i , v2,i ), i = 1, . . . , n (in mV, rounded to one decimal place):
1
v1,i -2.0 -2.8 -4.9 1.3 -0.1 2.5 -1.8 -0.6 -0.7 -2.7 4.1 -3.1 -0.4 -3.3
v2,i -1.4 -0.8 1.4 -0.0 -1.1 -0.2 1.9 -0.8 -1.2 3.6 0.8 -1.2 1.1 -3.3
Stating any assumptions that you make, use the data above to establish a complete
probability model for this uncertain experiment, specifying the probability triple.
Hence, evaluate S2 ∨ S3
Q10: Compute the probability of winning the Irish national lottery next Saturday night,
stating your assumptions.
Q11: An urn contains three red balls and one green ball. Three balls are selected at
random, without replacement. What is the probability that the selection includes
the green ball. Compare your probability model with the one you used in Q10 and
comment.
Q12: Repeat Q11 if you replace each ball after drawing it.
Q13: An urn contains 2 red and 3 green balls. Three balls are drawn at random without
replacement. What is the probability of (i) 2 red balls in the draw, and (ii) the
sequence RRG. Repeat your work if each ball is replaced after drawing.
Q14: Using the axioms of probability, state and prove the identity relating Pr[S] to
Pr[S].
Q15: Deduce the chain rule of probability for N > 1 probabilities. Return to Q8 and
calculate Pr[S1 ∧ S2 ∧ S3 ] using this rule, and also directly via the Venn diagram.
Q16: The DNA is composed of sequences of 4 bases, G, C, A and T. (i) What is the
probability of a run of 3 bases, each with the same state? (ii) What is the probability
of a run of n bases, each with the same state, expressing your answer as a function
of n? State your assumptions.
Q17: I receive 100 emails in a 5-day period and note that 35 of them are spam. What
is the probability that the next 20 emails I receive include no more than 5 spam
emails? Explain your assumptions and reasoning fully.
Tutorial 2 Solutions 22 10 19
23
I3
min o 9 I
0.9
There are 3,4 4 distinguishable selections only one
of which satisfies the proposition Adopting Bayes postulate
uniform probability modelling Prf I s
f
Qb
For maximal simplicity but not accuracy AMC model tater
will capture dependency assume He bases are sequentially
independent with
Po Prfs G O SP L I
R s Pr Isis c EB L
Pp Jefee 3
P
3
Prf run of 3 equal bases s
Ps t P Pf t P
is Prfan of n 1 equal bases Pan t Pan t Pan t
En
217
The relative frequency of spam emails in the historic random
sample was 34 so estimate Prfanemail will be spam in future p 35
0.35k x o 6520
PIN 55 20 0.351 7 x
ABQ 241419
3E3 Tutorial 2 (Discrete Probability Modelling)
Anthony Quinn
23rd September 2019
Q2: Two cards are drawn from a standard pack without jokers. Propose a (strictly)
necessary condition, and also a (strictly) sufficient one for the proposition that the
sum of the two cards is 17. Here, the number value of a picture card is 0. Do your
answers depend on whether there is replacement of the first card? Adopting any
consistent probability model, evaluate the probability of the proposition, both with
and without replacement.
Q3: The time, TA (days), to failure of mechanical device, A, is measured. Prior experi-
ence leads to the assignment of the probabilities, 0.34 and 0.54, to the propositions,
TA > 4.3 and TA > 2.5, respectively. Are these assignments consistent? Deduce
the probability that TA ≤ 2.5 given that TA ≤ 4.3.
Q4: The uncertain experiment described in Q3 is augmented also to test the proposition,
TB ≤ 1.0, in respect of another mechanical device, B, with which A interacts.
Complete your probability model for this UE in any consistent way you wish,
making sure to state your assumptions, and hence evaluate the probability that
TB > 1 given that 2.5 < TA ≤ 4.3.
Q5: Consider three propositions, S1 , S2 and S3 . The latter two are mutually exclusive.
Write down an expression for the probability of Pr[S1 ∨ S2 ∨ S3 ], stating the number
of degrees of freedom in your probability model.
Q6: Prove the identity, Pr[S1 ∨ S2 ] = Pr[S1 ] + Pr[S2 ] − Pr[S1 ∧ S2 ]. Can you extend your
answer to N ≥ 2 propositions? Can you prove the union bound in this way?
Q7: Consider three propositions, S1 , S2 and S3 , with probabilities 0.2, 0.1 and 0.6 re-
spectively. Write down an inequality for Pr[S1 ∨ S2 ∨ S3 ].
Q8: In Q7, S1 and S2 are mutually exclusive. The probability of each is 0.1 if S3 is true.
(i) Deduce Pr[S3 |S 2 ]; and (ii) verify your answer to Q7.
Q9: ECG electrodes are used to measure the cardiac potential difference between various
attachment points on a patient’s chest. The following is a set of n = 14 such pairs
of measurements, (v1,i , v2,i ), i = 1, . . . , n (in mV, rounded to one decimal place):
1
v1,i -2.0 -2.8 -4.9 1.3 -0.1 2.5 -1.8 -0.6 -0.7 -2.7 4.1 -3.1 -0.4 -3.3
v2,i -1.4 -0.8 1.4 -0.0 -1.1 -0.2 1.9 -0.8 -1.2 3.6 0.8 -1.2 1.1 -3.3
Stating any assumptions that you make, use the data above to establish a complete
probability model for this uncertain experiment, specifying the probability triple.
Hence, evaluate S2 ∨ S3
Q10: Compute the probability of winning the Irish national lottery next Saturday night,
stating your assumptions.
Q11: An urn contains three red balls and one green ball. Three balls are selected at
random, without replacement. What is the probability that the selection includes
the green ball. Compare your probability model with the one you used in Q10 and
comment.
Q12: Repeat Q11 if you replace each ball after drawing it.
Q13: An urn contains 2 red and 3 green balls. Three balls are drawn at random without
replacement. What is the probability of (i) 2 red balls in the draw, and (ii) the
sequence RRG. Repeat your work if each ball is replaced after drawing.
Q14: Using the axioms of probability, state and prove the identity relating Pr[S] to
Pr[S].
Q15: Deduce the chain rule of probability for N > 1 probabilities. Return to Q8 and
calculate Pr[S1 ∧ S2 ∧ S3 ] using this rule, and also directly via the Venn diagram.
Q16: The DNA is composed of sequences of 4 bases, G, C, A and T. (i) What is the
probability of a run of 3 bases, each with the same state? (ii) What is the probability
of a run of n bases, each with the same state, expressing your answer as a function
of n? State your assumptions.
Q17: I receive 100 emails in a 5-day period and note that 35 of them are spam. What
is the probability that the next 20 emails I receive include no more than 5 spam
emails? Explain your assumptions and reasoning fully.
3153 Tutorial 1 22 10 19
22
N fs E 2 s
Sn Tz 25 S
b N 3s is 2 Ss
NG S e 2 I
5ms
A Acb Ac
o.cm
i Es
in
S as S
ie 9h52 is SUFFICIENT for S and alsofor 52
S as s
Proceeding similarly
r
s V Sz D U Az
s
I fi e.s.us
Ii
r
F
a
5 5 a nai
S a S sufficient for 9
S a
SI and Sa are mutually exclusive i e
r
Sasi A Sz Sp
F
Isr Asi Sol mutual exclusive
SIG Nsa sp l n n
24
X a.m
exclusive
Ss and Ingo are mutually
exclusive
125 r
z
Ay
partition to
Jasa v sans K 10
S S Sz Sy US partitionsubsets
O n O
0 h l n
u
O n I n
O n
l
U v
O n O n
I n
I I n
Sr n
Sz SI
V
E n
Sz n
Sz n Su
V
B n Iz n
Sz a
Sy
ne logical constraint S a
52 Sz
partition 7
Az
3E3 Tutorial 1 (Propositional Logic and Partitions)
Anthony Quinn
18th September 2019
Q1: I have a coin and a die, and I play a game of chance. I toss the coin until I see
heads (H), and then I roll the die. If, however, I have not tossed H after 5 tosses,
I advance to the die anyway.
(i) What type of experiment is this? Specify the sample space, Ω.
(ii) Propose any pair of propositions that are logically related. State that rela-
tionship, and specify the induced partition of Ω.
(iii) If the game is changed to remove the stopping condition, attempt (i) and (ii)
again.
Q2: β-particles (i.e. electrons) impinge on a detector, and a measuring device records
the absolute time of each such event. Stating your assumptions, address each of
the following:
(i) Consider (indexed) propositions, N (t) ≤ k (meaning “the number of particles
in the next t seconds (s) is no greater than k”), and T3 > t3 (meaning “the
time to the third-next particle is greater than t3 (s)”). Provide any suitable
values of k, t and t3 that induce (a) necessity, (b) sufficiency and (c) equiva-
lence, respectively, between the two propositions. In each of these three cases,
specify the induced partition of Ω and provide one elementary outcome in each
partition subset.
(ii) Consider all k-indexed propositions above. Specify the induced partition of
Ω. Is it discrete or continuous?
(iii) Consider all t3 -indexed propositions above. Specify the induced partition of
Ω. Is it discrete or continuous?
Q3: Consider two propositions, S1 and S2 , defined in the the context of an uncertain
experiment. Also consider (compound) propositions, S1 ∧ S2 , S1 ∨ S2 , S1 ∧ S2 and
S1 ∨ S2 . For each of these four propositions, state the logical relationship (if any)
between it and each of S1 and S2 , respectively.
Q4: Consider proposition, S, and propositions, SN and SS , which are, respectively,
necessary and sufficient conditions for S. In respect of each of the following pairs
of propositions, what, if any, logical constraint exist between them: (i) SN and SS ;
(ii) S and SS ; (iii) S ∧ SN and SS ?
Q5: Consider four propositions, S1 , . . . , S4 , defined in the the context of an uncertain
experiment. S1 ⇒ S2 and S1 ∧ S3 ≡ S∅ . No other logical constraints are to be
assumed.
1
(i) Illustrate the induced partition of Ω (via a Venn diagram), and specify its size.
(ii) Consider the proposition, S1 ∧ S2 ∨ (S3 ∧ S4 ). Illustrate its event set on
your diagram in (i). Hence, re-express this proposition (only) via propositions
whose events are partition subsets.
Q6: We monitor two moving components in a mechanical assembly, and are interested
in when each will fail. In particular, we are concerned with each of the following
propositions:
• S1 ≡ “it will take more than a year for the first component to fail”;
• S2 ≡ “it will take more than 6 months for the second component to fail”;
• S3 ≡ “the second component will fail before the first one does”.
(i) Illustrate the induced partition of Ω (via a Venn diagram), and specify its size.
(ii) Specify one elementary outcome in each partition subset.
Q7: I roll three dice, one red, one green and one blue. The respective outcomes (number
on the face) are R, G and B, respectively. Consider the propositions:
• S1 ≡ “R ≥ G”;
• S2 ≡ “G ≥ B”;
• S3 ≡ “R, G and B are all odd”;
• S4 ≡ “R + G + B > 10”.
Ω = {ω1 , ω2 , ω3 , . . . } (2)
2 Stochastic Independence
S1 ⊥
⊥ S2 ⇒ P [S1 ∩ S2 ] = P [S1 ]P [S2 ] (4)
3 OR Union Lemmas
P [S1 ∪ S2 ] = P [S1 ] + P [S2 ] − P [S1 ∩ S2 ] (5)
P [S1 ∪S2 ∪S3 ] = P [S1 ]+P [S2 ]+P [S3 ]−P [S1 ∩S2 ]−P [S1 ∩S3 ]−P [S2 ∩S3 ]+P [S1 ∩S2 ∩S3 ] (6)
1
n−1
[
P[ Si ∩ Sn ] ≥ 0
i=1
n
[ n−1
[
P[ Si ] ≤ P [ Si ] + P [Sn ]
i=1 i=1
n
[ n−1
X Xn
∴ P[ Si ] ≤ P [ Si ] + P [Sn ] = P [ Si ]
i=1 i=1 i=1
5 Conditional Independence
S1 ⊥
⊥ S2 ⇒
P [S1 ∩ S2 ∩ S3 ] = P [S1 |S2 ∩ S3 ]P [S2 |S3 ]P [S3 ] (9)
= P [S1 |S3 ]P [S2 |S3 ]P [S3 ]
2
9 Multinomial Probability Law
m
X
ni = n
i=1
m
X
pi = 1
i=1
11 Transition Probability
The M xN transition matrix is a stochastic matrix because each column sums to 1
t11 . . . t1N
T̄ = . . . tij ... (15)
tM 1 . . . tM N
3
12.1 Time Invariance
Simplest relaxation of independence is for each outcome to depend only on the previous
outcome
P [Sn = j] = P [(Sn = j) ∩ SΩ ]
⇒ P [Sn = j] = P [(Sn = j) ∩ ((Sn−1 = 1) ∪ (Sn−1 = 2) ∪ · · · ∪ (Sn−1 = M ))]
Using axiom 3 and the Chain Rule:
P [Bi ]: These are the M probabilities in P n−1 , where P n−1 is the marginal (total) proba-
bility vector at step n − 1
P n = T̄ P n−1 n = 1, 2, 3, . . .
¯ =0
det(T̄ − λI) (19)
λk1 0
Λ̄k = (20)
0 λk2
¯ n=0
(T̄ − λn I)V (21)
V11 V21
V̄ = (22)
V12 V22
4
1 V22 −V21
V̄ −1 = (23)
det(V̄ ) −V12 V11
X ∼Ber(p) (25)
Summarise the Bernoulli Model using the binomial PMF, n ≡ # iid Bernoulli Trials
N ∼Bi(n, p) (26)
k̂ {0, 1, . . . , n}
5
(M > (L + L0 )) is sufficient for (M > L0 )
q L+L0
⇒ = qL
q L0
∴ P [(M > (L + L0 )) | (M > L0 )] = P [M > L], L, L0 ≥ 0
2. FX (x) ≥ 0, by Axiom 1
3. FX (x) ≤ 1, by Axiom 2
4. limx→+∞ FX (x) = 1
5. limx→−∞ FX (x) = 0
8. fX (x), the probability density function, is always differentiable from the right
d
fX (x) = (FX (x)) (31)
dx
6
R∞
4. fX (x)dx = 1, the normalisation property of the PDF
−∞
Rx
5. P [x1 < x ≤ x2 ] = x12 fX (x)dx = FX (x2 ) − FX (x1 ) = P [x ≤ x2 ] − P [x < x1 ]
(a) fX (x) is a graph of any belief that the unknown measurement, X = x, is “around”
value x
(b) Belief is proportional to the PDF, dx is the constant of proportionality
Mean, m
1
m= (36)
λ
Variance, VAR
1
VAR = (37)
λ2
7
Proof:
P [T > (t + τ ) ∩ T > τ ]
P [T > (t + τ )|T > τ ] =
P [T > τ ]
P [T > (t + τ )] e−λ(t+τ )
⇒ = = e−λt = P [T > t]
P [T > τ ] e−λτ
19 Poisson’s Distribution
λk e−λ
f (k : λ) = P [X = k] = (39)
k!
21.1 Marginals
Projections onto each axis
Z ∞
fX (x) = fXY (x, y)dy (45)
y=−∞
Z ∞
fY (y) = fXY (x, y)dx (46)
x=−∞
8
21.2 Conditionals
fXY (x, y0 )
fX (x|y0 ) = , fY (y0 ) > 0 (47)
fY (y0 )
fXY (y, x0 )
fY (y|x0 ) = , fX (x0 ) > 0 (48)
fX (x0 )
For X ⊥
⊥ Y , Conditionals = Marginals
ρxy = 0 ⇔ X ⊥
⊥Y (58)
9
ρxy = −1 → (negatively correlated) (59)
rx ρxy δx δy
Σ̄ = , rx = δx2 , ry = δy2 (62)
ρxy δx δy ry
2
δx|y = δx2 (1 − ρ2xy ) (63)
2
If δxy = 0, if you know one, you know the other, no variance for this condition
23 Expectation
Discrete random variable X
X
E[X] = mx = kP [X = k] (64)
∀k
Expectation rules
10
24 Variance
VAR[X] = E[X 2 ] − m2x = rx = δx2 (70)
X⊥
⊥Y ⇒ VAR[X + Y ] = VAR[X] + VAR[Y ] (71)
Continuous
Z ∞
VAR[X] = (x − mx )2 fX (x)dx (73)
−∞
Discrete
X
VAR[X] = (k − mx )2 P [X = k] (74)
∀k
Variance rules
11
Z ∞
2
δy|x = (y − my|x )2 fY (y|x)dy (81)
−∞
Discrete
X
mx|y = kP [(X = k)|Y ] (82)
∀k
X
my|x = lP [(Y = l)|X] (83)
∀l
X
2
δx|y = (k − mx|y )2 P [(X = k)|Y ] (84)
∀k
X
2
δy|x = (l − my|x )2 P [(Y = l)|X] (85)
∀l
27 Covariance
δxy = E[(X − mx )(Y − my )] = E[XY ] − E[X]E[Y ] (86)
δxy
−1 ≤ ρxy = ≤1 (88)
δx δy
Continuous Z ∞ Z ∞
δxy = (x − mx )(y − my )fXY (x, y)dxdy (89)
y=−∞ x=−∞
Discrete XX
δxy = (k − mx )(l − my )P [X = k, Y = l] (90)
∀l ∀k
12
One exception where ⊥
⊥ and ρxy = 0 are equivalent is the Bivariate Gaussian Distribution
⊥
⊥ ⇔ ρxy = 0, NXY (m, Σ̄) (92)
Proof
δx2 δxy
Σ̄ =
δxy δy2
δx2 0
If (ρxy = 0) ⇒ (δxy = 0) ⇒ Σ̄ =
0 δy2
⇒ NXY (m, Σ̄) = NX (mx , δx2 )NY (my , δy2 ) = fX (x)fY (y) or P [X = k]P [Y = l] ⇔ X ⊥
⊥Y
30 Sampling
X i = xi ∼ fX (x)
n
1X
fe(x) = δ(x − xi ) (94)
n i=1
n
1X
m
ex = xi (95)
n i=1
n
1X
VAR[X]
] = rex = e x )2
(xi − m (96)
n i=1
Consider each of the two marginals separately and use moment-matching to capture corre-
lation
13
n
1X
E[XY
e ]= xi y i (97)
n i=1
cov[XY
f ] = E[XY
e ]−m
e xm
ey (98)
cov[XY
f ] cov[XY
f ]
ρexy = p p = in the Gaussian case (99)
2
δx δy2 δx δy
31 Error Function
Z x
2 2
erf(x) = √ e−t dt (100)
π 0
14
Figure 1: Error Function Table
15
EE3E3-1
SCHOOL OF ENGINEERING
Anthony Quinn
Instructions to Candidates:
ANSWER QUESTION 1, and any THREE of the remaining five questions.
Page 1 of 6
c Trinity College Dublin, The University of Dublin 2018
EE3E3-1
Q.1 [Compulsory]
(a) Consider three propositions, S1 , S2 and S3 , each with probability 0.4. S1 and S2 are
independent, as are S1 and S3 , while S2 and S3 are mutually exclusive. Evaluate
Pr[S1 ∨ S2 |S3 ].
[20 %]
[20 %]
(c) Cars pass a particular point on an uncongested road at an average rate of 3 per minute.
Evaluate the probability that the second-next car will pass at a time more than 40 sec-
onds from now.
[20 %]
(d) Particles impinge uniformly on a triangular detector with vertices at Cartesian coordinates,
(2, 0), (−2, 0) and (0, 2) (cm), respectively. Draw a calibrated plot of the cumulative
distribution function of Y , being the y-coordinate of the next particle.
[20 %]
(e) The numbers of phone calls arriving at two related call centres in a fixed interval of time
are recorded on five occasions, as follows:
N1 7 5 12 9 4
N2 5 4 2 2 8
Use these data to estimate the correlation coefficient between N1 and N2 , and interpret
your answer.
[20 %]
Page 2 of 6
c Trinity College Dublin, The University of Dublin 2018
EE3E3-1
Q.2
(a) Define conditional probability. Hence, state and prove Bayes’ rule. [45 %]
(b) In a device manufacturing plant, 70% of the devices are produced by day-shift workers,
and 30% by night-shift workers. The manufactured device includes a key component
which is sourced in equal numbers from either factory A or factory B. In a quality control
study, it is found that 90% of the devices produced by the day-shift workers meet the
required standard, regardless of the origin of the key component. In the case of the
night-shift workers, 85% of their devices are satisfactory if the key component is from
factory A, and this drops to 80% when the key component is from factory B.
Using these statistics, and stating any assumptions that you make, complete your prob-
ability model and evaluate each of the following:
(i) the probability that a device is defective if the key component is from factory A;
[15 %]
(ii) the probability that a device produced by this plant is defective;
[20 %]
(iii) the probability that the key component in a defective device is from factory B.
[20 %]
Q.3
[50 %]
(b) The average lifetime of a particular implanted medical device is twelve years. Seven
such devices are monitored after implantation. Stating your assumptions, evaluate the
probability that the majority of these are still functional after ten years and that none of
those which fail will do so in less than eight years.
[50 %]
Page 3 of 6
c Trinity College Dublin, The University of Dublin 2018
EE3E3-1
Q.4
(a) The probability model of a continuous random variable (rv), X, is completely specified by
its cumulative distribution function (cdf), FX (x). Define the two phrases in italics. Also,
state—and briefly justify—the key properties of any cdf.
[50 %]
(b) Evaluate the probability that a normally distributed measurement is more than two stan-
dard deviations from the mean.
[25 %]
(c) An uncertain voltage level in an electronic circuit is uniformly distributed in the interval
(−v, +v] (Volts), for some fixed v > 0. Derive an expression for the variance of this
voltage.
[25 %]
Q.5
(a) Define random Poisson points, and hence prove that the (time) interval between two
consecutive points is exponentially distributed.
[45 %]
(b) Trains arrive at a station at an average rate of one every five minutes. Stating any as-
sumptions that you make, address each of the following:
(i) evaluate the probability that the time to the second-next train is less than eight
minutes?
[15 %]
(ii) if no train arrives in the next three minutes, evaluate the probability that more than
one will arrive in the following three minutes?
[15 %]
(iii) evaluate the probability that five trains will arrive in the next twenty minutes, with
the majority of these arriving in the next fifteen minutes.
[25 %]
Page 4 of 6
c Trinity College Dublin, The University of Dublin 2018
EE3E3-1
Q.6
(a) The probability density function of a random variable, X, is either f1 (x) or f2 (x). A set of
n ≥ 1 realizations of X is observed. Stating your assumptions, propose a statistical test
for choosing between the two possible probability models for X.
[30 %]
(b) For a particular patient, a pair of biophysical measurements, (X, Y ), is recorded on each
of 7 consecutive days, as follows:
Using these data, and stating any assumptions that you make, address each of the
following:
(i) adopting a nonparametric model, estimate Pr[X ≥ 0.7 | Y > 0] for a future mea-
surement pair, (X, Y );
[20 %]
(ii) adopting a bivariate normal model, estimate and plot a line regressing Y onto X.
Evaluate Pr[Y > 0 | X = 0].
[50 %]
If
σX2
" # " # σXY
X mX
∼ N (m, Σ), where m = , Σ= ,
Y mY
σXY σY2
with
σXY = ρXY σX σY ,
then
2
f (x|Y = y) = N (mX|y , σX|y ),
where
σX
mX|y = mX + ρXY (y − mY ),
σY
2
σX|y = σX2 1 − ρ2XY .
Page 5 of 6
c Trinity College Dublin, The University of Dublin 2018
EE3E3-1
Page 6 of 6
c Trinity College Dublin, The University of Dublin 2018
EE3E03 2017 Solutions
Exam Paper: https://www.tcd.ie/academicregistry/exams/assets/local/past-papers2017/EE/EE3E3-1.PDF
Copyright © 2018, ExamHack
3E3: Probability and Statistics
Mid-Term Test [SAMPLE]
Anthony Quinn
• Answer all THREE questions, which carry equal marks (6 marks each). The divi-
sion of marks is indicated within each question.
• This is an open-book test, and Matlab may be used. The test is strictly subject to
the PROCEDURE which has been distributed to candidates in advance. Scripts
must be imaged and uploaded to Blackboard by 13:55, accompanied by the signed
declaration quoted in the Procedure.
Q.1: S1 and S2 are Boolean propositions with probabilities 0.4 and 0.5, respectively,
while S3 = i ∈ {1, 2, 0} is a q = 3-state multinomial, with prior probability vector,
0.4
p3 = 0.5 .
0.1
(a) Sketch the induced partition of Ω, and specify the number of probability parameters.
[3 marks]
(b) Complete your probability model in any consistent manner, and hence evaluate
[OVER]
1
Q.2: Consider four propositions (Boolean), S1 , . . . , S4 . The following stochastic structure
applies:
• if either (or both) proposition(s), S1 and S2 , is (are) true, then S3 is true. Otherwise,
S3 is true with probability 32 ;
• if either (or both) proposition(s), S1 and S2 , is (are) true, then S4 is true. Otherwise:
1
if S3 is true, then S4 is true with probability 2
;
1
if S3 is false, then S4 is true with probability 4
.
6 18 40 2
(a) Adopting a homogeneous Markov chain model, and given that S1 = 1, evaluate the
probability that S2 and S4 are equal;
[3 marks]
(b) If, instead, an iid model is adopted, then evaluate the probability that—in a sample
of n = 6 sub-experiments—the first two states are both 0, and the next four states
comprise equal numbers of 1’s and 2’s.
[3 marks]
i
2.1
31 032 30
I Ez gg 1I ingPrls.nsy
of is 9 However o 4xo.s o.z
b pips
Much freedom beyond
03
or
718
Az
25
31 032 30
03 02
P 151s is gfY
I t 05 t 03 02
p
0.25
2.2
O O
e e
I
Is L
1
I Ex x2 I
Pry l Il It's Is
Prust
2.3
fo
3 o
1 I 1 s
73 8
2
37 3 73 86
ie counts are
11
the marginal In i Column sums
Is s
Es s
D
n where n n s sum of cosec aunts
I
279
3
1a
Prf Pr Isps si x Pr sis s n
rigged
transition probs
Taft
4 diagonal elements of Fj x
É x
b Pr equal nos of I's 2s in stages 3 6 of exp
Pr n O
A 7 0 A Boso 4 n 4 Rs
Pr N Rst N 2 4 Bs
n I
B o
7
Pr ni A 02 A 0 n't Is
2 2
3,0
with Is as estimated above
71 411 4 5
II y f x
t
t
o fix fix P
T
where 0 I 1
Ea E xp
732 22 3 22