3
$\begingroup$

Program 1 and Program 2 can either print A, B, or C upon activation.

Program 1 prints any of the 3 letters with equal probability, while Program 2 prints A with 50% probability, and B or C with 25% probability each.

A program is randomly selected and activated 7 times, printing A, C, C, B, A, B, A. I need to find the probability that program 2 was chosen.

I was thinking I would have to use the Total Probability theorem, and add up the probabilities of all the letters received, given that program 2 was chosen.

(.5)(.5) + (.5)(.25) + (.5)(.25) + (.5)(.25) + (.5)(.5) + (.5)(.25) + (.5)(.5)

((.5 represents the probability of program 1 being chosen, and it would be multiplied by program 's probabilities for choosing either letter, either A (.5) or B or C (.25)))

But this gives me a number greater than 1, which can't be correct. May I ask how to go about attempting this problem, please?

$\endgroup$
5
  • 2
    $\begingroup$ Are the programs names 1 and 2, and they print the letters A, B or C? If so, can you please edit your question so that this is clearly stated. As of yet, you are talking about programs 1,2, A, B, C and letters A, B, C and it is quite confusing which is doing what. $\endgroup$
    – William M.
    Commented Mar 10, 2022 at 23:31
  • 2
    $\begingroup$ Suggest that you re-write your question, because you blur such terms as "Program 1" with "Program A", which confuses the reader. I was able to reverse engineer your intended question, but I should not have had to do that. Going forward, with this question and your future mathSE questions, please proofread your question both before posting and after posting. Then, please edit your question to remove any ambiguities or confusion. $\endgroup$ Commented Mar 10, 2022 at 23:32
  • 2
    $\begingroup$ Impossible to solve unless you know something about the dependence/independence of successive letters that are typed. The above problem wording uses the "independence always holds whenever I want" fallacy. $\endgroup$
    – Michael
    Commented Mar 11, 2022 at 0:18
  • 2
    $\begingroup$ @Michael See the just added Addendum to my answer. $\endgroup$ Commented Mar 11, 2022 at 2:38
  • 1
    $\begingroup$ @Michael probably the most misused fallacy in probability.:) $\endgroup$
    – DRF
    Commented Mar 11, 2022 at 8:12

1 Answer 1

6
$\begingroup$

This answer assumes that you used "Program A" when you intended "Program 1" and that you used "Program B" when you intended "Program 2".

This is a straight Bayes Theorem problem.

You have an event $E$ which is that
A, C, C, B, A, B, A
was printed.

Let $p(E|1)$ denote the probability that event $E$ would have occurred if Program 1 had been chosen.

Let $p(E|2)$ denote the probability that event $E$ would have occurred if Program 2 had been chosen.

Then, the probability of Program 1 (rather than Program 2) being the program that was used is

$$\frac{p(E|1)}{p(E|1) + p(E|2)}. \tag1 $$

Therefore, given the formula in (1) above, the problem reduces to computing $p(E|1)$ and $p(E|2)$.


Clearly, $$p(E|1) = \frac{1}{3^7}.$$

The shortcut to computing $p(E|2)$ is that the computation is unchanged if you change the event to the printing of

A, A, A, B, B, C, C.

So,

$$p(E|2) = \frac{1}{2^3} \times \frac{1}{4^2} \times \frac{1}{4^2} = \frac{1}{2^{(11)}}.$$

Putting this all together,

$$p(E|1) = \frac{\frac{1}{3^7}}{\frac{1}{3^7} + \frac{1}{2^{(11)}}}.$$


Edit
There is a certain informality in the above analysis. More formally, what I might have said is:

Let $p(E,1)$ denote the probability that Program-1 was chosen, and that then event $E$ occurred.

Let $p(E,2)$ denote the probability that Program-2 was chosen, and that then event $E$ occurred.

Then, the probability that Program-1 was chosen is

$$\frac{p(E,1)}{p(E,1) + p(E,2)}.$$

Since, absent any other information, it is assumed that Program-1 and Program-2 each have a $50\%$ chance of being chosen, you end up with a computation that yields an equivalent answer. I used the informal approach (instead) instinctively, because that is the way my intuition went.


Addendum
Response to the comment of Michael, following the original question.

His comment makes sense to me. I assumed that each letter is an independent event, whose probability of being printed is unaffected by the letters printed before or after. Further, I (also) agree that without this assumption, the problem is not solvable.

$\endgroup$
2
  • $\begingroup$ (Apologies, I made a typo, I didn't mean to type out Program A and Program B, I meant to say Program 1 and Program 2.) Thank you for your feedback. So, the probability for Program-2 would therefore be: p(E, 2)/p(E, 2) + p(E, 1) And thus be: (1/2^11)/(1/2^11) + (1/3^7) ? $\endgroup$
    – Erique
    Commented Mar 11, 2022 at 6:18
  • $\begingroup$ @Erique Yes, that's right. $\endgroup$ Commented Mar 11, 2022 at 16:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .