Solved – Hypothesis test between two coins

bayesianhypothesis testingself-study

I am confused about how to proceed with solving 3rd and 4th question.

The question is :

Alice has two coins. The probability of Heads for the first coin is ${1\over4}$, and the probability of Heads for the second is ${3\over4}$. Other than this difference, the coins are indistinguishable. Alice chooses one of the coins at random and sends it to Bob. The random selection used by Alice to pick the coin to send to Bob is such that the first coin has a probability $p$ of being selected. Assume that $0<p<1$. Bob tries to guess which of the two coins he received by tossing it $3$ times in a row and observing the outcome. Assume that for any particular coin, all tosses of that coin are independent.

1. Given that Bob observed $k$ Heads out of the $3$ tosses $(where
k=0,1,2,3 )$
, what is the conditional probability that he received the first coin?

My answer = ${3^{3-k}⋅p \over3^{3-k}⋅p+3^k⋅(1−p)}$

2. We define an error to have occurred if Bob decides that he received one coin from Alice, but he actually received the other coin. He decides that he received the first coin when the number of Heads, $k$ , that he observes on the $3$ tosses satisfies a certain condition. When one of the following conditions is used, Bob will minimize the probability of error. Choose the correct threshold condition.

My answer = $k ≤ {3\over2}+{1\over2}log_3 {p\over1−p}$

3. For this part, assume that $p={3\over4}$

3 a. What is the probability that Bob will guess the coin correctly using the decision rule from part 2?

3 b. Suppose instead that Bob tries to guess which coin he received without tossing it. He still guesses the coin in order to minimize the probability 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 $p$ is small, then Bob will always decide in favor of the second coin, ignoring the results of the three tosses. The range of such $p's$ is $[0,t)$. Find $t$.

Best Answer

Bob can be correct when the actual coin is $C_1$ or $C_2$: $$P(\text{Bob correct})=P(\text{Bob correct}| C_1)P(C_1)+P(\text{Bob correct}| C_2)P(C_2)$$

We can calculate one of them as follows ($P(C_1)=3/4,P(C_2)=1/4$):

$$P(\text{Bob correct}| C_1)=P(k\leq2|C_1)=1-P(k=3|C_1)=1-\left(\frac{1}{4}\right)^3$$ Following the same way, you can calculate the other term and get the probability of Bob being correct.

For the fourth one, you'll just need a threshold $<0$ because when the threshold is less than zero, no experiment will result in the of choice of coin 1l; let's find the limiting value: $$\frac{3}{2}+\frac{1}{2}\log_3 \frac{t}{1-t}=0\rightarrow t=\frac{1}{28}$$