Scatter Charts and Sine Regression - Printable Version +- HP Forums ( https://www.hpmuseum.org/forum)+-- Forum: HP Calculators (and very old HP Computers) ( /forum-3.html)+--- Forum: HP Prime ( /forum-5.html)+--- Thread: Scatter Charts and Sine Regression ( /thread-504.html) |

Scatter Charts and Sine Regression - Azure - 01-24-2014 01:48 PM
Hello, I'm new to graphing calculators and pre-calculus. So far the Prime has helped tons to visualize things. After spending most this week trying to figure this issue out and having no luck, I'm hoping maybe someone here can point me in the right direction. My current section involves graphing sinusoidal data. The book uses the SinReg function of a TI-84 to explain how to get the sine equation (y= a*sin*ω(x-c)+b) from the scatter points. I've been having issues getting it to work on the Prime. For one example, I go to Statistics 2Var and enter the data: Code:
Then for Plot Setup I use X Rng: -1, 15 Y Rng: -3, -3 and the scatter points appear looking similar to cosine graph. The question requires me to use the data to figure out the equation by hand for the cosine graph which fits the points. Doing so I get: y= 2.1*cos(0.52x) If I then place that equation in the Symbolic View for S1, select C1 and C2, User Defined fit and my cosine equation, the fit matches nicely. I'm then required to use a graphing calculator to find the sine function that fits the data and refers to the before mentioned TI84 SinReg function. Their answer matches the scatter points nicely and has the equation: y=2.05*sin(0.50x+1.55)-0.01 The only way I know so far to do this on the prime is in Symbolic View select the fit as Trigonometric. However, the resulting plot shows a small sine graph no where near the cosine graph and when returning to the Symbolic View shows the equation in the fit box of: y= .18*sin(-14.77x+113.35)+.32 There have been a few other similar questions where the Trigonometric fit isn't anywhere near my scatter points. However, some questions it fits fine, such as with this data: Code:
I don't know if I'm not setting something up right or if there's a different process for doing this on the Prime. I think it matches when the scatter points are close to a sine graph, but if they're closer to cosine then it seems the Trig fit won't work too well. I'm still going through the User Manual and figuring a lot out. I've just been stuck on this for a while and hope to have some idea to finish the homework this next week. Thank you. RE: Scatter Charts and Sine Regression - Han - 01-24-2014 04:27 PM
Change your angle mode to degrees and it should work. In radian mode, it gives the wrong fit. There seems to be a second issue here (for me) in that sometimes the user-defined formula works, and sometimes it does not. A user-defined formula will work if you already selected a different type of fit (e.g. trig) and enter in your own formula. The fit will auto-switch to user-defined and all is nice. On the other hand, if you first manually choose user-defined fit, and then enter your formula, it appears as a horizontal line along the x-axis. There is definitely a bug in the this app. RE: Scatter Charts and Sine Regression - CR Haeger - 01-26-2014 08:03 PM
Dumb question - specifically how do you enter/use a user defined function in this app? Can to key it in the SYMB view directly? Do you have to create a user defined function outside of the app? Users guide was not helpful for me. RE: Scatter Charts and Sine Regression - Han - 01-26-2014 08:20 PM
(01-26-2014 08:03 PM)CR Haeger Wrote: Dumb question - specifically how do you enter/use a user defined function in this app? Can to key it in the SYMB view directly? That's how I did it. RE: Scatter Charts and Sine Regression - Tim Wessman - 01-26-2014 08:26 PM
Yes, you just key it in. You can also edit an existing fit to see how that changes the graph. |