In the least squares problem we find that
\[ A^T Ax = A^T b \]
and
c1=n∑yi,c2=∑xi2∑xiyi
where
y=c1+c2x
I'm assuming this linear equation represents some kind of fitted line for the data.
However, a previous step in the quiz involved setting all the xi coordinates to xi−xˉ to simplify finding c1 and c2.
So I went ahead and tried this method on a simple set I made up of 20 pieces of data of coordinates (x,y):
{(1,4),(3,5),(4,3),(4,9),(6,2),(6,8),(8,6),(10,9),(11,7),(12,5),(13,11),(14,7),(15,9),(16,12),(17,8),(18,10),(18,13),(19,14),(20,13),(20,14)}
A little spread out but I expect basically a positive linear relationship with y as a function of x.
Now I find with my calculator stat functions that xˉ=11.75, so I set all xi to xi−11.75:
X={−10.75,−8.75,−7.75,−7.75,−5.75,−3.75,−1.75,−0.75,0.25,1.25,2.25,3.25,4.25,5.25,6.25,6.25,7.25,8.25,8.25}
My calculations from here:
c1=n∑yi=20169=8.45
c2=∑xi2∑xiyi=725.75340.25≈0.46883
I wind up with a line equation that looks like
y=0.46883x+8.45
If I try and plot this, the line sits way outside any of my data.
Did I miss some crucial step? Do the two constants change in subtracting the mean of X to begin with? Or am I misunderstanding the meaning of c1 and c2? As far as I can tell the quiz doesn't seem to suggest one way or another.
#Algebra
Easy Math Editor
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
*italics*
or_italics_
**bold**
or__bold__
paragraph 1
paragraph 2
[example link](https://brilliant.org)
> This is a quote
\(
...\)
or\[
...\]
to ensure proper formatting.2 \times 3
2^{34}
a_{i-1}
\frac{2}{3}
\sqrt{2}
\sum_{i=1}^3
\sin \theta
\boxed{123}
Comments
There are no comments in this discussion.