Go back
The scientist's assistant

The scientist's assistant

Posers and Puzzles

2 edits
Vote Up
Vote Down

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?

Vote Up
Vote Down

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?
After 3 pages of algebra I give up...

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.



๐Ÿ˜•

2 edits
Vote Up
Vote Down

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.

Vote Up
Vote Down

I think n = 1351. Also, stdev = 390*slope.

Vote Up
Vote Down

Originally posted by kes29
I think n = 1351. Also, stdev = 390*slope.
Correct!
Nice one

Vote Up
Vote Down

Originally posted by iamatiger
Correct!
Nice one
How is it solved, so I can sleep at night?

1 edit
Vote Up
Vote Down

Originally posted by joe shmo
How is it solved, so I can sleep at night?
I'll pm you with a clue.

Vote Up
Vote Down

Originally posted by iamatiger
Correct!
Nice one
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.

1 edit
Vote Up
Vote Down

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.

7 edits
Vote Up
Vote Down

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.
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:

y = x.slope + K

average y = (n.slope + K + slope + K)/2 = (n+1)slope/2 + K

y_variance = sum{x = 1..n}(x.slope + K - (n+1)slope/2 - K)^2/n

y_variance = sum{x=1..n}(x.slope - (n+1)slope/2)^2/n

y_variance = sum{x=1..n}(x^2.slope^2 -x*(n+1)*slope^2 + (n+1)^2.slope^2/4)/n

y_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.

Vote Up
Vote Down

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!

๐Ÿ˜‰

1 edit
Vote Up
Vote Down

Originally posted by FabianFnas
[hidden]This is how you hide text.[/hidden] Click 'reply and quote' and you'll se how I put the hidden text behind an icon.
Cheers!


It works!

Vote Up
Vote Down

My sister in law (who is a proper mathematician) says that the algebra is a bit simpler if one starts off with:

Y_Variance = mean(Y^2) - Mean(Y)^2

Thanks for the link to Pells equations!