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

how to turn fractions into mixed numbers convert centimeter to milimeter decimal to fraction calculator gcf factor calculator convert celsius to kelvin convert mixed fraction to decimal calculator conversion from inches to cms scatter plot correlation calculator how many cm in a inch converter conversion acres to meters finding standard deviation on calculator scientific calculator with a fraction button absolute difference formula 175 cm into inches celsius to fahrenheits conversion from inches to cms conversion sqft to sqm inches to sq ft converter conversion meters to millimeters improper fraction solver adding complex fractions calculator mixed fractions to improper fractions converter 1mg is how many grams fraction reducer calculator online what is the lcm of 3 5 whats 30 mm in inches calculate inches to centimeters mixed fraction to improper fraction converter sq metre to feet what is a modified box plot