Statistics Calculator: Linear Regression

Use this page to derive and draw the line of best fit from a set of bivariate data.



Online Linear Regression Calculator

This page allows you to compute the equation for the line of best fit from a set of bivariate data:

  1. Enter the bivariate x,y data in the text box. x is the independent variable and y is the dependent variable. Data can be entered in two ways:

    x values in the first line and y values in the second line, or ...
    individual x,y values on separate lines.

    Individual values within a line may be separated by commas, tabs or spaces. This flexibility in the input format should make it easier to paste data taken from other applications or from text books.
  2. Press the "Submit Data" button to perform the computation.
  3. To clear the graph and enter a new data set, press "Reset".
  4. If the calculations were successful, a scatter plot representing the data will be displayed. On the same plot you will see the graphic representation of the linear regression equation. Above the scatter plot, the variables that were used to compute the equation are displayed, along with the equation itself.
  5. You can now enter an x-value in the box below the plot, to calculate the predicted value of y
  6. To clear the graph and enter a new data set, press "Reset".

What is simple linear regression

Simple linear regression is a way to describe a relationship between two variables through an equation of a straight line, called line of best fit, that most closely models this relationship.

Linear Regression Formula

This calculator uses the following formula to derive the equation for the line of best fit:

$ y = a+bx $

where

$ b = \frac{\sum_{i=1}^n x_i y_i - n \bar{x} \bar{y}}{\sum_{i=1}^n x_i^2 - n \bar{x}^2} $ and $ a = \bar{y} - b \bar{x}$



Another Calc

2.5 percent as a decimal convert imperial to mm degree celsius to kelvin conversion formula formula celsius to fahrenheit changing fractions to lowest terms convert square metre to square yard how you convert celsius to fahrenheit interactive scientific calculator definition for interquartile range 48 mm convert to inches what is 1 cm equal to in inches centimetre to inches converter how to convert grains to milligrams convert m2 to ft2 convert square feet in meters convert km squared to miles squared interquartile range in math convert 150 f to celsius water freezing point in fahrenheit celcius farenheight converter decimal as a fraction or mixed number 112 pounds is how many kg decimals to percents calculator centimeter to inches conversion table how to change whole number to improper fraction improper fractions simplest form how do you convert metres to feet convert to celsius to kelvin inch to metric calculator definition of first quartile