Additionally: Use a simple symmetric random walk as the proposal distribution. Source: "Introduction to Stochastic Processes with R" - Robert P. Dobrow, Chapter 5 Exercises: Question 5.6
I know this is typically done in software but I want to comprehend the method by hand. I feel very uncomfortable with my comprehension of Bayesian Statistics:
I have $u$ ~ $Uniform(0,1)$
My understanding is that the above is my prior and the likelihood is the density function I want to derive samples from.
But how do I create my acceptance function? My professor presented it as having a random walk starting at state $k=0$, and moving to $k=1$ if $u < \lambda$ and then moving left or right with probability $.5$ (he says just flip a coin. Basically if heads move right, if tails move left).
Then move to the proposal state with the following criteria:
Move to k-1 if,
$$u< \frac{\frac{e^{-\lambda}\lambda^{k-1}}{(k-1)!}}{\frac{e^{-\lambda}\lambda^{k}}{k!}} = \frac{\lambda}{k+1}$$
Similar procedure for moving to (k+1).
What confuses me is how to tie this into the the acceptance probability that is always taught when learning Metropolis-Hastings. Namely,
$$a(i,j) = \frac{\pi_{j} T_{ji}}{\pi_{i}T_{ij}}$$
Sorry if this question is messy. I've been spending so much time on this and am still struggling to wrap my mind around it. Thank you for your answer in advance! I appreciate all help!