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

  • Thread starter lilly92
  • Start date
  • Tags
    Summation
In summary, the conversation discusses the use of a polynomial fit to approximate data and the substitution of the fit into a summation. The conversation also explores finding coefficients for higher degree polynomials and manipulating the data to achieve a specific value for the summation. It is possible to find coefficients that satisfy the given equation, but if there is a constraint on the coefficients, a constrained optimization method can be used to find a numerical solution.
  • #1
lilly92
8
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
  • #2
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 1 person
  • #3
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?
 
  • #4
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 1 person
  • #5
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?
 
  • #6
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 1 person

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

1. How do you solve a summation question with a substitution?

To solve a summation question with a substitution, you need to first substitute the given value of y into the equation. In this case, the given value is y=ai+b. Then, you can use the properties of summation to simplify the equation and find the final answer.

2. What is the purpose of substituting y in the summation equation?

The purpose of substituting y in the summation equation is to make the equation simpler and easier to solve. By substituting a given value, you can eliminate variables and reduce the equation to a more manageable form.

3. Can you use any value for y in the substitution?

No, you cannot use any value for y in the substitution. The value of y must be given in the original equation or defined by the problem. It is important to use the correct value of y to ensure an accurate solution.

4. What are the properties of summation that can be used when substituting y?

There are several properties of summation that can be used when substituting y in an equation. These include the distributive property, associative property, and commutative property. These properties allow you to rearrange and simplify the equation to find the final answer.

5. Can you use a different substitution for y in the summation equation?

Yes, you can use a different substitution for y in the summation equation. However, the substitution must be equivalent to the original value of y. This means that the substitution should not change the overall value or meaning of the equation.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
5
Views
1K
  • Precalculus Mathematics Homework Help
Replies
2
Views
1K
  • Precalculus Mathematics Homework Help
Replies
6
Views
1K
  • Precalculus Mathematics Homework Help
Replies
4
Views
2K
  • Precalculus Mathematics Homework Help
Replies
16
Views
1K
  • Precalculus Mathematics Homework Help
Replies
14
Views
2K
  • Precalculus Mathematics Homework Help
Replies
2
Views
1K
Replies
10
Views
2K
  • Precalculus Mathematics Homework Help
Replies
2
Views
2K
  • Precalculus Mathematics Homework Help
Replies
7
Views
2K
Back
Top