ThisCalculator

Everyday

Linear Regression Calculator Casio: How to Use One

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

This page explains how to use a Casio scientific calculator (like the fx-991EX or fx-991CW) to perform linear regression, and provides a simple online calculator that does the same math for you. You enter your x and y data pairs, and you get the slope, intercept, and correlation coefficient, plus predicted y-values for new x-values.

Formula

Linear regression fits a straight line y = a + b·x to your data. The slope b and intercept a are calculated using the least squares method, which minimizes the sum of squared vertical distances between the data points and the line.

Formulas:

  • Slope: b = (n·Σxy − Σx·Σy) / (n·Σx² − (Σx)²)
  • Intercept: a = (Σy − b·Σx) / n
  • Correlation coefficient: r = (n·Σxy − Σx·Σy) / √[(n·Σx² − (Σx)²)·(n·Σy² − (Σy)²)]

Where: n = number of data pairs, Σx = sum of all x-values, Σy = sum of all y-values, Σxy = sum of each x multiplied by its y, Σx² = sum of each x squared, Σy² = sum of each y squared.

Worked Example

Using the default data: x = 1,2,3,4,5 and y = 2,4,5,4,5.

  1. n = 5
  2. Σx = 1+2+3+4+5 = 15
  3. Σy = 2+4+5+4+5 = 20
  4. Σxy = (1×2)+(2×4)+(3×5)+(4×4)+(5×5) = 2+8+15+16+25 = 66
  5. Σx² = 1+4+9+16+25 = 55
  6. Σy² = 4+16+25+16+25 = 86
  7. Slope b = (5×66 − 15×20) / (5×55 − 15²) = (330 − 300) / (275 − 225) = 30/50 = 0.6
  8. Intercept a = (20 − 0.6×15) / 5 = (20 − 9) / 5 = 11/5 = 2.2
  9. Correlation r = (5×66 − 15×20) / √[(5×55 − 225)×(5×86 − 400)] = 30 / √(50×30) = 30 / √1500 ≈ 0.7746

So the regression line is y = 2.2 + 0.6x. For x=6, predicted y = 2.2 + 0.6×6 = 5.8. The online calculator above gives the same results.

How to Do Linear Regression on a Casio Calculator

Casio scientific calculators (fx-991EX, fx-991CW, fx-82/85/350, etc.) have a built-in statistics mode. The exact steps vary slightly by model, but the general process is:

  1. Press MODE (or MENU on newer models) and select STAT (usually option 2).
  2. Choose A+BX (linear regression) from the list of regression types.
  3. Enter your x-values in the first column and y-values in the second column. Use = after each entry.
  4. Press AC to exit the data entry screen.
  5. Press SHIFT then 1 (STAT) to open the statistics menu.
  6. Select Reg (regression) to see A (intercept), B (slope), and r (correlation coefficient).
  7. To predict y for a new x, use the Reg menu and choose the y-hat option (often listed as ŷ), then enter your x value.

On the fx-991CW, you press MENU, then Statistics, then select y=a+bx. The process is otherwise identical.

Common Mistakes and How to Avoid Them

  • Mixing up the regression form: Casio offers both y=a+bx and y=a+bx (sometimes labeled as a+bx vs a+bx). Make sure you select the one that matches your textbook. The slope and intercept will be swapped if you choose the wrong one.
  • Entering data in the wrong columns: x goes in the first column, y in the second. If you swap them, you get the regression of x on y instead of y on x.
  • Forgetting to clear old data: Before entering new data, press SHIFT then CLR (or STAT then Clear) to wipe previous lists. Old data will corrupt your results.
  • Using the wrong correlation coefficient: On some models, r is only shown if you select the right regression type. If you don’t see r, go back and choose A+BX (linear), not Quadratic or other types.
  • Rounding intermediate values: Always keep full precision in the calculator. Round only the final answer to your desired number of decimal places.

When to Use Linear Regression

Linear regression is appropriate when you have two numeric variables and you want to see if a straight-line relationship exists. Common uses include:

  • Predicting a test score based on hours studied.
  • Estimating sales based on advertising spend.
  • Finding the trend in temperature over time.
  • Calibrating an instrument (e.g., converting absorbance to concentration).

Before using it, check that the relationship is roughly linear by plotting the data. If the points curve strongly, a linear model may be misleading. Also, linear regression is sensitive to outliers—a single extreme point can pull the line significantly.

Limitations of the Formula

The least squares line is only valid for interpolation (predicting y within the range of your x data). Extrapolating far beyond the data range can be unreliable. Also, correlation does not imply causation—a strong r value does not prove that x causes y. The formula assumes that the relationship is linear and that the residuals (errors) are roughly constant in size across the x range.

Frequently Asked Questions

How do I get r² on a Casio calculator?

After performing linear regression, the r value is shown in the regression menu. To get r², simply square the r value. Some models also display r² directly if you select the appropriate option in the STAT menu.

What does the correlation coefficient r tell me?

r ranges from −1 to 1. A value close to 1 indicates a strong positive linear relationship, close to −1 indicates a strong negative linear relationship, and near 0 indicates little to no linear relationship. It does not tell you the slope or the strength of the relationship in absolute terms—only the direction and consistency of the linear trend.

Can I use a Casio calculator for multiple linear regression?

No, standard scientific Casio calculators only handle simple linear regression (one independent variable). For multiple regression (two or more x variables), you need a graphing calculator, statistical software, or an online tool.

Why is my slope negative when I expect it to be positive?

Check that your x and y data are entered in the correct columns. Also, verify that you selected the correct regression type (y=a+bx). If the data genuinely trends downward, a negative slope is correct. Plot the points to confirm the direction.

What is the difference between y=a+bx and y=a+blnx?

The first is linear regression on raw x values. The second is linear regression on the natural logarithm of x (logarithmic regression). Use the second if the relationship between x and y is logarithmic (e.g., y increases rapidly at first then levels off).

How do I clear old data from my Casio calculator?

Press SHIFT then CLR (or STAT then Clear). Select All or List to wipe the data. On newer models, go to the statistics menu and choose Clear.

Related

Formula used
in x | X values (comma-separated) | - | 1,2,3,4,5 | 0
in y | Y values (comma-separated) | - | 2,4,5,4,5 | 0
out b | Slope (b) | - | (count*x_sum - x_sum*y_sum)/(count*x2_sum - x_sum^2) | 4
out a | Intercept (a) | - | (y_sum - b*x_sum)/count | 4
out r | Correlation (r) | - | (count*xy_sum - x_sum*y_sum)/sqrt((count*x2_sum - x_sum^2)*(count*y2_sum - y_sum^2)) | 4
out y_pred | Predicted y at x=6 | - | a + b*6 | 4

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.