Linear Regression with Many y for each x

In summary, the conversation discusses collecting data points for a linear regression and whether or not to average the multiple readings for each x value in order to have a single data set for regression. The speaker suggests that averaging the Y values may lose important information about the variation of Y for the same x value. The alternative suggestion is to run a regression on the raw data with the same x value repeated for each y value obtained.
  • #1
WWGD
Science Advisor
Gold Member
7,009
10,469
Hi,
Say we collect data points ##(x_i,y_j)## to do a linear regression, but so that for each ##x_i ## we collect
values ##y_{i1}, y_{i2},...,y_{ij} ## . Is there a standard way of doing linear regression with this type of dataset?
Would we, e.g., average the ##y_{ij}## abd define it to be ## y_i## to have a single data set ##(x_i, y_i) ## to do linear regression on?
Thanks.
 
Last edited:
Physics news on Phys.org
  • #2
WWGD said:
Hi,
Say we collect data points ##(x_i,y_j)## to do a linear regression, but so that for each ##x_I ## we collect
values ##y_{i1}, y_{i2},...,y_{ij} ## . Is there a standard way of doing linear regression with this type of dataset?
Would we, e.g., average the ##y_{ij}## abd define it to be ## y_i## to have a single data set ##(x_i, y_i) ## to do linear regression on?
Thanks.
You can average the multiple readings if you wish. That's what people do when using normal equations to find the regression coefficients.

If you are using QR factorization to solve a rectangular system, you can write separate equations for each observation. The resulting regression coefficients should come out the same as with using the normal equations, unless there is something horribly wrong, numerically.
 
  • Like
Likes WWGD
  • #3
Are you saying that the Ys represent different things, or are they results of the same variable measured from repeats of the same input x? If the former, just analyse the Y variables separately. If they are the latter, then do not combine the data. Averaging the Y values loses all the information about the variation of y for the same x. Run a regression on the raw data with the same x value repeated for each y value obtained.
 

1. What is linear regression with many y for each x?

Linear regression with many y for each x is a statistical method used to find the relationship between two or more variables. It is commonly used to predict the value of one variable (dependent variable) based on the values of one or more other variables (independent variables).

2. When is linear regression with many y for each x used?

This method is used when there are multiple dependent variables that are related to the same set of independent variables. It is also used when there is a need to understand the effects of multiple independent variables on the dependent variable.

3. How is linear regression with many y for each x calculated?

The calculation involves finding the slope and intercept of the line that best fits the data points. This is done by minimizing the sum of squared errors between the predicted values and the actual values of the dependent variables.

4. What are the assumptions for linear regression with many y for each x?

The main assumptions for this method include linearity (the relationship between variables is linear), independence of errors (the errors are not correlated with each other), and homoscedasticity (the variance of errors is constant across all values of the independent variables).

5. How do I interpret the results of linear regression with many y for each x?

The results of this method can be interpreted by looking at the slope and intercept of the line of best fit, as well as the significance of these values. The slope represents the change in the dependent variable for every unit change in the independent variable, while the intercept represents the value of the dependent variable when the independent variable is 0. The significance of these values indicates the strength and direction of the relationship between the variables.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
1K
  • Set Theory, Logic, Probability, Statistics
2
Replies
64
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
629
  • Set Theory, Logic, Probability, Statistics
Replies
30
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
476
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
495
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
735
Back
Top