Starting from:

$34.99

MAST90105: Lab 3 Solution

1 Lab
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
P(You win if you draw first) = (Why?)
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
P(You win if you draw second) = (Why?)
e. Based on your results in (c) and (d), would you prefer to draw first or second? Why?
2. 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. Find the probability P(X = 0),
b. The cumulative probability P(X ≤ 3),
c. The mean or expectation of X, E(X),
d. The second moment of X, E(X2),
e. The variance of X, V ar(X),
f. A probability bargraph for the pmf of X.
3. An urn contains n balls numbered from 1 to n. A random sample of n balls is selected from the urn, one at a time. A match occurs if ball numbered i is selected on the ith draw.
• If the draws are done with replacement, it can be shown that
P(at least one match) = 1 .
• If the draws are done without replacement, it can be shown that
P(at least one match) = 1 .
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.
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)
} freq/simsize
}
• Note that (sum(sam==1:n)>=1) in match.f is for checking whether or not there is at least 1 match in sam.
• Simulate the drawing process 1000 times (simsize=1000) for each given n and rep (rep=TRUE indicates the “with replacement” procedure is used.) Execute the following and write down the results at appropriate places in the table that follows.
match.f(n = 1, simsize = 1000, rep = TRUE) match.f(n = 3, simsize = 1000, rep = TRUE) match.f(n = 10, simsize = 1000, rep = TRUE) match.f(n = 15, simsize = 1000, rep = TRUE) match.f(n = 100, simsize = 1000, rep = TRUE) match.f(n = 10000, simsize = 1000, rep = TRUE) match.f(n = 1, simsize = 1000, rep = FALSE) match.f(n = 3, simsize = 1000, rep = FALSE) match.f(n = 10, simsize = 1000, rep = FALSE) match.f(n = 15, simsize = 1000, rep = FALSE) match.f(n = 100, simsize = 1000, rep = FALSE) match.f(n = 10000, simsize = 1000, rep = FALSE)
n P(at least one match)
with replacement without replacement
by Calculation by R simulation by Calculation by R simulation
1
3
10
15
100

2 Workshop
1. Let f(x) = (1/4)|x|(1/2)1−|x| for x = −1,0,1 and f(x) = 0 for other x values. Find the mean, variance and moment generating function for a random variable with this pmf.
2. 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.
a. With reasonable assumptions, find the pmf of X.
b. Let Y equal the range of the two outcomes (i.e., the absolute value of the difference of the largest and smallest outcomes). Determine the pmf of Y .
3. 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.
a. What probability distribution does X have?
b. Calculate the probability that at least one defective bulb will be found in the sample.
c. Find the mean of X, i.e. E(X).
d. Find the variance of X, i.e. Var(X). (Note that variance for Hypergeometric has not yet been discussed in class — it will be discussed in Module 4. The formula is given in the table in the textbook.)
e. Find the second moment of X, i.e. E(X2).
4. Given E(X + 4) = 10 and E[(X + 4)2] = 116, determine
a. Var(X + 4).
b. µ = E(X).
c. σ2 = Var(X).
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.)
6. Let X be the number of accidents in a factory per week having pmf
.
a. Find the conditional probability of X ≥ 4, given that X ≥ 1. (Hint: Write

b. Does E(X) exist? If yes, find it; if not, why?
a. What is the average class size?
b. Select a student randomly out of the 1000 students. Let the random variable X equal the size of the class to which this student belongs. Find the pmf of X.
c. Find E(X), V ar(X) and the mgf of X.
8. A certain type of mint has a label weight of 20.4 grams. Suppose that the probability is 0.90 that a mint weighs more than 20.7 grams. Let X equal the number of mints that weigh more than 20.7 grams in a sample of 8 mints selected at random.
a. How is X distributed if we assume independence?
b. Find P(X = 8) and P(X ≤ 7).
9. Define the pmf and give the values of µ and σ2 when the moment-generating function (mgf) of X is defined by
a. .
b. M(t) = (0.25 + 0.75et)12.
10. If the moment-generating function of X is
,
Find the mean, variance, and pmf of X.

More products