# boltzmann machine; from logistic function to boltzmann distribution

I'm trying to understand BM; on this topic, tutorials explain it with two formulas: logistic function for the probabilty of single units

$p(unit=1)=\frac{1}{1+e^{-\sum\limits_xwx}}$

and, when the machine is running, every state of the machine go to the probability

$p(State= state\ with\ energy\ E_i )=\frac{e^{-E_i}}{\sum\limits_i e^{-E_i}}$

so, the state depends by the units, and then if I understand, the second formula is a consequenze of the first; so, how can it the proof that the distribution of $p(state)$ is a consequence of $p(unit)$?