We develop an analytical and numerical methodology for the analysis of large bottom-hole temperature (BHT) data sets from sedimentary basins, and test the methodology using temperature, stratigraphic, and lithologic data from 411 boreholes in the Michigan Basin. Least-squares estimates of temperature gradients in the formations and lithologies present are calculated as solutions to a large system of linear equations. At each borehole the temperature difference between the bottom and top of the hole is represented as a sum of temperature increments through the various formations or lithologies penetrated by the borehole. Quadratic programming techniques enable bounds to be placed on the gradient solutions in order to suppress or exclude improbable gradient estimates. Numerical experiments with synthetic data reveal that the estimates of temperature gradients for a given formation or lithology are sensitive to the degree of representation of that unit; well represented units have more stable gradient estimates in the presence of noise than do poorly represented units. The estimates of temperature gradients obtained for lithologies are more stable than those for formations and are believed to be good estimates of actual lithologic temperature gradients in the Michigan Basin. Formation temperature gradients obtained as a weighted sum of the estimates of the component lithologic temperature gradients appear to be good estimates of the average temperature gradients for the formations of the basin.At each borehole a temperature residual exists corresponding to the difference between the observed BHT and the BHT predicted by the estimated interval temperature gradients. Residuals are far more stable than estimated temperature gradients. The values of residuals change little regardless of whether lithology, formation, bounded, or unbounded gradient estimates are used to calculate them. Maps of residuals indicate well-defined and spatially coherent patterns of positive and negative temperature residuals. Filtered subsets of large-magnitude residuals alone show a pattern of negative residuals coinciding with the mid-Michigan gravity high, a geophysical feature thought to delineate a Precambrian (Keweenawan) rift zone in the crust beneath the basin. Thermal models of the Michigan Basin and the crust and upper mantle beneath the basin indicate that the suspected rift beneath the basin can cause a variation in basement heat flow sufficient to produce temperature residuals of the magnitude observed in the sediments, with negative temperature residuals over the area of the rift.