At thermal equilibrium, the Fermi level is defined as the point where the probability of an electron being at the conduction edge equals the probability of a hole being at the valence edge. This occurs at:
\[E_F = \frac{E_c + E_v}{2}\]
This relation ensures that the Fermi level lies symmetrically between the conduction and valence bands.