This paper sheds light on an empirical controversy about the effect of competition on price discrimination. We introduce individual demand uncertainty into Hotelling's model of product differentiation and show that firms offer advance purchase discounts. Consumers choose between an early (uninformed) purchase at a low price and a late (informed) purchase at a high price. Competing firms offer higher discounts in order to secure a large market share in advance. Our main result shows that whether competition has a positive or negative effect on price dispersion depends on the level of demand uncertainty and the degree of product differentiation.