Im seeking for help about fitting data into a curve of sine formula

In summary, the conversation is about finding the sine equation for a temperature table with monthly maximum values. The equation is y=5.65sin((pi/6) (x-10))+27.55, but the numbers do not fit perfectly on the graph and the person is looking for a mathematical technique to improve the equation, such as least squares.
  • #1
SvenHoly
2
0
1.
This is the given data table
--------Jan----Feb----Mar---Apr----May----Jun----July----Aug----Sept----Otc----Nov----Dec
Maximum:33.2--32.2--31.2--28.9----25.4----22.2--21.9----23.9----27---- 29.8----31.7----32.9
This is a temperature table and i need to find its sine equation.b3/
y= AsinB(x-C) +D
A=(max-min)/2=(33.2-21.9)/2=5.65
The period is 12 months, so 2pi/B=12 => B= pi/6
D=(max+ min)/2= (33.2+21.9)/2=27.55
C is the half way from the first minimum to the next maximum:
Min: July / 7 Max: January / 13
C=(max+ min)/2=(13 + 7)/2=10
So the equation is: y=5.65sin((pi/6) (x-10))+27.55Well, I want to ask did i do anything wrong?
How to improve this equation to fit the numbers better because the numbers weren't fitted on my graph.
THanks
 
Physics news on Phys.org
  • #2
Let me be the first to welcome you to PF!

OK, you have 4 unknowns (A,B,C,D) and 12 data points. Your teacher gave no hints or clues as to how to approach the problem? What's the name of the class and what are the topics currently being covered?
 
  • #3
Ah, hi :)
This is an assignment he gave us. It's about sine formula.
As i showed up there: A is the amplitude; B is the period; C is the horizontal translation and D is the horizontal translation.
I worked out the formula for that but the numbers except the maximum and the minimum weren't fitted on the graph perfectly (i used graphic calculator).

So I am looking for a higher maths technique that I haven't studied to improve my formula.
btw, thanks for answering
 
  • #4
One technique is least squares, where the objective is to minimize the sum of squares of distances from the data points to the curve. In your case, it's a nonlinear problem since some of the unknowns are within the sin function. You can use Google to get more information.
 

Related to Im seeking for help about fitting data into a curve of sine formula

1. How do I determine the best fit for my data using the sine formula?

The best fit for your data using the sine formula can be determined by using a process called regression analysis. This involves finding the values for the amplitude, frequency, and phase shift that result in the smallest overall error between your data points and the predicted values from the sine function.

2. What is the significance of the amplitude, frequency, and phase shift in the sine formula?

The amplitude represents the maximum deviation of the data from the mean, the frequency determines how many oscillations the sine curve makes within a given interval, and the phase shift indicates the horizontal displacement of the curve from the origin. These parameters help to accurately fit the data to the sine function.

3. Can I use the sine formula to fit non-periodic data?

No, the sine formula is specifically designed for fitting periodic data. If your data is non-periodic, other regression methods may be more suitable.

4. How do I know if the sine formula is the best fit for my data?

The best way to determine if the sine formula is the best fit for your data is to plot your data points and the predicted values from the sine function on a graph. If the curve closely follows the data points, then it is a good fit.

5. Are there any limitations to using the sine formula for data fitting?

Yes, the sine formula may not be suitable for data sets with a large number of outliers or for data that does not exhibit a sinusoidal pattern. It is important to always analyze your data and consider other regression methods before using the sine formula.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
Back
Top