I was reading the proof of Metropolis algorithm.
The transition probability of going from a state $i$ to a state $j$ is $\pi_{ij}$. If I understand correctly, this is the product $\pi_{i j}=\alpha_{ij}p_{ij}$ where $\alpha_{ij}$ is the probability of selecting the spin that is flipped when going from $i$ to $j$ and $p_{ij}$ is the acceptance probability ($1$ if the new state lowers total energy and $e^{-\beta \Delta E}$ if it doesn't).
What I don't understand is detailed balance. It is said that $p_i \pi_{ij}=p_j \pi_{ji}$. I don't know what $p_{i}$ is. What is the difference with $\pi_{ij}$?
And when I calculate average observables numerically , such as energy, should I take the value of one should I take the mean?