We develop a demand model for goods that are subject to habit formation. We show that consumption plans of forward-looking individuals depend on preferences, current period prices, and individual beliefs about the evolution of future prices. Moreover, an increase in price uncertainty reduces consumption along the optimal path. With smoking as our application, we test the predictions of our model using a unique data set of prices for cigarettes and the restricted-use version of the National Education Longitudinal Study. Our estimation results suggest that teenagers who live in metropolitan areas with a large amount of cigarette price volatility have, on average, significantly lower levels of cigarette consumption.