Math 141 · Lesson 8
Sine Explorer
Move the sliders for the four parameters of a sine model and the landmarks move with the curve. Then estimate the parameters of a sine model for TemperaturesDanville or SunsetGreenwich by hand from points clicked on the plot.
About this tool
The model is the general sine form:
Explore has a slider for each of , , and . The plot shows the center line , the maximum and the minimum . The amplitude and the period , from one peak to the next, are marked with brackets. The horizontal shift is marked on the input axis at the first upward crossing at or to the right of 0. A slider value of outside 0 to is another upward crossing. For such a slider value, the plot shows the whole-period move from the slider’s crossing to the reported horizontal shift. is always positive.
Estimate is the by-hand procedure, applied to TemperaturesDanville or SunsetGreenwich. It takes five values, each clicked on the plot or typed:
- , a round level near the top of the dataset, and , a round level near the bottom;
- a peak and the next peak, or a trough and the next trough;
- the input of an upward crossing of the center line.
Show numbers gives the arithmetic on the values:
is the distance from one peak to the next, or from one trough to the next. With several cycles between the two peaks, the distance is divided by the cycle count. is the crossing, moved by whole periods until it lies between 0 and . Once all five values are in, the curve is drawn on the data for comparison.
In Lesson 8 Example 4, the levels are 88 and 32. The peaks are at Months 7 and 55, with four cycles between the two peaks. The crossing is at Month 2.5. Show numbers gives . The model drawn is .
Under More:
- Upward crossings. Mark every crossing shows every translation of by whole periods. The curve is the same for every translation. The reported horizontal shift is the smallest of these values that is 0 or more.
- Kept curve. Keep this curve keeps a gray copy of the curve for comparison after a change.
Show R gives plotFun() code that plots the current curve in RStudio with the same values. When a dataset is shown, the code also has a plotPoints() line for the data.
Keys: in Explore, press A, P, H or V to pick a handle. Press an arrow key to move it one slider step. Hold Shift with an arrow key to move it five steps. Press Esc to let go.