For a one-dimensional random walk (starting at $0$) for which we move $1$ unit to the right with probability $p$ and $1$ unit to the left with probability $q=1-p>p$, what is the expected time spent in the interval $(0,\infty)$ (equivalently, $[1,\infty)$)?
It is not too hard to come up with an expression for this involving infinite sums and binomial coefficients, but there does not seem to be a straightforward way to put it in closed form. Alternatively, I'm looking for some sort of (asymptotic) estimate if possible.
There are several combinatorial shortcuts which make the calculation not too difficult, and it is worth knowing that $\frac{x}{1-x}=x(1-x)+2x^2(1-x)+3x^3(1-x)+\cdots$ for $|x|<1$
Assuming $0 < p < \frac12$, the probability of moving right initially and then returning to $0$ is $p$. By symmetry, the probability of moving left initially and then returning to $0$ is also $p$, so the probability of moving left initially but never returning to $0$ is $1-2p$.
So the expected number of returns to $0$ is $$1\times 2p(1-2p) + 2\times (2p)^2(1-2p)+3\times (2p)^3(1-2p)+ \cdots = \frac{2p}{1-2p}$$ and half of these are expected to start by moving right into positive territory, so $\dfrac{p}{1-2p}$.
Suppose the conditional expected time positive on a trip which starts at $0$, moves right, and then returns to $0$ is $T$. Then the first step takes you to $+1$ and then
and so on. This means $$T= 1\times (1-p) + (T+2)\times p(1-p)+(2T+3)\times p^2(1-p) + \cdots \\= 1+ (T+1)\frac{p}{1-p}$$
which gives $T=\dfrac{1}{1-2p}$.
Multiplying by the overall expected number of trips into positive territory then gives the overall expected time in positive territory of $$\frac{p}{(1-2p)^2}.$$
For $p=0.4$ this would give an expected time in positive territory of $10$, though with a widely dispersed distribution of possible values. To check, here is a simulation in R: