A population of a beetle species has two alleles, A and a, for a gene controlling wing colour. The table shows the frequencies of these alleles before and after a severe flood that killed most of the population.
| Time | Frequency of allele A | Frequency of allele a |
|---|---|---|
| Before flood | 0.6 | 0.4 |
| After flood | 0.2 | 0.8 |
Explain how this change in allele frequencies could have occurred.