Commit 65bd3df9 authored by Jim Hefferon's avatar Jim Hefferon

least squares edits

parent 9e6a8e58
......@@ -142,6 +142,10 @@
\bibitem[Con.\ Prob.\ 1955]{ContestProb1955no38}
\emph{The Contest Problem Book},
1955 number 38.
\bibitem[Cost Of Tolls]{CostOfTolls}
\emph{Cost of Tolls},
\url{http://costoftolls.com/Tolls_in_New_York.html},
2012-Jan-07.
\bibitem[Coxeter]{Coxeter}
H.S.M.~Coxeter,
\emph{Projective Geometry},
......@@ -284,6 +288,10 @@
\emph{The Structure of Crystals},
Adam Hilger,
1987.
\bibitem[Google Maps]{GoogleMaps}
\emph{Directions\Dash Google Maps},
\url{http://maps.google.com/help/maps/directions/},
2012-Jan-07.
\bibitem[Goult, \emph{et al.}]{Goult}
R.J.~Goult, R.F.~Hoskins, J.A.~Milner, M.J.~Pratt,
\emph{Computational Methods in Linear Algebra},
......@@ -566,7 +574,7 @@
\emph{The Square-cube law},
\url{http://en.wikipedia.org/wiki/Square-cube_law},
2011-Jan-17.
\bibitem[WikipediaMensMile]{WikipediaMensMile}
\bibitem[Wikipedia Mens Mile]{WikipediaMensMile}
\emph{Mile run world record progression},
\url{http://en.wikipedia.org/wiki/Mile_run_world_record_progression},
2011-Apr-09.
......
This diff is collapsed.
......@@ -19385,6 +19385,19 @@
\end{ans}
\begin{ans}{6}
\textit{Sage} gives the line of best fit as
$\text{toll}=-0.05\text{dist}+5.63$.
But the graph shows that the equation has no predictive value.
\begin{center}
\includegraphics{bridges.png}
\end{center}
Apparently a better model is that
(with only one intermediate exception) crossings in the city
all cost roughly the same as each other,
and crossings upstate all cost the same as each other.
\end{ans}
\begin{ans}{7}
\begin{exparts}
\partsitem A computer algebra system like MAPLE or MuPAD will give
an intercept of $b=4259/1398\approx 3.239628$
......@@ -19463,7 +19476,7 @@
\end{exparts}
\end{ans}
\begin{ans}{7}
\begin{ans}{8}
\begin{exparts}
\partsitem The plot is nonlinear.
\begin{center} \small
......@@ -19513,41 +19526,6 @@
The actual distance is about $39.503$.
\end{exparts}
\end{ans}
\begin{ans}{8}
\begin{exparts}
\partsitem With this input
\begin{equation*}
A =
\begin{mat}[r]
1 & 306 \\
1 & 329 \\
1 & 356 \\
1 & 367 \\
1 & 396 \\
1 & 427 \\
1 & 415 \\
1 & 424
\end{mat}
\qquad
b =
\colvec[r]{975 \\
969 \\
948 \\
910 \\
890 \\
906 \\
900 \\
899}
\end{equation*}
MAPLE gives the intercept
$b=34009779/28796\approx 1181.0591$ and the slope
$m=-19561/28796\approx -0.6793$.
\begin{center} \small
\includegraphics{ch3.94}
\end{center}
\end{exparts}
\end{ans}
\subsection{Topic: Geometry of Linear Maps}
\begin{ans}{1}
......@@ -2107,14 +2107,14 @@ beginfig(42) % least squares coin flip
draw z0--z1; % flips axis (x-axis)
label.lrt(btex {\small \textit{flips}} etex,z1);
updown_ticks(9,(10w,0v),(10w,0v));
label.bot(btex {\tiny 30} etex,(30w,0v));
label.bot(btex {\tiny 60} etex,(60w,0v));
label.bot(btex {\tiny 90} etex,(90w,0v));
label.bot(btex {\scriptsize 30} etex,(30w,0v));
label.bot(btex {\scriptsize 60} etex,(60w,0v));
label.bot(btex {\scriptsize 90} etex,(90w,0v));
draw z0--z2; % heads axis (y-axis)
label.ulft(btex {\small \textit{heads}} etex,z2);
sidetoside_ticks(6,(0w,10v),(0w,10v));
label.lft(btex {\tiny 30} etex,(0w,30v));
label.lft(btex {\tiny 60} etex,(0w,60v));
label.lft(btex {\scriptsize 30} etex,(0w,30v));
label.lft(btex {\scriptsize 60} etex,(0w,60v));
% the line
pickup pencircle scaled line_width_light;
......@@ -2194,16 +2194,16 @@ beginfig(44) % least squares money denom vs life
draw z0--z1; % denom axis (x-axis)
label.lrt(btex {\small \textit{denom}} etex,z1);
updown_ticks(10,(10w,0v),(10w,0v));
label.bot(btex {\tiny 10} etex,(10w,0v));
label.bot(btex {\tiny 30} etex,(30w,0v));
label.bot(btex {\tiny 50} etex,(50w,0v));
label.bot(btex {\tiny 70} etex,(70w,0v));
label.bot(btex {\tiny 90} etex,(90w,0v));
label.bot(btex {\scriptsize 10} etex,(10w,0v));
label.bot(btex {\scriptsize 30} etex,(30w,0v));
label.bot(btex {\scriptsize 50} etex,(50w,0v));
label.bot(btex {\scriptsize 70} etex,(70w,0v));
label.bot(btex {\scriptsize 90} etex,(90w,0v));
draw z0--z2; % heads axis (y-axis)
label.ulft(btex {\small \textit{life (yrs)}} etex,z2);
sidetoside_ticks(8,(0w,1v),(0w,1v));
label.lft(btex {\tiny 4} etex,(0w,4v));
label.lft(btex {\tiny 8} etex,(0w,8v));
label.lft(btex {\scriptsize 4} etex,(0w,4v));
label.lft(btex {\scriptsize 8} etex,(0w,8v));
% the line
pickup pencircle scaled line_width_light;
......@@ -2245,22 +2245,22 @@ beginfig(45) % least squares men's mile
draw (z0+(5w,0v))--z0 dashed withdots scaled .25;
label.lrt(btex {\small \textit{year}} etex,z1);
updown_ticks(15,(10w,0v),(10w,0v));
label.bot(btex {\tiny 1870} etex,(20w,0v));
label.bot(btex {\tiny 1890} etex,(40w,0v));
label.bot(btex {\tiny 1910} etex,(60w,0v));
label.bot(btex {\tiny 1930} etex,(80w,0v));
label.bot(btex {\tiny 1950} etex,(100w,0v));
label.bot(btex {\tiny 1970} etex,(120w,0v));
label.bot(btex {\tiny 1990} etex,(140w,0v));
label.bot(btex {\scriptsize 1870} etex,(20w,0v));
label.bot(btex {\scriptsize 1890} etex,(40w,0v));
label.bot(btex {\scriptsize 1910} etex,(60w,0v));
label.bot(btex {\scriptsize 1930} etex,(80w,0v));
label.bot(btex {\scriptsize 1950} etex,(100w,0v));
label.bot(btex {\scriptsize 1970} etex,(120w,0v));
label.bot(btex {\scriptsize 1990} etex,(140w,0v));
pickup pensquare scaled line_width_light;
draw (z0+(0w,5v))--z2; % world record axis (y-axis)
pickup pencircle scaled line_width_light;
draw (z0+(0w,5v))--z0 dashed withdots scaled .25;
label.ulft(btex {\small \textit{seconds}} etex,z2);
sidetoside_ticks(6,(0w,10v),(0w,10v));
label.lft(btex {\tiny 220} etex,(0w,10v));
label.lft(btex {\tiny 240} etex,(0w,30v));
label.lft(btex {\tiny 260} etex,(0w,50v));
label.lft(btex {\scriptsize 220} etex,(0w,10v));
label.lft(btex {\scriptsize 240} etex,(0w,30v));
label.lft(btex {\scriptsize 260} etex,(0w,50v));
% the line
pickup pencircle scaled line_width_light;
......
four_minute_mile.png

10.3 KB | W: | H:

four_minute_mile.png

8.48 KB | W: | H:

four_minute_mile.png
four_minute_mile.png
four_minute_mile.png
four_minute_mile.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
......@@ -279,7 +279,7 @@
%------------------------- code listings
\usepackage{listings}
\lstset{basicstyle=\small\ttfamily,
\lstset{basicstyle=\ttfamily\small,
commentstyle=\textit,
keywordstyle=\color{blue}\bfseries,
showstringspaces=false,
......
This diff is collapsed.
......@@ -12,5 +12,5 @@ data=[[1870,268.8],
[1950,241.4]]
var('slope,intercept')
model(x) = slope*x+intercept
g=points(data)+plot(model(intercept=find_fit(data,model)[0].rhs(),slope=find_fit(data,model)[1].rhs()),(x,1860,1960),color='red',figsize=3)
g=points(data)+plot(model(intercept=find_fit(data,model)[0].rhs(),slope=find_fit(data,model)[1].rhs()),(x,1860,1960),color='red',figsize=3,fontsize=7)
g.save("four_minute_mile.png")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment