

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


This exam is out of 70; the amount for each question is as marked. Clearly explain your reasoning. (Remember, we can’t read your mind! Besides, it gives us a chance to give you partial credit.) Don’t forget to put your name and student number on each blue book you use. You can answer the questions in any order, just as long as you mark clearly which question you’re answering. A good strategy is to do the ones you find easiest first.
Exams should be available next Tuesday or Wednesday; your grades will be posted on the CMS then too. You can pick up your exam in 4146 Upson after they’re graded. We’ll send out a message when that’s done.
Good luck!
(a) {(0, 0 , ), (1, 1), (2, 2), (3, 3)} (b) {(0, 0), (0, 1), (1, 0), (1, 1)}.
(a) If A and B are disjoint events then they are independent. (b) If A and B are independent events, then so are A and B. (c) A sum of Bernoulli random variables is a binomial random variable. (d) If X and Y are independent then V (X + Y ) = V (X) + V (Y ). (e) If a is a real number and X is a random variable, then V (aX) = aV (X). (f) If X and Y are not independent then E(X + Y ) 6 = E(X) + E(Y ). (g) If A and B are independent events then Pr(A ∪ B) = Pr(A) + Pr(B). (h) Suppose that you have a coin that has probability .2 of landing heads, and you toss it 100 times. Let X be the number of times that the coin lands heads. Then P r(X ≥ 60) ≤ 1 /100. (i) Let Tn be the number of times a fair coin lands heads after being flipped n times. Then lim n→∞ Pr
Tn n
(j) Taking Tn as above,
nlim→∞ Pr
∣∣^2 T √n^ −^ n n
Input: n (a positive integer) factorial ← 1 i ← 1 while i < n do i ← i + 1 factorial ← i ∗ factorial
Prove that the program terminates with factorial = n! given input n, using an appropriate loop invariant.