Summation Question: Substituting y=ai+b in c=Σ(i2*yi)?

  • Thread starter Thread starter lilly92
  • Start date Start date
  • Tags Tags
    Summation
Click For Summary

Homework Help Overview

The discussion revolves around the substitution of a polynomial fit of the form y = ai + b into the summation c = Σ(i² * yi), where participants explore the implications of this substitution in the context of data fitting and approximation.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • Participants question the validity of substituting the polynomial expression into the summation and discuss the nature of approximations involved. There are inquiries about calculating polynomial coefficients and the implications of using different polynomial degrees.

Discussion Status

Some participants have provided guidance on the relationship between the coefficients of the polynomial and the summation, suggesting that there are multiple combinations of coefficients that can satisfy the equation. Others have raised questions about the methods used for fitting the data and the potential for constrained optimization.

Contextual Notes

There is mention of testing various polynomial fits and the need for specific values of c, indicating that participants are working within the constraints of data manipulation and approximation accuracy.

lilly92
Messages
8
Reaction score
0

Homework Statement



I have a set of data (i, yi). A polynomial fit of 1st degree would be y=ai+b, right?
If I have c=Σ(i2*yi) is it correct to substitute y=ai+b inside the summation?

Homework Equations


The Attempt at a Solution

 
Last edited by a moderator:
Physics news on Phys.org
lilly92 said:

Homework Statement



I have a set of data (i, yi). A polynomial fit of 1st degree would be y=ai+b, right?
If I have c=Σ(i2*yi) is it correct to substitute y=ai+b inside the summation?

Homework Equations


The Attempt at a Solution


You are being careless with notation, and it is landing you in trouble. You have data ##\{ (i, y_i)
\}## and fit a formula of the form ##Y(x) = ax + b## to the data; that is, you are approximating ##y_i## by the value ##Y(i) = ai + b##. Hopefully, the approximation is good in some sense, but that is another, separate issue. Anyway, you have a quantity ##c = \sum i^2 y_i##. When you substitute ##Y(i)## instead of ##y_i## you are computing an approximation ##C = \sum i^2 Y(i)## instead of the exact value of ##c##.
 
Last edited by a moderator:
  • Like
Likes   Reactions: 1 person
I don't care about the exact approximation because I test various polynomials to figure out for which c approximates a specific known value. But my problem is what to do about the coefficients of the polynomials. Is there a way to calculate them in order to calculate c?
 
lilly92 said:
I don't care about the exact approximation because I test various polynomials to figure out for which c approximates a specific known value. But my problem is what to do about the coefficients of the polynomials. Is there a way to calculate them in order to calculate c?

How do you perform the fit to the data? If you use the least-squares method there are formulas for the coefficients. If you use some other method, there may not be formulas---only algorithms. For example, if you do a least average absolute-deviation fit, you can set up the problem as a linear program and solve it using a standard package (such as the EXCEL Solver). The solution of the linear program will include values of the coefficients.
 
  • Like
Likes   Reactions: 1 person
Okay I understand that, thank you. But what if I want to test with polynomials of second degree or higher?
My y data can be manually changed and c takes a specific value. What I'm trying to do is figure out which ys to change to make c take that value and/or by how much. Is that possible?
 
lilly92 said:
Okay I understand that, thank you. But what if I want to test with polynomials of second degree or higher?
My y data can be manually changed and c takes a specific value. What I'm trying to do is figure out which ys to change to make c take that value and/or by how much. Is that possible?

Are you asking whether we can find numbers ##a## and ##b## that give
[tex]\sum_{i=1}^n i^2 (ai+b) = c[/tex]
then the answer is an obvious yes. If we let ##s_3 = \sum_{i=1}^n i^3## and ##s_1 = \sum_{i=1}^n i^2## then the equation just says that ##s_3 a + s_2 b = c## and there are lots of ##(a,b)## combinations that satisfy that. If you also want the form ##Y(i) = ai + b## to be a (hopefully good) fit to some data ##\{ i, y_i \}##, then you just have a constrained version of the usual data-fitting methods. The standard fitting formulas may no longer apply--- because of your specified constraint ##s_3 a + s_2 b = c##---but you can use a constrained optimization method to get a numerical solution. For example, you can do it using the EXCEL Solver.
 
  • Like
Likes   Reactions: 1 person

Similar threads

Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
14
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 11 ·
Replies
11
Views
7K
Replies
16
Views
2K