Extrapolation and interpolation are both methods used to estimate or predict values within a dataset, but they differ in the context of where the estimated values lie relative to the existing data points.
Extrapolation:
Extrapolation involves predicting or estimating values outside the range of known data points. In other words, it extends the trend or pattern observed in the existing data to make predictions beyond the observed range. This method assumes that the trend observed within the known data will continue outside that range.
For example, if you have a dataset showing the relationship between temperature and time over several days, and you want to predict the temperature for a day beyond the observed range, you would use extrapolation.
Interpolation:
Interpolation, on the other hand, involves estimating values within the range of known data points. It is used to find values between the existing data points based on the trend or pattern observed within the dataset.
For example, if you have a dataset representing the population of a city over several years, and you want to estimate the population for a year between two known data points, you would use interpolation.
See