MAT 382 - Library MiniProject

started on: Friday, 2 Oct 2015

to be submitted by: Tuesday, 6 Oct 2015 at 10am in my office

This project comes from a consulting project I did with a group of students in 1993. Our “client” was the librarian from Eastern Nazarene College. The librarian had just installed an “electric eye” at the library door which counted patrons as they broke the beam coming or going. The only problem was that the beam took several second to reset itself after each time it registered a count. During that time, multiple patrons could come and go. Therefore, the actual count of “passings” would be larger than what the electric eye reported.

What my students recommended was for the library to have the desk workers count the passings manually for 3 full days of operation and record the electric eye’s count of “passings” on the same days. Here are the resulting data:

Date / Electric eye’s count (y) / Actual hand count (x)
R, May 13 / 573 / 713
F, May 14 / 393 / 468
M, May 17 / 616 / 727

The library’s goal was to develop a formula which modeled the electric eye counts as a proportion of the actual hand counts. Let y (response variable) denote a day’s electric eye count and x (predictor variable) denote the same day’s actual hand count.

  1. Plot y vs. x for these data. Does it appear that the electric eye count (y) is (roughly) a multiple (kx) of the actual hand count? Justify your answer based on the scatterplot.
  2. Suppose that the relationship y=kx is used to model the observed x-y data. The goal is to determine THE value of k which gives the best fit in the least squares sense. Here we’ll determine the optimal value of k for this objective.
  3. Write and then simplify the “objective function”:

S(k) = S (y – kx)2

= (573 - k×713)2 + (393 - k×468)2 + (616 - k×727)2

  1. Use a little Calc 1 (or PreCalc) to determine the value of k which achieves a minimum for S(k). Do this by taking the derivative S¢(k), setting it equal to 0, and then solving for k.
  2. Now give a brief rationale for why your k value from part b must achieve the MINimum for S(k) (not a MAXimum).
  3. Now that you know the least squares value of k, use it to plot the line y=kx on your scatterplot from #1. Be sure the resulting line looks like a reasonable “best” line.
  4. Use your line to write a couple of summary sentences to the librarian. The essence of these sentences should tell her how to convert:
  5. from actual counts to electric eye counts of “passings”
  6. from electric eye counts to actual counts of “passings”

optional EXTRA CREDIT:

For extra credit, generalize the above situation from the 3 datapoints given to a dataset (x1,y1), …, (xn,yn). Obtain an expression for the least squares value of k in terms of the (xi,yi)’s. Be sure to show that your answer attains a MINimum for S(k).

complete as of 1 July 2015