The following question is somewhat related to:
Let $(X_i)_{i=1}^n$ be a sequence of i.i.d. random variables with $\Pr(X_i=1)=\Pr(X_i=-1)=1/2$. Let $S_0=0$ and, for $1\le i\le n$, $S_i = X_1+X_2+\cdots+X_i$. Let $\Pi_n$ denote the number of strictly positive terms among $S_1,\ldots,S_n$. In the symmetric case, namely, when $p=1/2$, the law of $\Pi_n$ is known to be (e.g. Feller, Ch. XII.8) $$ \Pr(\Pi_{n}=k) = {2k\choose k}{2n-2k\choose n-k}\frac1{2^{2n}}. $$ I am trying to find asymptotic (in $k,m,n$) formula for the number of positive terms given the value of the last term, or more generally, $$ \Pr(\Pi_{n}=k,S_n=m) $$ Of course not all values of $k,m$ are possible. Also, clearly, the additional event that $S_n=m$ breaks the nice symmetry of the process $(X_i)_{i=1}^n$, so in some sense $(X_i)_{i=1}^n$ can be thought as being drawn uniformly over some subspace of the hyper-cube. Note that this probability can be probably upper bounded by removing the $S_n=m$ constraint but assuming that $(X_i)_{i=1}^n$ is now an asymmetric process with success probability that is proportional to $m/n$.