1. A method of generating a statistical model, comprising: at a computer system having one or more processors and memory storing one or more programs configured for execution by the one or more processors: receiving a visual specification, wherein the visual specification defines a graphical representation of a portion of a dataset and the visual specification includes a first field and a second field of the dataset; determining a set of data properties for each of the first and second fields; generating a statistical model of a mathematical relationship between the first and second fields based on the data properties of the first and second fields and data values associated with the first and second fields in the dataset; and displaying the graphical representation with the statistical model superimposed on the graphical representation.