Lab Workshop Week 3 Paper
Lab Workshop Week 3 Paper
1 Lab
1. Suppose in a lot of 100 fuses there are 20 defective ones. A sample of 5 fuses are
randomly selected from the lot without replacement. Let X be the number of defective
fuses found in the sample.
a. For each value of n given in the following table, find P (at least one match) and
write down the results at appropriate places of the table. What is the limiting
value when n → ∞?
b. We can also use R to simulate the processes of drawing n balls with or without
replacement from a set of n balls numbered from 1 to n. We can then simulate
the probability of at least one match using the relevant relative frequencies.
Create a function match.f in R-Studio by writing a script and executing it
as follows.
match.f <- function(n, simsize, rep = TRUE) {
freq = 0
for (i in 1:simsize) {
sam = sample(1:n, size = n, replace = rep)
freq = freq + (sum(sam == 1:n) >= 1)
1
MAST90105: Methods of Mathematical Statistics
}
freq/simsize
}
2
MAST90105: Methods of Mathematical Statistics
10
15
100
2 Workshop
1. An urn contains 17 balls marked LOSE and 3 balls marked WIN. You and an opponent
take turns selecting at random a single ball from the urn without replacement. The
person who selects the third WIN ball wins the game. It does not matter who selected
the first two WIN balls.
a. If you draw first, find the probability that you win the game on your second draw.
b. If you draw first, find the probability that your opponent wins the game on his
second draw.
c. If you draw first, the probability that you win can be found from
9 3
17
X 2 2k−2 1
P (You win if you draw first) = 20
× (Why?)
k=1 2k
20 − 2k
Note: You could win on your second, third, fourth, . . ., or tenth draw, not on
your first.
d. If you draw second, the probability that you win can be found from
9 3
17
X 2 2k−1 1
P (You win if you draw second) = 20
× . (Why?)
k=1 2k+1
19 − 2k
e. Based on your results in (c) and (d), would you prefer to draw first or second?
Why?
3
MAST90105: Methods of Mathematical Statistics
Let X be the number of flips of this coin until the first tail is observed. Assuming the
coin flips are independent,
b. Find the mean E(X) and variance V ar(X). Hint: You can use this result without
proof:
∞
X 1
= e.
k=0
k!
3. Let a random experiment be the cast of a pair of unbiased 6-sided dice and let X equal
the smaller of the outcomes if they are different and the common value if they are
equal.
4. In a lot of 100 light bulbs, there are 5 bad bulbs. An inspector inspects 10 bulbs
selected at random. Let X be the number of bad bulbs in the sample.
5. A box contains 4 coloured balls: 2 black and 2 white. Balls are randomly drawn
successively without replacement. If X is the number of draws until the last black ball
is obtained, what are the possible values of X? Find the pmf f (x) for X. (Hint: Define
events Bi = {the i-th draw is a black ball} and Wj = {the j-th draw is a white ball}.
Then find how each outcome of X is related to Bi and Wj .)
4
MAST90105: Methods of Mathematical Statistics
7. Let X equal the number of people selected at random that you must ask in order
to find someone with the same birthday as yours. Assuming each day of the year is
equally likely (and ignoring February 29).