Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2011-02-20 04:23:51

onako
Member
Registered: 2010-03-28
Posts: 43

Deviation (specific number)

Given a set of random real numbers G = (a, b, c, d, e, f, ...), Im supposed to calculate the number T such that the sum of squared errors between that
number and all the elements in G is mimimum. Intuitively, this should be the average of the numbers in G, but Im not sure how to proceed with the proof (perhaps Im missing something important here).

Would the same answer hold for the question: compute a number T such that the deviation of all the elements in G with respect to T is mimimum. (The standard deviation is with respect to the mean value, but is there some other value T such that the deviation with respecto to it is mimimum (smaller that standard deviation and all others))
In addition, how would the conclusions relate to the median value. Again, intuitively, this would match the number T with the closest value in G.

Your opinion on this is highly appreciated. Thanks

Last edited by onako (2011-02-20 04:26:30)

Offline

#2 2011-02-20 05:17:20

Bob
Administrator
Registered: 2010-06-20
Posts: 10,208

Re: Deviation (specific number)

:)hi onako

I've not met this problem before but it sounds a lot like the least squares analysis for bivariate distributions.  Except you haven't got two variables.  Not to worry, the proof goes along similar lines I think.

I'd like to call the numbers

rather than


Let

We want this to be a minimum.

Since T does not vary with different 'x's,  the first term is just the same repeated 'n' times

Similarly the 2T can be factorised out of the second term

now divide by 'n'

In the second term the bracketed term is just the mean, and in the third, use the formula for variance to get:


where xbar is the mean  and sigma is the standard deviation of the 'x's


In a quadratic with the usual a, b c elements, the minimum is when

so

Which is what your intuition had said at the start.  So that's very satisfying!  smile smile

Hope that helps


Bob

Last edited by Bob (2011-02-20 07:01:22)


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#3 2011-02-20 06:04:45

onako
Member
Registered: 2010-03-28
Posts: 43

Re: Deviation (specific number)

Thanks.
Im not sure I understand the transition between last 3 lines of the derivation. The n.T^2, term, for example, what does it stand for?
Also, in the last and second last step: how did you obtain the sigma^2 and xbar^2 terms? The min calculations should involve derivatives, I guess.

Offline

#4 2011-02-20 06:56:06

Bob
Administrator
Registered: 2010-06-20
Posts: 10,208

Re: Deviation (specific number)

hi onako,

I've edited my previous post to fill in the missing details and finish it off. 

I think you will like the final asnwer.

Hopefully it is correct.

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#5 2011-02-20 22:35:47

onako
Member
Registered: 2010-03-28
Posts: 43

Re: Deviation (specific number)

Thanks. What would be the relation of D1 and D2 values associated with sets G1 and G2: G1 and G2 having the same length and same standard deviation?
In other words, given two sets G1 and G2 of equal length, what condition needs be satisfied for D1=D2; they would need to have same standard deviation, or same mean?

Offline

#6 2011-02-21 00:53:43

Bob
Administrator
Registered: 2010-06-20
Posts: 10,208

Re: Deviation (specific number)

hi onako

Given this:

it looks like you need n, the mean and the standard deviation to be the same.

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#7 2011-02-21 08:58:54

onako
Member
Registered: 2010-03-28
Posts: 43

Re: Deviation (specific number)

Thanks a lot. I tried to extend the procedure by incorporating the effect of a function f(x)=x^p.
So, I'm trying to incorporate it for individual terms.

Then, extracting the a, b, c terms is not so easy. Perhaps I would need to take different approach.
Thanks.

Offline

#8 2011-02-21 20:12:41

Bob
Administrator
Registered: 2010-06-20
Posts: 10,208

Re: Deviation (specific number)

hi onako

The key step was getting from

to

Once you have your extra x variable in there, it messes up this step.

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#9 2011-02-22 08:34:23

onako
Member
Registered: 2010-03-28
Posts: 43

Re: Deviation (specific number)

I guess the solution is the weighted average. Or?

Offline

#10 2011-02-22 08:39:52

Bob
Administrator
Registered: 2010-06-20
Posts: 10,208

Re: Deviation (specific number)

hi

Well maybe.  It's a good suggestion but I need to think about it.

How about making up a simple example and trying the numbers?

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

Board footer

Powered by FluxBB