Let a wave function $\displaystyle \Psi(x) \equiv \frac{1}{Z}\sum_{i=1}^n \psi_i(x)$ with $n, Z \in \mathbb{R^+_0}$ such as $\displaystyle ||\Psi(x)||^2 \equiv \int_\mathbb{R} \Psi^\star(x).\Psi(x) \ dx = 1 = ||\psi_i(x)||^2$. Considering the Schrödinger equations $\displaystyle H\Psi = E\Psi \ \mathrm{and} \ H\psi_i = E_i\psi_i$, I would like to prove that:
$$\langle E \rangle_\psi \equiv \langle \Psi | H| \Psi\rangle \equiv \int_\mathbb{R}\Psi(x)^\star.H.\Psi(x) \ dx \equiv \int_\mathbb{R}\Psi^\star(x)\frac{-\hbar^2}{2m} \Delta\Psi(x) \ dx = \sum_{i=1}^n P(E_i)E_i$$
with $\displaystyle P(E_i) \equiv |\langle \psi_i | \Psi\rangle|^2 \equiv \left|\int_\mathbb{R}\psi_i^\star(x) \Psi(x) \ dx \right|^2$. I really have no idea how to proceed, I need to be able to use this formula to quickly calculate the mean value of the energy $E$ concidering a superposition of wave functions $\psi_i$ knowing $E_i$.
Do you have any idea of how to demonstrate that formula ?