CSE 221: Probabilistic Analysis of Computer Systems
Spring 2008
Swapna S. Gokhale
Homework #1 Solutions
Date: Feb. 15, 2008
1. Describe a possible sample space for the following experiment: Three chips are drawn from a lot containing a mix of RAMs (random access memory) and ROM (read-only memory), and each is checked to see whether it is a ROM or a RAM.
The sample space is given by: s0 = (RAM, RAM, RAM) s1 = (RAM, RAM, ROM) s2 = (RAM, ROM, RAM) s3 = (RAM, ROM, ROM) s4 = (ROM, RAM, RAM) s5 = (ROM, RAM, ROM) s6 = (ROM, ROM, RAM) s7 = (ROM, ROM, ROM)
2. In the experiment described in Problem #1, assume that the probability p(RAM) = ¾ and p(ROM) = ¼ . Compute the probabilities of the following events:
A = At most two RAMs.
B = At least two ROMs.
Are events A and B independent?
The probabilities of the sample points are as follows: p(s0) = ¾ x ¾ x ¾= 27/64 p(s1) = ¾ x ¾ x ¼ = 9/64 p(s2) = ¾ x ¼ x ¾ = 9/64 p(s3) = ¾ x ¼ x ¼ = 3/64 p(s4) = ¼ x ¾ x ¾ = 9/64 p(s5) = ¼ x ¾ x ¼ = 3/64 p(s6) = ¼ x ¼ x ¾ = 3/64 p(s7) = ¼ x ¼ x ¼ = 1/64
A = at most two RAMs (0, 1, or 2 RAMs) p(A) = p(s1) + p(s2) +…+ p(s7) = 37/64
B = at least two ROMs (2 or 3 ROMs)
P(B) = p(s3) + p(s5) + p(s6) + p(s7) = 10/64
P(A and B) = p(s3) + p(s5) + p(s6) + p(s7) = 10/64.
Note that p(A and B) is not equal to p(A) x p(B). Hence events, A and B are not independent.
3. If a three-digit decimal number is chosen at random, find the probability that exactly k digits are greater than or equal to 5, for k=0, k=1, k=2, k=3.
Note: For the sake of simplicity, we assume that the first digit can be zero, although in the strictest sense, if the first digit is zero, then it cannot be considered a 3-digit number.
Total number of ways in which a 3-digit number can be formed is 10x10x10. k=0
0 digits are >= 5, all digits are less than 5. Each digit can thus be chosen from only 5 possibilities, namely, 0, 1, 2, 3, 4, and the number of such 3-digit numbers is 5x5x5.
Thus, the probability is 5x5x5/10x10x10 = 0.125. k=1
1 digit is >= 5, and 2 digits are less than 5. Since any one of the digit (1 st
, 2 nd
, or 3 rd
) can be greater than 5, the number of possible combinations of digits gives rise to
3
2
is 3. The number of ways in which a number with two digits greater than or equal to 5 and one digit less than or equal to 5 can be formed is 5x5x5. Hence, the probability of each combination is given by 5x5x5/10x10x10 = 0.125. The total probability is thus given by
0.375.
The probabilities for k=2, and k=3 can similarly be computed.
4. Evaluate the reliability of the following reliability block diagram, assuming all component reliabilities to be 0.9.
#1
#2
#3
#4
#5
The reliability of the first parallel structure comprising components 1 and 2 is given by:
(1 – (1-0.9)(1-0.9)) = 0.99.
Similarly, the reliability of the second parallel structure comprising components 4 and 5 is given by 0.99.
The overall reliability is thus given by: 0.99x0.9x0.99 = 0.88209.
5. A certain firm has plants A, B and C producing 35%, 15% and 50% of the total output.
The probabilities of a non-defective product are, respectively, 0.75, 0.95, and 0.85. A customer receives a defective product. What is the probability that it came from plant C? p(A) = 0.35, p(B) = 0.15, p(C) = 0.5. p(non-defective product from A) = 0.75, p(defective product from A) = 0.25 p(non-defective product from B) = 0.95, p(defective product from B) = 0.05 p(non-defective product from C) = 0.85, p(defective product from C) = 0.15
Let E be the event that a customer receives a defective product. We have to compute p(C|E).
From Bayes rule:
P(E) = p( E|A) x p(A) + p(E|B) x p(B) + p(E|C) x p(C)
= 0.35x0.25 + 0.15x0.05 + 0.5x0.15
= 0.17 p(C|E) = p(E|C) x p(C)/p(E)
= 0.5x0.15/0.17
= 0.44176