  The nature of type II Cepheids and anomalous Cepheids is still not well known
and their evolutionary channels leave many unanswered questions. We use
complete collection of classical pulsating stars in the Magellanic Clouds
discovered by the OGLE project, to compare their spatial distributions, which
are one of the characteristic features directly related to the star formation
history. In this analysis we use 9649 classical Cepheids, 262 anomalous
Cepheids, 338 type II Cepheids and 46 443 RR Lyr stars from both Magellanic
Clouds. We compute three-dimensional Kolmogorov-Smirnov tests for every
possible pair of type II and anomalous Cepheids with classical Cepheids, and RR
Lyr stars. We confirm that BL Her stars are as old as RR Lyr variable stars -
their spatial distributions are similar, and they create a vast halo around
both galaxies. We discover that spatial distribution of W Vir stars has
attributes characteristic for both young and old stellar populations. Hence, it
seems that these similarities are related to the concentration of these stars
in the center of the Large Magellanic Cloud, and the lack of a vast halo. This
leads to the conclusion that W Vir variables could be a mixture of old and
intermediate-age stars. Our analysis of the three-dimensional distributions of
anomalous Cepheids shows that they differ significantly from classical
Cepheids. Statistical tests of anomalous Cepheids distributions with RR Lyr
distributions do not give unambiguous results. We consider that these two
distributions can be similar through the vast halos they create. This
similarity would confirm anomalous Cepheids evolution scenario that assumes
coalescence of a binary system.
