# Finding the value which minimises all residuals

I have a series of observations, measurements made at various times $t$. I now need to determine the most likely value of $R$ (distance) using the model below. The guide says I should find the value of $R$ which minimises the values of $\Delta RA$ across all times, $t$.

The model is: $$tan(\Delta RA)={ Xcos(Dec_0 + \mu t)sin(RA_0 + \nu t)-sin(wt) \over Xcos(Dec_0 + \mu t)cos(RA_0 + \nu t)-cos(wt) }$$

where; $$X={R\over R_Ecos\lambda}$$

• $t$ is a variable of time
• $\Delta RA$ varies with time (i.e. there are different values for each row in the table)
• Every other variable, except for $R$, are already determined constants.

With the known values substituted, we have: $$tan(\Delta RA)={ \left({R \over 2115}\right) cos(14.174550 - 0.003488 t) sin(0.814907 - 0.000468 t) - sin(15.04 t) \over \left({R \over 2115}\right) cos(14.174550 - 0.003488 t) cos(0.814907 - 0.000468 t) - cos(15.04 t) }$$

How would I even begin to work this out?

-

You have a table of times and measurements of something (RA and declination?). For a given value of $R$, you can calculate $\Delta RA$ at each time, using the observations. Then you can take the absolute value of the $R$'s, or the squares, and add them up. This gives you a function $error(R)$ of one variable. Now adjust $R$ to minimize the function. Excel will let you Goal Seek to minimize the function, or you can use a routine from any numerical analysis text.
Thanks Ross. A few things are confusing me here ... Shouldn't I be calculating $tan(\Delta RA)$ at each time, and comparing it with the result of the right term of the model? I then get the differences between the observed results and the model predicted results (right term), sum of their squares, and try to minimise that sum by Goal Seeking for different values of $R$. Does that sound right to you? –  Carl Oct 17 '12 at 10:23
You can minimize in $\tan \Delta RA$ or take the $\arctan$ of both sides and minimize in $Delta RA$. They will give about the same result, but minimizing in $\tan Delta RA$ will weight the points where $\tan$ varies (near $\pm \frac \pi 2$)more highly. –  Ross Millikan Oct 17 '12 at 12:47