Write an equation that approximates this relationship. Y = Seconds of daylight in day, X = a range of days

70 Views Asked by At

Disclaimer: This is a project for a math class. (who does math for fun anyways? Jk I actually enjoy math when I understand it, and not so much when I feel lost, but I digress )

The problem roughly states. Given the Values of Y given to us on a plotting points table.

Table 1 – Days after December 1st vs Minutes of Daylight

===================

x | Daylight (min)

===================

1 | 500.8

2 | 536.3

.

.

.

41| 536.3

"Your goal is to write an equation that approximates this relationship. The x‐values in Table 1 are “days after 11/30/2013” so that December 5th is x = 5.

So far I have been able to add the points to my graphing calculator and I am able to see the interval points in my graph.

But I am hitting a brick wall when I am trying to write the equation. If someone can point me in the correct direction here that would be great.

I believe this is a Linear approximation problem (could be wrong here) and when I research Linear approximation formulas and equation i start to become overwhelmed.

1

There are 1 best solutions below

0
On

Given what we know about daylight, and knowing that the shortest day of the year is on December 21 (give or take a day), we know that the amount of daylight in December will look like a curve, opening upward, with a minimum at around $x=21$.

Naively, the simplest structure that has this behavior is a parabola opening upward. Of course, a parabola has the form $$y=ax^2+bx+c.$$ Your job is to compute the parameters of the parabola, $a,b, c$.

If we had three points, we could (probably) compute $a, b, c$ directly. But we have 31 data points, meaning our system is overdetermined. As a result, if we assume that the curve is parabolic, we have 31 equations and three unknowns:

$$ax_1^2+bx_1+c = y_1 \\ ax_2^2+bx_2+c = y_2\\ \vdots$$

Note that we know exactly the values of $x_1, y_1, x_2, \ldots$. So, what we really have is a linear system in three variables. It might be more clear if we re-write it:

$$(x_1^2)a +(x_1) b + c = y_1 \\ (x_2^2)a+(x_2)b + c = y_2\\ \vdots$$

In matrix form, we can write this as

$$\begin{pmatrix} x_1^2 & x_1 & 1 \\ x_2^2 & x_2 & 1 \\ & \vdots & \\ x_{31}^2 & x_{31} & 1 \end{pmatrix} \begin{pmatrix} a \\ b \\ c\end{pmatrix} = \begin{pmatrix} y_1 \\ y_2 \\ \vdots \\ y_{31} \end{pmatrix}.$$

The matrix on the left is known as a Vandermonde matrix. This is an over-determined linear system of the form $Av=b$, and we can solve it by multiplying both sides of the equation on the left by $A^T$:

$$A^TAv = A^Tb.$$

$A^TA$ is symmetric, and in most cases that we encounter in data analysis, it will be invertible. Therefore,

$$v = (A^TA)^{-1}A^Tb,$$

and $v = (a\ b\ c)^T$ is your parameter vector. This allows you to compute the linear least squares approximation to a parabola fitting your 30 data points.