Let $C=\{000,111,222,333,444\}$
The question is to find the probability $p_c$ of a word being correctly received if each symbol has the probability $t$ of being incorrectly received and each wrong symbol is equally likely.
The solution is $p_c=(1-t)^3+12 \times \frac{t}{4} (1-t)^2$
I understand the reasoning and understand where this expression comes from except for the dividing by $4$ term.
Some background behind the solution: If $000$ is sent then the received words decoded as $000$ are
$000$ for which there is one of this.
$i00$ for $i \neq 0$ and there are four of these because $i$ could be replaced by $1,2,3$ or $4$
$0i0$ for $i \neq 0$ and there are four of these because $i$ could be replaced by $1,2,3$ or $4$
$0i0$ for $i \neq 0 $ and there are four of these because $i$ could be replaced by $1,2,3$ or $4$
So the $12$ in our solution comes from doing $3 \times 4$.
The formula used: P(i errors in specified positions)$=t^i (1-t)^{n-1}$
where $n$ is length of the code and $i$ is the number of errors so in our case it is $1$ barring when we are looking at the $000$ word as here there are no errors so $i=0$.
So the solution is $p_c=1^0 \times (1-t)^{3-0} + 4 \times t^1(1-t)^{3-2} + 4 \times t^1 (1-t)^{3-2} + 4 \times t^1(1-t)^{3-2}$
Which simplifies down to $p_c=(1-t)^3+12 \times t (1-t)^2$
Why do we divide $t$ by $4$?
You're counting each letter as a separate event but then multiplying by the probability $t$ for any of them to occur. You should either count the event of receiving some wrong letter as a whole, and multiply by its probability $t$, or, if you want to treat the letters as separate events, you need to multiply by their individual probability, which is $\frac t4$. In either case, you end up with $3t$.