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. (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?
Originally posted by iamatigerAfter 3 pages of algebra I give up...
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.
๐
The 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.
Originally posted by iamatigerThanks 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.
Correct!
Nice one
BTW, perhaps someone knows how to "hide" the answer? Couldn't find anywhere in the Help section. Thank you.
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.
Originally posted by kes29hope 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:
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.
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.
Yes, 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!
๐