Most modern financial markets use a continuous double auction mechanism to store and match orders and facilitate trading. In this paper we develop a microscopic dynamical statistical model for the continuous double auction under the assumption of IID random order flow, and analyze it using simulation, dimensional analysis, and theoretical tools based on mean field approximations. The model makes testable predictions for basic properties of markets, such as price volatility, the depth of stored supply and demand vs. price, the bid-ask spread, the price impact function, and the time and probability of filling orders. These predictions are based on properties of order flow and the limit order book, such as share volume of market and limit orders, cancellations, typical order size, and tick size. Because these quantities can all be measured directly there are no free parameters. We show that the order size, which can be cast as a nondimensional granularity parameter, is in most cases a more significant determinant of market behavior than tick size. We also provide an explanation for the observed highly concave nature of the price impact function. On a broader level, this work suggests how stochastic models based on zero-intelligence agents may be useful to probe the structure of market institutions. Like the model of perfect rationality, a stochastic-zero intelligence model can be used to make strong predictions based on a compact set of assumptions, even if these assumptions are not fully believable.