A car driver is selected at random to be a subject in the survey. The subject is given a six side dice with 4 green sides and 2 red sides and is given the following instructions
- Roll the dice
- If the outcome is green, say yes if the driver had a car accident last year and say no if no accidents
- If the outcome is red, say yes
a) Suppose that $30\%$ of car drivers had an accident. If the subject says yes, what is the probability that the driver had a car accident last year?
b) Suppose we random sample $200$ drivers and $70$ of them say yes. What is the percentage of drivers had a car accident last year?
The sample space is $\{\{G,Y\},\{G,N\},\{R,Y\}\}$ where $G$ is green, $R$ is red, $Y$ is yes and $N$ is no. and the probability of these events are $2/3*0.3,2/3*0.7,1/3$ respectively.
For part a, I have $$P(G\,|\,Y)=\frac{P(G\cap Y)}{P(Y, G)+P(Y, R)}=\frac{2/3*0.3}{2/3*0.3+1/3}$$
For part b, I have $$\frac{70}{200}=2/3*p+1/3$$
There is an additional subtlety that you have not considered. There are drivers whose outcome of the die roll was red, and answered 'yes' to the question, but who also did have an accident in the past year. So suppose $A$ represents the event that a randomly selected driver had an accident in the past year, and let $\bar A$ be the complementary event that they did not.
The experimental design requires us to assign the following probabilities:
$$\Pr[G] = \frac{2}{3}, \quad \Pr[R] = \frac{1}{3}, \quad \Pr[Y \mid R] = 1. \tag{1}$$
These are fixed by the design and known to us.
The first part of the question asks for the quantity $\Pr[A \mid Y]$, the probability that a driver was in an accident in the past year given that they responded 'yes' after the die roll. Then
$$\Pr[A \mid Y] = \frac{\Pr[Y \mid A]\Pr[A]}{\Pr[Y \mid A]\Pr[A] + \Pr[Y \mid \bar A]\Pr[\bar A]} = \frac{\Pr[Y \mid A]p}{\Pr[Y \mid A]p + \Pr[Y \mid \bar A](1-p)}, \tag{2}$$ where for the sake of convenience, we let $\Pr[A] = p$, and so $\Pr[\bar A] = 1-p$. To evaluate the remaining conditional probabilities, we observe that $$\Pr[Y \mid A] = 1, \tag{3}$$ because if a driver was in an accident in the last year, it doesn't matter what the outcome of the die roll was: if they rolled green, they would answer 'yes' to the question, and if they rolled red, they answer 'yes' always. But what about $\Pr[Y \mid \bar A]$? This is strictly less than $1$ since if they rolled green, they would answer 'no', but if they rolled red, they would answer 'yes'. Formally,
$$\Pr[Y \mid \bar A] = \Pr[Y \mid (\bar A \cap G)]\Pr[G] + \Pr[Y \mid (\bar A \cap R)]\Pr[R] = 0 \cdot \frac{2}{3} + 1 \cdot \frac{1}{3} = \frac{1}{3}. \tag{4}$$ Therefore,
$$\Pr[A \mid Y] = \frac{p}{p + \frac{1}{3}(1-p)} = \frac{3p}{1+2p}. \tag{5}$$
For $p = 30\%$, we get $$\Pr[A \mid Y] = \frac{9}{16}.$$ This is the correct answer for part (a); your answer of $3/8$ is incorrect for the reason I mentioned at the beginning of this answer.
For the second part of the question, we are given the empirical estimate $$\widehat{\Pr[Y]} = \frac{7}{20}, \tag{6}$$ that is, we estimate that about $35\%$ of respondents will answer 'yes' in our experiment. We wish to use this estimate to estimate $\Pr[A] = p$. To this end, we write $$\Pr[A] = \Pr[A \mid Y]\Pr[Y] + \Pr[A \mid N]\Pr[N], \tag{7}$$ where $N$ is the complementary event to $Y$ (the driver answers 'no'). But because a driver who answers 'no' after the die roll cannot have been in an accident in the last year, $\Pr[A \mid N] = 0$ and we have (after substituting Equation 5)
$$p = \Pr[A] = \Pr[A \mid Y]\Pr[Y] = \frac{3p}{1+2p} \Pr[Y]. \tag{8}.$$ Thus our estimate of $\widehat{\Pr[A]} = \hat p$ is $$\hat p = \frac{3\widehat{\Pr[Y]} - 1}{2} = \frac{1}{40}.$$ This makes sense because on average, we would expect to see $1/3$ of responses be 'yes' even if no drivers were in accidents in the last year, simply by random chance of the die roll. Since the observed proportion was only slightly higher at $35\%$, representing a $2\%$ point increase over random chance, we should expect that the true accident rate is slightly more than $1$ in $50$ (since we have to account for those drivers who were in accidents but also rolled a red die and answered 'yes' anyway).
So this leads us to an interesting question: what if we performed this experiment and obtained a 'yes' proportion that was less than $1/3$; e.g., what if, among $100$ drivers, we had $25$ say 'yes'? What would be our so-called "best estimate" of the true proportion of drivers who were in accidents in the past year? For if we used Equation $8$ above, our estimate would be $$\widehat{\Pr[A]} = \frac{3(0.25) - 1}{2} = -\frac{1}{8},$$ which is clearly absurd. In this situation, the most plausible estimate is that $\widehat{\Pr[A]} = 0$. So we should really modify Equation $8$ to say
$$\widehat{\Pr[A]} = \max \left( 0, \frac{3 \widehat{\Pr[Y]} - 1}{2} \right).$$
What is the point of this type of experiment? The idea here is to use a randomization technique to correct for bias caused by responders who might not be willing to answer a question truthfully due to embarrassment. By inserting this die roll into the process, we introduce a level of plausible deniability (so long as the outcome of that roll is kept secret). The driver can feel free to say 'yes' when the outcome of the roll is green, because they know that their answer is indistinguishable from another driver's 'yes' being due to having rolled red. Yet we are still able to use probability theory to recover the original estimate for the true accident probability, albeit with less precision than if we had completely truthful data without the die roll. The price we pay for this masking procedure to avoid bias is an increase in the variance of the estimator.