Imagine an experiment of tossing $n$ identical coins. The probability of observing a head is $p$ and of observing a tail is $1-p$ for any coin.
We are interested in calculating the expected value of the fraction of tosses that show heads.
This is easy because the expected number of heads is $np$ and the total number of tosses is a constant i.e. $n$. So, the expected value of the fraction of tosses with heads is $\frac{np}{n} = p$.
Now, there is a twist. The twist is that if a toss shows tail, then it is always considered part of the experiment but if it shows head, then it is considered part of the experiment with probability $q$. In other words, the denominator in the fraction is not a constant $n$ anymore. I know that we can easily calculate the expected value of numerator and denominator separately but that won't give the expected value of the ratio of the two. How can we solve it ?
Please note the difference from a simpler question in which only the count of heads decreases by a factor of $q$ but not the total number of tosses that are considered in the experiment.