Probability of finding a molecule in the ground vibrational level I wanted to estimate the probability of finding a molecule in the ground vibrational level using the Boltzmann distribution:

$$
p_i = \frac{e^{-\epsilon_i/kT}}{\sum_{i=0}^{N}e^{-\epsilon_i/kT}}
$$

Using the quantum harmonic oscillator as a model for the energy

$$
\epsilon_i = h\nu (i+1/2) =/i=0/=\frac{h\nu}{2}
$$

In the Boltzmann distribution, we have the state of interest divided by the sum of all possible states. But how should I treat the denominator?



Searching a bit I found that the analytical expression for this geometric series is ($i$ not imaginary number)

$$
\sum_{i=0}^{N}e^{-i h\nu/kT} = \frac{1}{1 - e^{h\nu/kT}}
$$

However, is this using a shifted energy scale for the harmonic potential? In that the vibrational energies are $0$, $h\nu$, $2h\nu$, ..., and not $\frac{1}{2}h\nu$, $\frac{3}{2}h\nu$, $\frac{5}{2}h\nu$, ...? Should I make sure I use the same energy scale for the nominator and denominator in the Boltzmann distribution?



Doing what porphyrin suggested, I get

$$
\sum_{i=0}^{\infty} e^{-h\nu(i+\frac{1}{2})/kT} = e^{-h\nu/kT} \sum_{i=0}^{\infty} e^{- ih\nu/kT}
$$

Expanding the four first terms

$$
e^{-h\nu/kT} \sum_{i=0}^{\infty} e^{- ih\nu/kT} = (e^{-h\nu/kT} \cdot 1) + (e^{-h\nu/kT} \cdot e^{-h\nu/kT}) + (e^{-h\nu/kT} \cdot e^{-2h\nu/kT}) + (e^{-h\nu/kT} \cdot e^{-3h\nu/kT}) \\
= e^{-h\nu/kT} + e^{-2h\nu/kT} + e^{-3h\nu/kT} + e^{-4h\nu/kT} = \sum_{1}^{\infty}e^{-n\cdot h\nu/kT}
$$

which has an analytical expression for the converged value, right?
You're on the right track. 

Also, using $i$ as an index can be confusing some times because it can be confused with the imaginary number; however, here it should not present a problem. As a matter of habbit however, I like to use $j$ or $n$ or something else..there are only so many letters in the alphabet.

The sum in the denominator is called the partition function, and has the form

$$Z = \sum_{j}e^{-\frac{\epsilon_j}{kT}}$$

For the harmonic, oscillator $\epsilon_j = (\frac{1}{2}+j)\hbar \omega$ for $j \in \{ 0,1,2.. \}$

Note that $\epsilon_0 \neq 0$ there exists a zero point energy.

Let's write out a few terms $$Z = e^{-\frac{\hbar \omega/2}{kT}} + e^{-\frac{\hbar \omega3/2}{kT}} + e^{-\frac{\hbar \omega5/2}{kT}} +..... $$

factoring out $e^{-\frac{\hbar \omega/2}{kT}}$

$$Z = e^{-\frac{\hbar \omega/2}{kT}} \left( 1+ e^{-\frac{\hbar \omega}{kT}} + e^{-\frac{2\hbar \omega}{kT}} +.....\right) $$

The sum in the bracket takes the form of a geometric series whose sum converges as shown below $$1+x+x^2+... = \frac{1}{(1-x)} $$
 herein, $ x \equiv e^{-\frac{\hbar\omega}{kT}} $

Putting all of this together

$$Z = \frac{e^{-\frac{\hbar \omega/2}{kT}}}{(1-e^{-\frac{\hbar\omega}{kT}})}$$

Now, $$p_0 = \frac{e^{-\epsilon_0/kT}}{Z} = \frac{e^{-\frac{\hbar \omega/2}{kT}}}{Z} = \frac{e^{-\frac{\hbar \omega/2}{kT}}}{\frac{e^{-\frac{\hbar \omega/2}{kT}}}{(1-e^{-\frac{\hbar\omega}{kT}})}} = (1-e^{-\frac{\hbar\omega}{kT}}) $$