Four letters are typed at random so that each of the $26$ latin alphabet letters is equally likely and the letters are typed independently of one another. What is the expected number of times the word OF appears in this four letters long random text?
My attempt is
Let
$X$: random variable where O appears
$Y$: random variable where F appears
$$E(X) = 0 + P(X=1)x_1 = 1/26$$
$$E(Y) = 0 + P(X=1)x_1 = 1/26$$
$$\Rightarrow E(X+Y) = E(X) + E(Y) = 2/26 $$ (because i think $X$ and $Y$ are joint rather than independent since it should happen at the same time but i am very uncertain)
Thank you very much
You need $O$ to appear in one of the first three places, with probability $\frac 3{26}$ then $F$ to appear next with probability $\frac 1{26}$ so it would appear it is $\frac 3{26^2}$ but you have counted $OFOF$ twice so it is $\frac 3{26^2}-\frac 1{26^4}$