- 01 Oct '10 22:05 / 2 editsA scientist performed an experiment where he measured values of Y for X=1,2,3...n where n was between 100 and 10,000

He saw that the values of Y, when plotted against X, lay exactly along a straight line and he asked his assistant to calculate the slope of this line.

The assistant got confused and calculated the standard deviation of y instead. (stdev = sqrt(sum((y-average_y)^2)/n)

The value the assistant got was an integer times greater than the true slope of the line.

How many measurements did the scientist make? - 02 Oct '10 06:41

After 3 pages of algebra I give up...*Originally posted by iamatiger***A scientist performed an experiment where he measured values of Y for X=1,2,3...n where n was between 100 and 10,000**

He saw that the values of Y, when plotted against X, lay exactly along a straight line and he asked his assistant to calculate the slope of this line.

The assistant got confused and calculated the standard deviation of y instead. (stde ...[text shortened]... times greater than the true slope of the line.

How many measurements did the scientist make?

I'll outline my approach to the solution (until this point) hoping the prof gives partial credit

start by defining the function Y(X)

Y(x) = [(Y(n)-Y(1))/(n-1)](X-1) + Y(1)

Yavg= [ Y(n) + Y(1) ]/2

Y(n) = [(Y(n)-Y(1))/(n-1)](n-1) + Y(1)

looking back I screwed up the summation, to tired to try again...good one.

- 02 Oct '10 10:44 / 2 editsThe slope is a.

If n is an odd number, than sum((y - average-y)² ) = 2 (a² + (2a)² + (3a)² + .... ) = 2a² (1 + 4 + 9 ... )

sqrt ( 2a² (1 + 4 + 9 ... ) / n ) = a × sqrt (2 (1 + 4 + 9 ... ) / n)

m × a = a × sqrt (2 (1 + 4 + 9 ... ) / n)

m = sqrt (2 (1 + 4 + 9 ... ) / n)

m an integer.

2 (1 + 4 + 9 ... ) / n cannot be an integer, because n is an odd number.

Apparantly, n isn't odd. - 03 Oct '10 19:38

Thanks for the puzzle, very original! It would be interesting to know the solution you have, maybe there is some quick "clever" way to solve it? The way I did it was purely mechanical, a lot of algebra, few combinatorial identities and a bit of number theory in the end.*Originally posted by iamatiger***Correct!**

Nice one

BTW, perhaps someone knows how to "hide" the answer? Couldn't find anywhere in the Help section. Thank you. - 03 Oct '10 20:06 / 1 edit
*Originally posted by kes29***Thanks for the puzzle, very original! It would be interesting to know the solution you have, maybe there is some quick "clever" way to solve it? The way I did it was purely mechanical, a lot of algebra, few combinatorial identities and a bit of number theory in the end.**

BTW, perhaps someone knows how to "hide" the answer? Couldn't find anywhere in the Help section. Thank you.This is how you hide text.Click 'reply and quote' and you'll se how I put the hidden text behind an icon. - 04 Oct '10 08:35 / 7 edits

hope this is legible, it is pasted in from my notes when constructing the question. It's messy because you can't hide multiple lines with one command:*Originally posted by kes29***Thanks for the puzzle, very original! It would be interesting to know the solution you have, maybe there is some quick "clever" way to solve it? The way I did it was purely mechanical, a lot of algebra, few combinatorial identities and a bit of number theory in the end.**

BTW, perhaps someone knows how to "hide" the answer? Couldn't find anywhere in the Help section. Thank you.

y = x.slope + Kaverage y = (n.slope + K + slope + K)/2 = (n+1)slope/2 + Ky_variance = sum{x = 1..n}(x.slope + K - (n+1)slope/2 - K)^2/ny_variance = sum{x=1..n}(x.slope - (n+1)slope/2)^2/ny_variance = sum{x=1..n}(x^2.slope^2 -x*(n+1)*slope^2 + (n+1)^2.slope^2/4)/ny_variance = slope^2/n.(sum{x=1..n}(x^2) -(n+1)sum{x=1..n}(x) +n(n+1)^2/4)

expand those series. One for x^2 is not obvious but can be easily googled:

y_variance = slope^2/n.(n.(2n+1).(n+1)/6 - (n+1).n.(n+1)/2 + n(n+1)^2/4)y_variance = slope^2(n+1)/12n(2.n.(2n+1) - 6.n.(n+1) + 3.n.(n+1))y_variance = slope^2(n+1)/12n(4n^2 + 2n - 3n^2 - 3n)y_variance = slope^2(n+1)/12n(n^2 - n)y_variance = slope^2(n+1)/12n(n.(n-1)y_variance = slope^2(n+1)(n-1)/12

y_stdev = slope.sqrt((n+1)(n-1)/12)

if y_stdev = mult.slope then

mult = sqrt((n+1)(n-1)/12)mult^2 = (n+1)(n-1)/12

12.mult^2 = n^2 - 1

I did an Excel sheet search here, which found mult can be 0,2,28,390,5432...With corresponding values for n. I'd be interested to see your number theory. - 04 Oct '10 13:17Yes, my solution was more or less the same.

As for the last bit - equations of the form

n^2 - d*m^2 = 1, where d is not a square of an integer,

are the simplest form of something called pellian equations. It's not difficult to solve them, but it probably requires a bit of specialist knowledge. Brief explanation with a simple example can be found in this Wikipedia entry:

http://en.wikipedia.org/wiki/Pell's_equation

The basic idea is to find the least positive nontrivial solution (ie (n, m) is not (1, 0)), called the fundamental solution. Formally this can be done by finding the continued fraction representation of sqrt(d) and checking the successive convergents of sqrt(d). But in our particular case it is easy to "guess" one: (n, m) = (7, 2). Now the following theorem can be applied:

-------------

If (r, s) is the fundamental solution of n^2 - d*m^2 = 1, where d is positive and nonsquare, then every solution to n^2 - d*m^2 = 1 is given by (n(k), m(k)) where

n(k) +m(k)*sqrt(d) = (r + s*sqrt(d))^k for k = 1, 2, 3, ...

-------------

That is, raising [7 + 2*sqrt(12)] to the power of 2, 3, 4, ... will give all further integral solutions of n^2 - 12*m^2 = 1. And there is only one with n between 100 and 10000, namely (n, m) = (1351, 390).

Alternatively, of course, one can simply run through several thousand of m values and check if any of corresponding n values is an integer in (100, 10000) using some computer program, just as you did. It may be even easier in this particular exercise!