Linear regression is a statistical method used to model the relationship between two variables by fitting a linear equation to observed data. One variable is considered to be an explanatory variable (X), and the other is considered to be a dependent variable (Y).
1. Slope (B): \[B = \frac{n\sum xy - \sum x \sum y}{n\sum x^2 - (\sum x)^2}\] Where n is the number of data points, x and y are the variables.
2. Intercept (A): \[A = \bar{y} - B\bar{x}\] Where \(\bar{x}\) and \(\bar{y}\) are the means of x and y respectively.
3. Regression Equation: \[Y = BX + A\] This is the final equation that describes the linear relationship between X and Y.
Let's calculate for the dataset: X = (1, 2, 3, 4, 5), Y = (2, 4, 5, 4, 5)
This scatter plot represents the example dataset. The red line indicates the regression line Y = 0.7X + 1.9, showing the best fit for the data points.
We can create a free, personalized calculator just for you!
Contact us and let's bring your idea to life.