# [R] linear correlation?

Scott, Uriel uriel.scott at mirant.com
Thu Mar 7 18:37:29 CET 2002

If you have 3 numbers a1, a2, a3 representing the lengths of 3 branches and
b1, b2, b3 representing their branching angles then this should be
represented as { (a1,b1), (a2,b2), (a3,b3) } rather than { a1, a2, a3, b1,
b2, b3 }.  I.e., you have 3 samples from a bivariate random variable
(length, angle), not 6 samples from a univariate RV.

> -----Original Message-----
> From:	dechao wang [SMTP:dechwang at yahoo.co.uk]
> Sent:	Thursday, March 07, 2002 10:29 AM
> To:	andrew_perrin at unc.edu
> Cc:	r-help at stat.math.ethz.ch
> Subject:	Re: [R] linear correlation?
>
>  --- Andrew Perrin <andrew_perrin at unc.edu> wrote: > On
> Thu, 7 Mar 2002, [iso-8859-1] dechao wang wrote:
> >
> > > Thanks Andrew,
> > >
> > > Consider the following example:
> > > > x1<-c(1,  2,  3,   100, 200, 300)
> > > > x2<-c(1.1,2.8,3.3, 108, 209, 303)
> > > > x3<-c(2.8,3.8,5.3, 108, 209, 303)
> > > > cor(x1,x2)
> > > [1] 0.999655
> > > > cor(x1,x3)
> > > [1] 0.9997286
> > >
> > > You can see that as x2 changed to x3 with only
> > first
> > > three numbers changing, the coefficients (x1, x2)
> > and
> > > (x1,x3) changed little. I thought this may be
> > because
> > > the last three numbers were in different units.
> >
> > It's not because they're different units -- it's
> > because they're different
> > measures altogether! Can you state, in words (e.g.,
> > not in mathematical
> > terms) what you think a correlation would *mean*
> > between these two
> > vectors?  R is happily telling you, as any
> > statistical package would, what
> > the correlation is between two vectors of numbers.
> > But that correlation
> > doesn't necessarily mean anything at all; its
> > meaning is based on what the
> > vectors measure.
> >
>
> There are lots of examples. Let us consider the first
> three numbers representing three branches of an apple
> tree, the last three numbers representing the
> corresponding branching angles of the branches. So x1,
> x2, x3 represents three different trees. Maybe we can
> ask which tree is similar to which tree?
>
> __________________________________________________
>
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> -.-.-
> r-help mailing list -- Read
> http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> _._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._