Understanding the Fermi level and the Fermi-Dirac distribution I'm confused about why the Fermi level is located inside the band gap in semiconductors because it's defined to be the energy level where an electron has a 50% chance to be, but there can't be electrons in the band gap. I now think they mean it's the energy where the Fermi-Dirac distribution reaches 50% but now I'm wondering what this distribution even means when there is a band gap. It's a distribution that gives the occupation probability for a certain energy (given a certain temperature). But why isn't the occupation probability zero in the band gap? Or does it give the occupation in case there was no band gap? 
In any case, I was wondering how to interpret the picture below. On the left, the valence band is completely occupied. In the middle, there are a lot of states with a lower occupation probability in the valence band compared to the left, but very few in the conduction band with a higher (but still very small) occupation probability. But it can't be the case that there are suddenly less states being occupied because there are still as many electrons as before. So what am I getting wrong? And how can I interpret the Fermi-Dirac distribution better?
Thanks in advance.

 A: Fermi energy vs. Fermi level
One has to distinguish between the Fermi energy and the Fermi level (=chemical potential). The former is the energy of the topmost energy state, whereas the latter is the energy needed to add/remove an electron (and also the parameter of Fermi-Dirac distribution). In a continuous spectrum at zero temperature the two are the same, which is why the two terms are often used interchangeably. In semiconductors they are not identical... and usually both mean chemical potential, since speaking of a Fermi energy in a semiconductors doesn't make much sense (if we define it as the difference between the highest and the lowest occupied energy states, it is just equal to the width of the valence band).
Fermi function and density-of-states
So here we are dealing with the chemical potential: adding the last electron to the valence band costs zero energy, whereas adding the first electron to the conduction band costs the gap energy $E_g$, which is why the Fermi level is chosen to be in the middle of the gap. More mathematically strict: the total concentration of electrons is given by
$$n =\int dE \rho(E)f_\mu(E)=\int dE \frac{\rho(E)}{e^{\frac{E-\mu}{k_BT}}+1},$$
where $\rho(E)$ us the density-of-states. This concentration should not change with temperature, i.e. all the electrons removed from the valence band should be found in the conduction band. Note, that the density-of-states is zero in the gap region: the fact that the Fermi function is not zero there does matter, since there are no states that electrons could occupy.
