The paper demonstrates that the W UMa-type systems have a potential of playing an important role in studies of the Galactic structure due to their high spatial frequency of occurrence , ease of detection and reasonably tight absolute-magnitude ( period , color ) calibration . An algorithm , based on Fourier decomposition of light curves , permitted to define a sample of 388 contact binaries with well observed light curves , periods shorter one day and with available V - I colors ( the R-sample ) , from among 933 eclipsing binary systems in the OGLE variable-star catalog for 9 fields of Baade ’ s Window . The sample of such systems which was visually classified by the OGLE project as EW-type binaries ( the O-sample ) is by 55 % larger and consists of 604 stars . The algorithm prevents inclusion of RR Lyr and SX Phe stars which in visual classification might be mistakenly taken for contact binaries with periods equal to twice their pulsation periods . Determinations of distances for the contact systems , utilizing the M _ { I } = M _ { I } ( \log P,V - I ) absolute-magnitude calibration and the map of reddening and extinction of Stanek \markcite sta1 ( 1996 ) , indicate an approximately uniform distribution of contact binaries almost all the way to the Galactic Bulge ( there is a hint of a gap at 6.5 to 8 kpc ) , with 9 well observed systems identified in the Bulge . The distances have been derived assuming two hypotheses : ( 1 ) extinction extends uniformly all the way to the Bulge at d _ { 0 } = 8 kpc or ( 2 ) extinction is truncated at d _ { 0 } = 2 kpc . Analysis of the period–color diagram favors the latter hypothesis which has been assumed throughout the paper . The uniform distribution of the contact systems with distance , implying heights up to z \leq 420 - 450 pc , as well as a tendency for their colors to be concentrated in the region normally occupied by old Turn-Off-Point stars , confirm the currently held opinion that contact binary systems belong to the old stellar population of the Galaxy . A first attempt to construct the luminosity function for contact binaries has been made for samples defined by distances of 2 and 3 kpc . The apparent density of contact systems is about ( 7 - 10 ) \times 10 ^ { -5 } systems per pc ^ { 3 } , with the main uncertainty coming from the definitions of the R- and O-samples . If the spatial density ( corrected for undetected low-inclination systems ) is two times higher than the lower limit of the above range , and equals 1.5 \times 10 ^ { -4 } systems per pc ^ { 3 } , then one star among 400 Main Sequence stars is a contact system ; however , this number includes M-dwarfs among which contact binaries do not occur . An independent estimate of the apparent frequency , relative to nearby dwarfs with colors similar to those of the contact binaries , obtained in the volume-limited sense to 2 and 3 kpc , is one contact system per about 250 – 300 Main Sequence stars , which agrees well with the recent estimates for old open clusters and their background/foreground fields .