We calculated spatial correlation functions of galaxies, $xi(r)$, structure functions, $g(r)=1 +xi(r)$, gradient functions, $gamma(r)= d log g(r)/ d log r$, and fractal dimension functions, $D(r)= 3+gamma(r)$, using dark matter particles of the biased $Lambda$ cold dark matter (CDM) simulation, observed galaxies of the Sloan Digital Sky Survey (SDSS), and simulated galaxies of the Millennium and EAGLE simulations. We analysed how these functions describe fractal and biasing properties of the cosmic web. The correlation functions of the biased $Lambda$CDM model samples at small distances (particle and galaxy separations), $r le 2.25$~Mpc, describe the distribution of matter inside dark matter (DM) halos. In real and simulated galaxy samples, only the brightest galaxies in clusters are visible, and the transition from clusters to filaments occurs at a distance $r approx 0.8 - 1.5$~Mpc. Real and simulated galaxies of low luminosity, $M_r ge -19$, have almost identical correlation lengths and amplitudes, indicating that dwarf galaxies are satellites of brighter galaxies, and do not form a smooth population in voids. The combination of several physical processes (e.g. the formation of halos along the caustics of particle trajectories and the phase synchronisation of density perturbations on various scales) transforms the initial random density field to the current highly non-random density field. Galaxy formation is suppressed in voids, which increases the amplitudes of correlation functions and power spectra of galaxies, and increases the large-scale bias parameter. The combined evidence leads to the large-scale bias parameter of $L_star$ galaxies the value $b_star =1.85 pm 0.15$. We find $r_0(L_star) = 7.20 pm 0.19$ for the correlation length of $L_star$ galaxies.