So let's say I have a single ($N=1$) quantum harmonic oscillator and the energy is determined by $E_n = (n + 1/2) \cdot \hbar \omega$ (where $n$ is the quantum number and $n$ = $0, 1, 2, \ldots$)
What's the probability that the oscillator is in the state labeled $n$ at temperature $T$?
So according to my calculation, $Z$, the partition function, is $Z = 1 / (1 - x)$ where $x = e^{-\beta \hbar \omega} \Rightarrow P = x ^ n (1 - x)$.
Is it correct? Also, how do I go about calculating the probability of finding the oscillator in a state with odd quantum number?