Today in precalculus, we looked at some data that follow a sinusoidal pattern and calculated a regression function to model it. Here’s how we did it:
The hours of daylight over a year increase, then decrease in a regular, periodic fashion – just the kind of data that result in a nice sine curve. The US Navy maintains a website where you can enter any location and see the sunrise and sunset times over an entire year:
http://aa.usno.navy.mil/data/docs/RS_OneYear.php
We entered our location (Nashville, TN), and used the sunrise and sunset times for the middle of the months:
The times are given in hours and minutes, so we converted them to decimal hours. We then subtracted sunrise time from sunset time to get the number of daylight hours for each month:
Now that we had our data, we entered it into our graphing calculators:
After setting our window parameters, we plotted the data:
Nice! Next, we calculated the regression function that best fits the data (This might be a good time to discuss pros and cons of different regression functions: quadratic, cubic, quartic, etc.):
We then plotted the regression function with the data points. Nice fit!
Because we did this in mid-February (x = 2.5), we used our model to estimate how many hours of daylight we should expect to have today: 11.4 hours.
If you’re ready to move beyond graphing calculators (and I certainly am!), then you can do this activity with the Desmos online function grapher. What’s nice about that approach is the ability to set up sliders, and let students fit the regression function to the data manually.
Here are a couple of screenshots:
Update: Apparently this is the source of the Chinese Yin/Yang symbol.