Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Problem with built-in CORR function

Re: Problem with built-in CORR function

From: Maxim Demenko <mdemenko_at_gmail.com>
Date: Sun, 16 Apr 2006 15:45:06 +0200
Message-ID: <e1thp3$jfu$00$1@news.t-online.com>


Krzysiek299 schrieb:
> Hello.
> I want to calculate the coefficient of correlation between x with id=1
> and x with id=2. mytable is looking something like this:
> x | id
> -------
> 2 | 1
> 5 | 2
> 2 | 1
> 3 | 2
> 3 | 1
> 4 | 2

You can't do it. CORR calculates a correlation for set of value pairs. If you speak about x with id=1 - you get one values set , x with id=2 - you get another values set, still you don't have set of values pairs. For example, from given values can be built two diferent sets of values pairs:

set 1: and set 2:
x_id1 | x_id2 x_id1| x_id2
------------- -------------

     2 | 5           2 | 3
     2 | 3           2 | 4
     3 | 4           3 | 5

So, for set 1 you get correlation = 0 which means, these values don't corelate at all, for set 2 you get correlation 0.87, which means - these values correlate pretty well.

Best regards

Maxim Received on Sun Apr 16 2006 - 08:45:06 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US