Jump to content

Statistics/estimation Question ...


Sip

Recommended Posts

I've been banging my head against this for a couple of days now ... I have managed to confuse myself beyond belief so if you guys can help out, I'd really appreciate it!

 

So I have n values in the form of a vector x. Call each of them x_i where 1 <= i <=n.

 

Suppose I had to make a guess y that minimizes "error" with respect to these n values.

 

If "error" is sum of absolute differences, then y = median(x) does the trick, right?

If "error" is sum of squares of differences, then y = mean(x) does the trick, right?

 

If I'm mistaken so far, please correct me!

 

NOW, I want to pick a guess that minimizes relative error. So in other words, I want to minimize:

 

sum i=1 to n of | (x_i - y) / x_i |

 

Forget about divide by 0 problems for now. Is there an easy way to pick y in this case?

Link to comment
Share on other sites

Think of y as a guess for x. Suppose we know all x_i = 100. Then a really good guess for y = 100 since that will minimize both L1 error (sum abs(x_i - y) for all i) and L2 error (sum (x_i - y)^2 for all i) since both sums will be 0. Picking y=12 would be another choice but clearly worse than y=100 in this case :) Does it make sense what I mean by "pick y"? It's basically a best guess on what you think a given x_i will be.

 

Now given any x, I think y=median(x) will minimize L1 error (among all possible y's from -inf to +inf).

 

My question now is regarding the relative error. I think the median will also minimize the relative error but I'm not sure.

 

 

As a side note, if all we knew about x is that it will be distributed uniformly from -inf to +inf (as in all possible real numbers are equally likely to occur in x), then obviously the best guess y=0.

Edited by Sip
Link to comment
Share on other sites

Think of y as a guess for x. Suppose we know all x_i = 100. Then a really good guess for y = 100 since that will minimize both L1 error (sum abs(x_i - y) for all i) and L2 error (sum (x_i - y)^2 for all i) since both sums will be 0. Picking y=12 would be another choice but clearly worse than y=100 in this case :) Does it make sense what I mean by "pick y"? It's basically a best guess on what you think a given x_i will be.

 

Now given any x, I think y=median(x) will minimize L1 error (among all possible y's from -inf to +inf).

 

My question now is regarding the relative error. I think the median will also minimize the relative error but I'm not sure.

As a side note, if all we knew about x is that it will be distributed uniformly from -inf to +inf (as in all possible real numbers are equally likely to occur in x), then obviously the best guess y=0.

 

Sip, why don't you use JMP?

Link to comment
Share on other sites

What's a JMP?

 

http://www.jmp.com/

 

I used to use that thing for statistics, I haven't used it much for non-numeric stuff. But since you did not know what it is, I doubt you would want to learn it just to use it just for that, but it is a very practicle software with such things, more particularly when you must enter data, it gives you various informations and has many options for comparing error ranges between samples and stuff.

Edited by QueBeceR
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...