Linear regression. How to calculate this problem

In summary, the conversation discusses discrepancies between the results given by Excel and various online calculators for a linear regression problem, with one set of results being significantly different from the other. Through further discussion, it is discovered that the data sets were inputted in the wrong order, leading to the discrepancy. The correct order of inputting the data is then given, resulting in the expected results from Excel.
  • #1
Drudge
30
0

Homework Statement


Why does excel give me this:

http://postimg.org/image/68b9z1lqt/

And various online calulators (for example http://www.alcula.com/calculators/statistics/linear-regression/), and my own calulations give me this:

http://postimg.org/image/kpljm4awx/


Homework Equations



Raw data:

Y: 18.9, 31.9, 18.5, 33.9, 24.9, 15.2, 26.9, 26.9, 29.9, 29.9, 35.9, 21.9, 16.9, 8.9, 24.9

X: 5, 4, 3, 1, 4, 8, 3, 6, 7, 5, 3, 3, 9, 14, 4

The Attempt at a Solution



I get the linear equation of: y = -0.29967x + 12,5667

The book I am studying has the answer that you get from excel

Which one is right? Am I going insane or is there somwthing really wrong here?

 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Drudge - I plugged the numbers into your suggested application (from www.alcula.com) and I get the Excel results. It looks like you switched the x and y data sets. Enter the x values first, then the y values, and you should get the Excel results.
 
  • #3
TheoMcCloskey said:
Drudge - I plugged the numbers into your suggested application (from www.alcula.com) and I get the Excel results. It looks like you switched the x and y data sets. Enter the x values first, then the y values, and you should get the Excel results.

O no! of course. thank you very much
 

1. What is linear regression and what is it used for?

Linear regression is a statistical method used to model the relationship between a dependent variable and one or more independent variables. It is commonly used to predict or explain the behavior of a dependent variable based on the values of the independent variables.

2. How do you calculate linear regression?

The most common method for calculating linear regression is through the use of the least squares method. This involves finding the line of best fit that minimizes the sum of the squared distances between the observed data points and the predicted values from the regression line.

3. What are the assumptions of linear regression?

The main assumptions of linear regression include: linearity, normality, homoscedasticity (constant variance), and independence of errors. These assumptions must be met in order for the regression model to be valid and reliable.

4. How do you interpret the results of a linear regression?

The results of a linear regression typically include the regression equation, the coefficient of determination (R-squared), and the significance of the regression coefficients. The regression equation shows the relationship between the dependent and independent variables, R-squared measures the amount of variability in the dependent variable explained by the independent variable(s), and the significance of the coefficients indicates the strength of the relationship between the variables.

5. What are some common applications of linear regression in scientific research?

Linear regression is commonly used in various fields of scientific research to analyze and predict relationships between variables. Some common applications include predicting stock prices, analyzing the impact of environmental factors on plant growth, and identifying risk factors for diseases. It is also used in social sciences to study human behavior and in engineering to model and optimize processes.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
10
Views
8K
  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
2K
  • Introductory Physics Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Precalculus Mathematics Homework Help
Replies
6
Views
7K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
5K
  • Introductory Physics Homework Help
Replies
4
Views
1K
Back
Top