Stat 330 Exam I Practice Questions: Solutions 1. Short answers (a) Give an example demonstrating why the number of combinations is always less than the number of permutations. n! n! P (n, k) = (n−k)! and C(n, k) = nk = k!(n−k)! e.g. P (4, 2) = 12 and C(4, 2) = 6 (b) List three axioms of probability. These are the Kolmogorov Axioms: i. for all events A, P (A) ≥ 0 ii. for all events A, B with A ∩ B = ∅: P (A ∪ B) = P (A) + P (B). iii. P (Ω) = 1 (c) Give two examples which require a continuous sample space. e.g. lifetime of an electrical device, height of a person, ... (d) How does the geometric distribution differ from the Binomial? a random variable with a geometric distribution counts the number of attempts until the first success, a random variable with a binomial distribution counts the number of successes in n repetitions of the experiment. 2. Counting Examples (a) A computer shops advertises computers with 5 choices of monitors, three sizes of hard disks and 2 sizes of main memory. At least one computer for each configuration is in the shop. How many computers have to be in the shop at least? Explain. 5 · 3 · 2 = 30 different computers at least in the shop (b) In an exam there are 10 questions, each candidate has to choose 3 questions. How many possibilities to choose three questions are there i. in total? Explain. 10 10 · 9 · 8 = = 120. 3 3·2·1 ii. if at least one question has to be chosen from the first 4 questions? Explain. 4 6 1 2 | {z } + 4 6 2 1 | {z } + 4 6 3 0 | {z } one from first 4. two from first 4, three from first 4, two from second 6 one from second 6 none from second 6 alternatively, 10 − 3 | {z } total, see i) 4 6 0 3 | {z } none from first 4, three from second 6 = 4 · 15 + 6 · 6 + 4 = 100. = 120 − 20 = 100. (c) Someone owns 7 CDs with classical music, 12 CDs with pop music and 5 CDs with Jazz. How many possibilities are there to put all CDs on a shelf, if all CDs of the same category are next to each other? Explain. · |{z} 7! · 3! |{z} 12! |{z} re-order 3 topics classical pop-music · |{z} 5! ≈ 1.7382 · 1015 . Jazz (d) A group of 11 persons consists of 7 men and 4 women. 5 persons are selected for a committee. How many possibilities are there i. in total? Explain. 11 = 462. 5 ii. if exactly one women must be in the committee? Explain. 4 1 |{z} 7 · = 4 · 35 = 140. 4 |{z} one woman four men iii. if at least one women must be in the committee? Explain. − 462 |{z} total number 7 5 |{z} = 462 − 21 = 441. no woman (e) An administrator demands from his users that passwords must be chosen according to the following rules: • a password must have exactly 8 characters • at least one character must be a digit ’0’-’9’ or one of the special characters ’#’,’-’,’ ’,’&’,’%’. How many possible passwords are there? Explain. We’ll assume, that we can take from the ’usual’ characters ’a’-’z’ and ’A’-’Z’ (that’s 52 characters, or 26 , if we don’t distinguish between upper and lower case). In total, we have therefore 52+10+5 = 67 different characters. 678 |{z} total number − 528 |{z} ≈ 3.526079 · 1014 . no special character 3. Some jobs submitted for processing on a particular CPU have fatal programming errors, while others do not. Suppose that the long run fraction of jobs with fatal programming errors is p = 0.05. a) Find (under appropriate distribution assumptions) the probability that among the next 10 jobs submitted there are less than 3 with fatal errors. The next 10 jobs can be considered 10 iid Bernoulli trials, with “a fatal error” considered a “Success” and P (S) = .05 = p Let X = # of jobs with a fatal error in the next 10. Then X ∼ Binomial(n = 10, p = .05) P (X < 3) = P (X = 0) + P (X = 1) + P (X = 2) 10 10 10 = (.05)0 (.95)1 0 + (.05)1 (.95)9 + (.05)2 (.95)8 0 1 2 = .59874 + 10 × .05 × .63025 + 45 × .0025 × .66342 = .9885 b) One begins monitoring the processing of jobs and lets X = the total number of jobs processed until the first with a fatal error. Find (again under appropriate distribution assumptions) P (X ≤ 30) Here, obviously, X ∼ Geometric(p = .05) P (X ≥ 4) = P (X > 3) = P (there are 3 jobs without a fatal error (.95)3 = .857375 = 4. In an experiment you toss two dice. A random variable X is defined as the minimum score of the two dice. a) Find the image of X. im(X) = {1, 2, 3, 4, 5, 6}. b) What is the probability that the minimum of the two dice is 3? By looking at a sample space Ω with equally likely elementayr events we get the probability by just counting (1, 1),(1, 2),(1, 3),(1, 4),(1, 5),(1, 6) (2, 1),(2, 2),(2, 3),(2, 4),(2, 5),(2, 6) (3, 1),(3, 2),(3, 3),(3, 4),(3, 5),(3, 6) Ω= (4, 1),(4, 2),(4, 3),(4, 4),(4, 5),(4, 6) (5, 1),(5, 2),(5, 3),(5, 4),(5, 5),(5, 6) (6, 1),(6, 2),(6, 3),(6, 4),(6, 5),(6, 6) 2nd 1 2 3 4 5 6 1 1 1 1 1 1 1 2 1 2 2 2 2 2 P (X = 3) = first 3 1 2 3 3 3 3 die 4 1 2 3 4 4 4 5 1 2 3 4 5 5 6 1 2 3 4 5 6 7 36 c) What is the probability that the minimum of the two dice is less than 3? P (X < 3) = P (X = 1) + P (X = 2) = 11 9 10 + = . 36 36 18 d) Give the probability mass function of X. Explain using the above sample space, x pX (x) 1 2 3 4 5 6 11 36 9 36 7 36 5 36 3 36 1 36 e) Draw probability mass and probability distribution function of X into the two boxes below. Do not forget to mark and label the axes appropriately. 5. Given is the following table: x pX −3 0.1 −1 0.15 0 0.3 1 s (a) Find s, so that pX is a probability mass function. s = 1 − (.1 + .15 + .3) = .45 (b) Assume, the random variable X has probability mass function pX . What is E[X]? E[X] = −3(.1) − 1(.15) + 0(.3) + 1(.45) = 0 (c) Determine V ar[X]. E[X 2 ] = 9(.1) + 1(.15) + 0(.3) + 1(.45) = 1.5 V ar[X] = E[X 2 ] − (E[X])2 = 1.5 (d) Assume, Y is another random variable with E[Y ] = 1.25 and V ar[Y ] = 2.5. Evaluate the following expressions: i. E[X + 4Y ] E[X] + E[Y ] = 0 + 4(1.25) = 5.0 ii. V ar[3Y ] V ar[3Y ] = 32 V ar[Y ] = 9(2.5) = 22.5 iii. E[2Y 2 ] 2E[Y 2 ] = 2[V ar[Y ] + (E[Y ])2 ] = 2(2.5 + 1.252 ) = 8.125 6. In three boxes there are capacitors as shown in the following table: Capacitance Number in box (in µF ) 1 2 3 1.0 10 90 25 0.1 50 30 80 70 90 120 0.01 An experiment consists of first randomly selecting a box (assume that each box has the same probability of selection) and the randomly selecting a capacitor from the chosen box. a) Draw a tree diagram and determine the probability of selecting a 0.1 µF capacitor. box 1 1/13 1 F 5/13 0.1 F 7/13 0.01 F 1/3 3/7 1/3 box 2 1/3 1/7 3/7 1/9 box 3 1 F 0.1 F 0.01 F 1 F 80/225 0.1 F 120/225 0.01 F P ( select 0.1 µF ) = 1/3 · 5/13 + 1/3 · 1/7 + 1/3 · 80/225 = 0.29. b) If a 0.1 µF capacitor is chosen, what is the probability that it came from box 1? P ( box 1 | 0.1µF ) = P (0.1µF | box 1) · P ( box 1 ) 5/13 · 1/3 = = 0.44. P (0.1µF ) 0.29 Now assume, that the contents of all three boxes are poured into one big box. c) What is now the probability of selecting a 0.1 µF capacitor? P ( select 0.1 µF ) = 160 50 + 30 + 80 = = 0.28. 130 + 210 + 225 565 d) If three capacitors are selected at random, what is the probability that at least one of them is a 0.1 µF capacitor? In total there are 565 capacitors, 160 of them have 0.1 µF and 405 others. P ( at least one 0.1 µF ) = 1 − P ( none ) = 1 − 405 · 404 · 403 = 1 − 0.3675 = 0.6325. 565 · 564 · 563 7. A manufacturing process produces integrated circuit chips. The fraction of bad chips produced is 20%. Thoroughly testing a chip to determine whether it is good or bad is expensive, so a cheap test is tried. All good chips will pass the cheap test, but so will 10% of the bad chips. (a) Given a chip passes the cheap test, what is the probability that it is a good chip? P (good|pass) = = P (pass|good)P (good) P (pass|good)P (good) + P (pass|bad)P (bad) (1)(.8) = .976 (1)(.8) + (.1)(.2) (b) If a company using this manufacturing process sells all chips which pass the cheap test, what percentage of chips sold will be bad? P (bad|sold) = P (bad|pass) = 1 − P (good|pass) = .024