Most bacteria at certain stages of their life cycle are able to move actively; they can swim in a liquid or crawl on various surfaces. A typical path of the moving cell often resembles the trajectory of a random walk. However, bacteria are capable of modifying their apparently random motion in response to changing environmental conditions. As a result, bacteria can migrate towards the source of nutrients or away from harmful chemicals. Surprisingly, many bacterial species that were studied have several distinct motility patterns, which can be theoretically modeled by a unifying random walk approach. We use this approach to quantify the process of cell dispersal in a homogeneous environment and show how the bacterial drift velocity towards the source of attracting chemicals is affected by the motility pattern of the bacteria. Our results open up the possibility of accessing additional information about the intrinsic response of the cells using macroscopic observations of bacteria moving in inhomogeneous environments.