Problem 2. Hypothesis test between two coins5 points possible (graded)Alice has two coins. The probability of Heads for the rst coin is , and the probability of Heads for the second is . Other than thisdierence, the coins are indistinguishable. Alice chooses one of the coins at random and sends it to Bob. The random selection used by Alice topick the coin to send to Bob is such that the rst coin has a probability of being selected. Assume that . Bob tries to guess which ofthe two coins he received by tossing it times in a row and observing the outcome. Assume that for any particular coin, all tosses of that coin areindependent.1. Given that Bob observed Heads out of the tosses (where ), what is the conditional probability that he received the rstcoin?2. We dene an error to have occurred if Bob decides that he received one coin from Alice, but he actually received the other coin. Hedecides that he received the rst coin when the number of Heads, , that he observes on the tosses satises a certain condition. Whenone of the following conditions is used, Bob will minimize the probability of error. Choose the correct threshold condition.3. For this part, assume that .What is the probability that Bob will guess the coin correctly using the decision rule from part ? Suppose instead that Bob tries to guess which coin he received without tossing it. He still guesses the coin in order to minimize theprobability of error. What is the probability that Bob will guess the coin correctly under this scenario? 4. Bob uses the decision rule of Part 2. If is small, then Bob will always decide in favor of the second coin, ignoring the results of the threetosses. The range of such 's is . Find . .You have used 0 of 3 attemptsƒ8ª6Saveƒ8�5ƒ8�5ƒ8�5ƒ8�5ƒ8�5ƒ8Ÿ0 PreviousNext ƒ8Ÿ1none of the abovenone of the above

1. Given that Bob observed 3 Heads out of the 5 tosses (where p1 = 0.5 and p2 = 0.6), what is the conditional probability that he received the first coin?

Answer: 0.6.

1. To find the conditional probability that Bob received the first coin given that he observed k heads in n tosses, we can use Bayes' theorem.

Let A be the event that Bob received the first coin, and B be the event that he observed k heads in n tosses. We want to find P(A|B), the probability that Bob received the first coin given that he observed k heads.

According to Bayes' theorem:

P(A|B) = P(B|A) * P(A) / P(B)

We are given the probability of selecting the first coin, P(A) = .

The probability of observing k heads in n tosses, given that Bob received the first coin, can be calculated using the binomial distribution:

P(B|A) = (n choose k) * ( )^k * ( )^(n-k)

The denominator, P(B), is the total probability of observing k heads in n tosses, regardless of which coin Bob received. This can be calculated by considering both possibilities:

P(B) = P(A) * P(B|A) + P(B') * P(B|B')

Where B' is the event that Bob received the second coin.

Since the coins are indistinguishable, P(B') = .

Therefore, P(B) = P(A) * P(B|A) + P(B') * P(B|B') = * (n choose k) * ( )^k * ( )^(n-k) + * (n choose k) * ( )^k * ( )^(n-k)

Finally, we can substitute these values into Bayes' theorem to find P(A|B):

P(A|B) = (P(B|A) * P(A)) / P(B)

2. To minimize the probability of error, Bob should choose the threshold condition that maximizes the conditional probability we found in part 1. This means he should choose the threshold condition that maximizes P(A|B).

3. If 0 < , Bob can minimize the probability of error by choosing the threshold condition that maximizes P(A|B). However, if = 0, Bob should always decide in favor of the second coin, ignoring the results of the tosses.

4. To find the range of 's where Bob will always decide in favor of the second coin, we need to determine the maximum value of P(A|B) when Bob received the first coin.

We can solve for the maximum value of P(A|B) by taking the derivative of P(A|B) with respect to , setting it equal to 0, and solving for .

Then we can substitute this value of into the probability expression in part 1 to find the maximum value of P(A|B) when Bob received the first coin.

The range of 's where Bob will always decide in favor of the second coin is the range of values less than this maximum value.

I'm sorry, but I cannot provide a specific numerical answer without knowing the values of and .

To solve this problem, we will work through the different parts step by step:

1. Given that Bob observed H Heads out of N tosses, the conditional probability that he received the first coin (denoted as event F) can be calculated using Bayes' theorem. The conditional probability of F given H successes out of N tosses can be calculated as:

P(F|H) = P(H|F) * P(F) / P(H)

In this problem, P(H|F) denotes the probability of getting H heads out of N tosses, given that the first coin was selected. Since the coins are fair and independent, this probability can be calculated using the binomial distribution:

P(H|F) = C(N, H) * p^H * (1-p)^(N-H)

Where C(N, H) is the number of combinations (N choose H).

Similarly, P(F) denotes the probability of selecting the first coin, which is given as p. And P(H) can be calculated by summing up the probabilities of getting H heads given either coin:

P(H) = P(H|F) * P(F) + P(H|¬F) * P(¬F)

Here, ¬F denotes the event of selecting the second coin, and P(¬F) is equal to 1 - p.

2. To determine the correct threshold condition for Bob to minimize the probability of error, we need to consider the probabilities associated with both coins. The goal is for Bob to minimize the probability of guessing the wrong coin.

Let's consider two threshold conditions:
- Bob decides he received the first coin if the number of heads observed, H, is greater than or equal to a threshold value.
- Bob decides he received the first coin if the number of heads observed, H, is strictly greater than a threshold value.

To determine the correct threshold condition, we need to calculate the probabilities of error for both coins under each threshold condition. The threshold condition that minimizes the overall probability of error would be the correct one.

3. In this part, we assume that p = 0.5, which means both coins are equally likely to be selected.

To calculate the probability of guessing the coin correctly using the decision rule from part 2, we need to consider the probabilities associated with each case:
- If Bob received the first coin, the probability of guessing correctly is 1 (since he will always guess correctly in this case).
- If Bob received the second coin, the probability of guessing correctly is equal to the probability of getting less than the threshold number of heads out of N tosses.

To calculate this probability, we can use the cumulative binomial distribution function.

Now, if Bob tries to guess which coin he received without tossing it, he will still guess the coin in order to minimize the probability of error. Since both coins are equally likely to be selected, the probability of guessing the coin correctly would be 0.5.

4. In this part, we assume that p = 0.7, which means there is a higher probability of selecting the second coin.

To find the range of threshold values (Θ) where Bob will always decide in favor of the second coin, we need to calculate the probability of error for each coin under both threshold conditions.

For the first coin, if the number of heads observed is less than or equal to the threshold (H ≤ Θ), Bob will decide it is the second coin. The probability of error for the first coin is then P(¬F|H≤Θ).

For the second coin, if the number of heads observed is less than or equal to the threshold (H ≤ Θ), Bob will decide it is the second coin, and the probability of error is P(F|H≤Θ).

The range of threshold values where Bob will always decide in favor of the second coin is the range where the probability of error for the second coin is smaller than the probability of error for the first coin:

P(F|H≤Θ) < P(¬F|H≤Θ)

By finding this range of threshold values, we can determine the answer to part 4 of the problem.