Abstract The prediction of episodes of poor air quality using artificial neural networks is investigated, concentrating on selection of the most appropriate cost function used in training. Different cost functions correspond to different distributional assumptions regarding the data, the appropriate choice depends on whether a forecast of absolute pollutant concentration or prediction of exceedence events is of principle importance. The cost functions investigated correspond to logistic regression, homoscedastic Gaussian (i.e. conventional sum-of-squares) regression and heteroscedastic Gaussian regression. Both linear and nonlinear neural network architectures are evaluated. While the results presented relate to a dataset describing the daily time-series of the concentration of surface level ozone (O 3) in urban Berlin, the methods applied are quite general and applicable to a wide range of pollutants and locations. The heteroscedastic Gaussian regression model outperforms the other nonlinear methods investigated; however, there is little improvement resulting from the use of nonlinear rather than linear models. Of greater significance is the flexibility afforded by the nonlinear heteroscedastic Gaussian regression model for a range of potential end-users, who may all have different answers to the question: “What is more important, correctly predicting exceedences or avoiding false alarms?”.