# Canoniical Partition function: Fraction of molecules Having a Particular Energy

Let us consider a canonical system of N independent, distingusiable harmonic oscillators in 1D. Its partition function $$Z = (Z_{sp})^N = \left(\sum_{n=0}^{\infty} e^{-\beta E_i}\right)^N$$ where, $Z_{sp}$ is the single particle partition function of a simple harmonic oscillator, $E_i$ is the energy of a simple harmonic oscillator in 1D given by $(n+1/2)\hbar\omega$, $n = 0,1,2, \cdots.$

I want to know the fraction of oscillators in a given exicited state of energy $E_j$. I think the answer should be as follows.

$$\frac{e^{-\beta E_i}}{Z}$$ where, $Z$ is given above.

But I have got confused because in Atkin's Physical Chemistry $Z_{sp}$ has been used instead of $Z$ (Eq. (16.7)).

Question: Why is this so? Where am I missing the point?

Let me denote by $\mathcal{E}_k$ the random variable corresponding to the energy of the $k$th oscillator. Note that, by the assumed independence of the oscillators, $$\mathbb{P}^{(N)}(\mathcal{E}_1=e_1,\dots,\mathcal{E}_N=e_N) = \mathbb{P}^{(1)}(\mathcal{E}_1=e_1) \cdots \mathbb{P}^{(1)}(\mathcal{E}_N=e_N),$$ where $\mathbb{P}^{(N)}$ denotes the joint probability distribution of the $N$ oscillators, while $\mathbb{P}^{(1)}$ denotes the probability distribution associated to a single oscillator, that is $$\mathbb{P}^{(1)}(\mathcal{E}_k=e)=\frac{e^{-\beta e}}{Z_{sp}},$$ whenever $e=E_k$ for some $k$. In particular, $$\mathbb{P}^{(N)}(\mathcal{E}_k=e_k) = \sum_{e_1,\dots,e_{k-1}\,,e_{k+1}\,,\dots,e_N}\mathbb{P}^{(N)}(\mathcal{E}_1=e_1, \dots ,\mathcal{E}_N=e_N) = \mathbb{P}^{(1)}(\mathcal{E}_k=e_k).$$ The fraction of oscillators with energy $E_j$ is thus $$\frac1{N}\mathbb{E}^{(N)}\Bigl( \sum_{k=1}^N \mathbf{1}_{\{\mathcal{E}_k=E_j\}} \Bigr) = \frac1N \sum_{k=1}^N \mathbb{P}^{(N)}(\mathcal{E}_k=E_j) = \frac1N \sum_{k=1}^N \mathbb{P}^{(1)}(\mathcal{E}_k=E_j) = \frac{e^{-\beta E_j}}{Z_{sp}}.$$