I tried to solve the following exercise
Let's consider a 3 period binomial market model ($t=0,1,2,3$). We know that the current spot price is $S_0=40$ with parameters $u=1.5$ and $d=0.5$. The annual risk-free interest rate is $r=4%$. What are $$\mathbb{E}(S_3\mid S_2),\quad \mathbb{E}(S_2\mid S_1), \quad \mathbb{E}(S_1\mid S_0)$$
Now the first thing I did was to compute the value of $$S_t=S_0u^{n}d^{m}$$ in each node for $n,m\in \{1,2,3\}$ and $n+m\leq 3$. \begin{matrix} & & & S_3=135 \\ && S_2=60 & \\ &S_1=60&& S_3=45\\ S_0=40 & & S_2=30 & \\ &S_1=20&& S_3=15\\ && S_2=10 & \\ && & S_3=5 \end{matrix}
Let $\Omega_t$ be the possible values of $S_t$ at time $t$
Now we have $$\mathbb{E}(S_1\mid S_0)=\sum\limits_{\Omega_1} sP(S_1=s\mid S_0)=20\cdot P(S_1=20\mid S_0)+ 60 \cdot P(S_1=60\mid S_0)$$
$$\mathbb{E}(S_2\mid S_1)=\sum\limits_{\Omega_2} sP(S_2=s\mid S_1)=60\cdot P(S_2=60\mid S_1)+ 30 \cdot P(S_2=30\mid S_1)+ 10 \cdot P(S_2=10\mid S_1)$$
$$\mathbb{E}(S_3\mid S_2)=\sum\limits_{\Omega_3} sP(S_3=s\mid S_2)=135\cdot P(S_3=135\mid S_2)+ 45 \cdots$$
The unconditional probability distribution of $S_t$ should be $S_t\sim \text{Ber}(p)$ for some unkown $p$. But how can I compute the conditional probabilities? Why do I need the information of the interest rate?
I don't know if I have to use the maringale property $\mathbb{E}(S_{t+1}\mid \sigma{(S_0,\dots,S_t)})=S_t$
$$E[S_{t+1} | S_t] \stackrel{(*)}{=} E[E[S_{t+1} | S_0, \cdots, S_t]|S_t] = E[S_t | S_t] = S_t$$
$(*)$ is because of tower rule