When a material is doped with a donor density of $N_d$, I can easily calculate the concentration of electrons and holes in the following way:
$$n\approx N_d\\p=\frac{n_i^2}{n}=\frac{n_i^2}{N_d}$$
Similarly, when a material is doped with an acceptor density of $N_a$: $$p\approx N_a\\n=\frac{n_i^2}{p}=\frac{n_i^2}{N_a}$$
But what happens when I dope a material with both donors and acceptors? Do the donor electrons recombine with the acceptor holes? This would result in:$$n\approx N_d-N_a\space \space , N_d>N_a$$ $$p\approx N_a-N_d\space \space , N_a>N_d$$
Is this the case?