What is the method for calculating residuals for 2 variable data?

  • Thread starter Thread starter pyroknife
  • Start date Start date
Click For Summary
SUMMARY

The method for calculating residuals in a two-variable dataset involves determining the difference between actual values and estimated values derived from a linear fit. In the example provided, with x=2 yielding two y values (4 and 6), the residuals are calculated as the actual values minus the estimated value (y=2). This results in two separate residuals: -2 and -4. Combining these residuals would lead to an overestimation of the goodness of fit, thus each residual must be treated individually.

PREREQUISITES
  • Understanding of linear regression concepts
  • Familiarity with residual analysis
  • Basic knowledge of statistical terminology
  • Experience with data visualization tools for plotting residuals
NEXT STEPS
  • Research linear regression techniques in Python using libraries like NumPy and SciPy
  • Learn how to visualize residuals using Matplotlib or Seaborn
  • Explore the concept of goodness of fit and its statistical measures
  • Study the implications of residuals in model diagnostics
USEFUL FOR

Data analysts, statisticians, and anyone involved in regression modeling and residual analysis will benefit from this discussion.

pyroknife
Messages
611
Reaction score
4
Let's say I have a 2 variable data set x and y.
The linear fit through the line is some y(x). Let's say y=x for simplicity.

So a residual is defined as the actual value minus the estimated value (using y).

My question is, let's say for one x value there are two y values.
e.g., for x=2; y=4 and y=6

If you wanted to calculate the residual at x=2, would you have two separate values or is there someway to combine it?
The estimated value would be y=2.
residuals are: 2-4 and 2-6, which is -2 and -4. So in other words do you add the two values?
 
Physics news on Phys.org
You should count them as two separate residuals. To do otherwise would overestimate the goodness of fit.
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
5
Views
2K