ECE_313_SP2023_HW5_sol

.pdf

School

University of Illinois, Urbana Champaign *

*We aren’t endorsed by this school

Course

313

Subject

Mathematics

Date

Jan 9, 2024

Type

pdf

Pages

6

Uploaded by SuperGalaxy7216

Report
University of Illinois Spring 2023 ECE 313: Problem Set 5: Problems and Solutions Due: Friday, February 23 at 5:00:00 p.m. Reading: ECE 313 Course Notes, Section 2.10, 2.11. Note on reading: For most sections of the course notes there are short answer questions at the end of the chapter. We recommend that after reading each section you try answering the short answer questions. Do not hand in; answers to the short answer questions are provided in the appendix of the notes. Note on turning in homework: You must upload handwritten homework to Gradescope. No typeset homework will be accepted. No late homework will be accepted. Please write on the top right corner of the first page: NAME AS IT APPEARS ON Canvas NETID SECTION PROBLEM SET # Page numbers are encouraged but not required. Five points will be deducted for improper headings. 1. [Election polls] You want to run a poll to estimate what fraction p of the population will vote for candidate A in the next elections. Suppose you interview n people, and out of those, X people say they will vote for candidate A. (a) What is the maximum likelihood estimate for p given X = k ? Solution: The number of people X that will vote for candidate A can be modelled as a Binomial( n, p ) random variable. The corresponding likelihood function is L ( p ) = n k p k (1 p ) n k Differentiating L ( p ) with respect to p, dL ( p ) dp = n k kp k 1 (1 p ) n k ( n k ) p k (1 p ) n k 1 = n k p k 1 (1 p ) n k 1 ( k np ) Setting the right-hand side to zero, we obtain the ML estimate for p given X = k as ˆ p ML = k/n. Note that the derivative is positive for p < ˆ p ML and negative for p > ˆ p ML , hence the obtained value is indeed the ML estimate. (b) If you want to estimate p to within 0.01 with a confidence level of 96%, how large does n have to be? Justify your answer. Solution: We know that for any a > 0, P p ˆ p ML a 2 n , ˆ p ML + a 2 n 1 1 a 2 .
To obtain a 96% confidence, 0 . 96 = 1 1 a 2 = a = 5 . Now, in order to estimate p to within 0 . 01 of ˆ p ML , we need a 2 n 0 . 01 = n 50 a = n 62 , 500 . 2. [Drawing aces from a deck] Suppose I have a standard 52-card deck, and I ask Bob to draw two random cards from it. (a) Bob draws two cards and tells me that, out of the two cards he drew, he has at least one ace. What is the conditional probability that both cards drawn were aces? Solution: Let X be the event that both the drawn cards were aces and Y be the event that at least one of the two cards drawn is an ace. Note that X Y, therefore X Y = X. There are ( 4 2 ) ways of choosing 2 aces out of the total 4 and ( 52 2 ) ways of selecting any 2 cards out of the total 52 . Hence, P ( X ) = ( 4 2 ) ( 52 2 ) = 4 52 · 3 51 If at least one card is ace, possible cases are that both cards are aces, which can happen in ( 4 2 ) ways, or one card is ace and the other is a non-ace, which can happen in ( 4 1 )( 48 1 ) ways. Note that these two cases are mutually exclusive. Hence, P ( Y ) = ( 4 2 ) + ( 4 1 )( 48 1 ) ( 52 2 ) Note that P ( Y ) can also be calculated as P ( Y ) = 1 P (No aces) = 1 ( 48 2 ) ( 52 2 ) = 1 48 52 · 47 51 Using the definition of conditional probability, P ( X | Y ) = P ( X Y ) P ( Y ) = P ( X ) P ( Y ) = ( 4 2 ) ( 4 2 ) + ( 4 1 )( 48 1 ) = 1 33 = 0 . 0303 (b) The cards are returned to the deck, which is shuffled, and Bob draws two cards again. This time, when Bob is not looking, I take a peek at one of the cards that he drew, and 2
see that it is an ace. What is the conditional probability that both cards drawn were aces? Solution: Let X be the event that both the drawn cards were aces and Y be the event that the card from Bob’s hand that we look at is an ace. Since this card is drawn uniformly at random from the deck of cards, P ( Y ) = 4 52 Note that X Y still holds, therefore X Y = X. From part (a), P ( X ) = ( 4 2 ) ( 52 2 ) = 4 52 · 3 51 Using the definition of conditional probability, P ( X | Y ) = P ( X Y ) P ( Y ) = P ( X ) P ( Y ) = 3 51 = 0 . 0588 (c) The answers to (a) and (b) are different. This is somewhat surprising, since in both cases we found out that Bob has at least one ace. Can you explain why the two scenarios are different? Solution: When we pick one of Bob’s cards at random and find out that it is an ace, we obtain more “information” about whether both cards are aces. This is because, if only one of the cards was an ace, in part (a) Bob would tell us that at least one is an ace, but in part (b) we would still have a 1 / 2 chance of finding out that one of them is not an ace. 3. [Fair and biased dice] There are two dice in a bag. One is a standard die with faces 1,2,3,4,5 and 6. The other one has faces 1,1,3,3,5,5. (a) Suppose one die is selected at random from the bag and rolled. What is the probability of observing a 3? Solution: Let D be a random variable representing the die that is selected and rolled, such that D = s when a standard die is selected and D = n when a non-standard die is selected. Since the die is selected randomly, P ( D = s ) = P ( D = n ) = 1 / 2 Let X be the number observed on the rolled die. Since { D = s } ∪ { D = n } = Ω and 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help