This independent scientific calculator checks two residuals from a regression line you already have. Enter the slope and intercept followed by two observed x and y pairs. The calculator substitutes each x into the line, compares the predicted y with the observed y, and summarizes the two errors with a root mean square error. It can be used alongside a TI-30XIIS regression calculation.
Bring a line and two matching observations
A fitted line written as y = ax + b has a slope a and a y-intercept b. Here a controls how much predicted y changes for one unit of x. The intercept gives predicted y at zero. Make sure you copy the coefficient values from the same fitted model. Other tools sometimes call them m and b, or list the intercept before the slope.
The two observations each consist of an x input and a measured y for that same observation. Keep those numbers paired. If your data table has dates plus two columns of measurements, use the values from a single row as one pair. A misaligned x and y can create a residual with no clear interpretation even if the calculation itself is correct.
The tool checks the entered line against these two points. It does not estimate the best fit from the points or reproduce a handheld interface. When using values obtained from the TI model, refer to the manufacturer's directions for fitting a line and locating its slope and intercept. Texas Instruments guidance for two-variable linear regression.
Worked example for y = 1.75x − 2.5
Use a slope of 1.75 and an intercept of −2.5. Suppose the first observation has x = 4 and a measured y of 5.2. To predict the first value, multiply four by 1.75 to obtain seven, then subtract 2.5. The prediction is 4.5.
The residual is 5.2 minus 4.5, or positive 0.7. It is positive because the observed value is higher than the prediction. Use x = 8 with y = 10.7 for the second observation. The predicted number is 1.75 times eight minus 2.5, or 11.5. The observed value is 0.8 below the line, so the second residual is −0.8.
These two residuals are in the units of y. If y describes centimeters, the first observation is 0.7 cm above the fitted value. The second is 0.8 cm below it. The sign helps you see the direction of the difference as well as its size.
Calculate the root mean square error
Square the two residuals to get 0.49 and 0.64. Add those squares to obtain 1.13 and divide by the number of observations, which is two. That gives a mean squared error of 0.565 on this two-row check. Taking its square root gives about 0.7516648189, in the original outcome unit.
Taking the simple average of the signed residuals would give −0.05 in this example. That is a measure of direction across the two observations. It can be small even if both individual errors are substantial because positive and negative values can cancel. The square-and-root procedure instead summarizes error magnitude without regard to sign.
If both observations sit on the entered line, both residuals are zero and so is the root mean square error. If one residual is zero and the other has magnitude two, the root mean square error is two divided by the square root of two, or about 1.414. This difference from an arithmetic mean helps check the meaning of the headline.
Keep the sample scope visible
A two-observation result describes only the pairs entered. If the fitted regression uses many more records, its overall error is found from all of the relevant residuals under the desired averaging rule. This page is useful for a focused numerical check or two selected observations. It does not imply how well the line predicts every other point.
Rounded coefficients can change residuals slightly. If a handheld displays a slope to only a few decimal places, substituting that rounded slope for a large x can magnify the rounding effect. Keep more digits from the original model where available. Note the coefficient precision if small residual differences matter.
Using the same x for the two observations is permitted. The prediction is then the same in both rows, while measured y and residuals can differ. This can help inspect two repetitions of an experiment at the same input setting.
Frequently asked questions
Can I get the slope from these two data pairs?
Enter a slope and intercept calculated elsewhere. This tool evaluates an existing line. It can check a fitted line whether the two data pairs helped fit it or were held back for a comparison.
What does a negative residual tell me?
The observed y is below the model's predicted y at that x. The sign uses observed minus predicted throughout the table.
Does RMSE use the x unit?
It uses the y unit, because each residual is a difference between two y-values. Squaring and then taking the root restores the outcome unit.
Why do the results differ slightly from a handheld display?
A difference can come from rounding the slope, intercept or intermediate prediction on one device. Use the same coefficient values and compare results at a consistent decimal precision.
Texas Instruments linear regression guidance for the TI-30X IIS and IIB