Goodness of fit is a statistical measure that evaluates how well a set of observed data fits a theoretical distribution or model. It quantifies the discrepancy between the observed and expected values, providing an assessment of the model's ability to accurately represent the data.