Let $Xn$ be a random walk with absorbing barriers on state space $S = \{0, 1, \ldots, 15\}$ with probability $p=\frac{3}{4}$ of moving to the right and $1-p=\frac{1}{4}$ for moving to the left. Let $f: S \to \mathbb{R}$ be a function with $f(0) = 1$; $f(15) = 10$. Suppose that $X_0=6$ and that we know that $$M_n := f(X_n)$$ is a martingale with respect to the filltration $\{\mathcal{F}_N\}$ where $\mathcal{F}_n$ is the information in $X_0, X_1,\ldots,X_n$. What are the possible values for f(2)?
My attempt: So we know that $X_0=6$, and it is well known that the probability for which $X_n$ is absorbed at $15$ is $$P(\lim_{n\to \infty}X_n=15)=\frac{1-(\frac{1-p}{p})^6}{1-(\frac{1-p}{p})^{15}}\approx0.9986$$
Using the martingale property we must have $E(M_n)=E(M_0)$ for all $n$. Thus, $$E(\lim_{n\to \infty}X_n)=E(M_0)\approx 0.9986f(15)+(1-0.9986)f(1)=9.9877$$
After this I am not quite sure what to do. Is this the correct start?
I think this is on the right track! We need optional stopping to finish the rest.
Suppose $T = \min\{t > 0 | X_t \in \{2, 15\}\}$. This is a stopping time, and in essence, it lifts the absorption state from 0 to 2.
By optional stopping, $\mathbb{E}(M_T) = \mathbb{E}(M_0) = f(6)$ you computed, and on the other hand, $\mathbb{E}(M_T) = P(X_T = 2) f(2) + P(X_T = 15) f(15)$. We can then solve for $f(2)$.
For states greater than 6, we can apply the same trick but pick a stopping time with boundaries 0 and that number.