PC Review


Reply
Thread Tools Rate Thread

how i calculate pearson correlation coefficient for excel graph

 
 
=?Utf-8?B?dW5pdmVyc2l0eSBzdHVkZW50IHRoYXQgaXMgbG9z
Guest
Posts: n/a
 
      16th Sep 2006
how do I calculate the pearson correlation coefficient for on microsoft excel
for a grapg of information. If it is not possible is there another program
that can do this for me?
 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      16th Sep 2006
In a cell in the worksheet, enter this formula

=CORREL({y range},{x range})

where {x range} and {y range} are the ranges occupied by the X and Y values
in the sheet. You can select them by clicking and dragging while you are
entering the formula.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"university student that is lost" <university student that is
(E-Mail Removed)> wrote in message
news02D5732-480A-465C-8C6C-(E-Mail Removed)...
> how do I calculate the pearson correlation coefficient for on microsoft
> excel
> for a grapg of information. If it is not possible is there another program
> that can do this for me?



 
Reply With Quote
 
Del Cotter
Guest
Posts: n/a
 
      16th Sep 2006
On Fri, 15 Sep 2006, in microsoft.public.excel.charting,
Jon Peltier <(E-Mail Removed)> said:

>In a cell in the worksheet, enter this formula
>
>=CORREL({y range},{x range})


Shouldn't that be =PEARSON({y range},{x range})? I only have Excel 97,
but I'm surprised to see that PEARSON() and CORREL() do not have a
pointer to each other in the "See also" section of the help file.

--
Del Cotter
NB Personal replies to this post will send email to (E-Mail Removed),
which goes to a spam folder-- please send your email to del3 instead.
 
Reply With Quote
 
Jon Peltier
Guest
Posts: n/a
 
      17th Sep 2006
A quick glimpse at Google led me to believe they were one and the same. Just
now Wikipedia tells me:

"The CORREL() function in many major spreadsheet packages, such as Microsoft
Excel and Gnumeric calculates Pearsons correlation coefficient."

Wolfram adds that:

"The correlation coefficient is also known as the product-moment coefficient
of correlation or Pearson's correlation."

I wouldn't count on the Excel help files to be much help, especially about
statistics.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Del Cotter" <(E-Mail Removed)> wrote in message
news:94RCLHB0j+(E-Mail Removed)...
> On Fri, 15 Sep 2006, in microsoft.public.excel.charting,
> Jon Peltier <(E-Mail Removed)> said:
>
>>In a cell in the worksheet, enter this formula
>>
>>=CORREL({y range},{x range})

>
> Shouldn't that be =PEARSON({y range},{x range})? I only have Excel 97,
> but I'm surprised to see that PEARSON() and CORREL() do not have a pointer
> to each other in the "See also" section of the help file.
>
> --
> Del Cotter
> NB Personal replies to this post will send email to
> (E-Mail Removed),
> which goes to a spam folder-- please send your email to del3 instead.



 
Reply With Quote
 
Del Cotter
Guest
Posts: n/a
 
      17th Sep 2006
You're right, a quick test of the two functions suggests they give the
same numeric result every time.

Jon Peltier <(E-Mail Removed)> said:
>A quick glimpse at Google led me to believe they were one and the same. Just
>now Wikipedia tells me:
>
>"The CORREL() function in many major spreadsheet packages, such as Microsoft
>Excel and Gnumeric calculates Pearsons correlation coefficient."


--
Del Cotter
NB Personal replies to this post will send email to (E-Mail Removed),
which goes to a spam folder-- please send your email to del3 instead.
 
Reply With Quote
 
James Silverton
Guest
Posts: n/a
 
      17th Sep 2006
Hello, Jon!
You wrote on Sun, 17 Sep 2006 00:28:59 -0400:

JP> "The CORREL() function in many major spreadsheet packages,
JP> such as Microsoft Excel and Gnumeric calculates Pearsons
JP> correlation coefficient."

JP> Wolfram adds that:

JP> "The correlation coefficient is also known as the
JP> product-moment coefficient of correlation or Pearson's
JP> correlation."

JP> I wouldn't count on the Excel help files to be much help,
JP> especially about statistics.

It is interesting that the Help entries for PEARSON and CORREL
look confusingly different. Rather than analyse the equations, I
calculated PEARSON and CORREL for several sets of data with
identical numerical results :-)

James Silverton
Potomac, Maryland

E-mail, with obvious alterations:
not.jim.silverton.at.comcast.not

 
Reply With Quote
 
=?Utf-8?B?SmVycnkgVy4gTGV3aXM=?=
Guest
Posts: n/a
 
      18th Sep 2006
Correl is the better choice. In Excel 2003 and later Correl and Pearson are
identical. Prior to 2003, they are mathematically equivalent, but Peason is
numerically inferior.

Jerry

"Del Cotter" wrote:

> On Fri, 15 Sep 2006, in microsoft.public.excel.charting,
> Jon Peltier <(E-Mail Removed)> said:
>
> >In a cell in the worksheet, enter this formula
> >
> >=CORREL({y range},{x range})

>
> Shouldn't that be =PEARSON({y range},{x range})? I only have Excel 97,
> but I'm surprised to see that PEARSON() and CORREL() do not have a
> pointer to each other in the "See also" section of the help file.
>
> --
> Del Cotter
> NB Personal replies to this post will send email to (E-Mail Removed),
> which goes to a spam folder-- please send your email to del3 instead.

 
Reply With Quote
 
James Silverton
Guest
Posts: n/a
 
      18th Sep 2006

"Jerry W. Lewis" <post_a_reply@no_e-mail.com> wrote in message
news:282E2A68-3C55-4A2D-9959-(E-Mail Removed)...
> Correl is the better choice. In Excel 2003 and later Correl
> and Pearson are
> identical. Prior to 2003, they are mathematically equivalent,
> but Peason is
> numerically inferior.
>


Without disputing your analysis, since all my tests seem to
produce identical results with Excel 2002, can you point me to
details of why PEARSON is inferior? Perhaps, you might let me
have some data that would produce different answers.



--
James Silverton
Potomac, Maryland

 
Reply With Quote
 
James Silverton
Guest
Posts: n/a
 
      18th Sep 2006
Hello, James!
You wrote on Sun, 17 Sep 2006 23:52:37 -0400:


JS> "Jerry W. Lewis" <post_a_reply@no_e-mail.com> wrote in
JS> message
news:282E2A68-3C55-4A2D-9959-(E-Mail Removed)...
??>> Correl is the better choice. In Excel 2003 and later
??>> Correl and Pearson are identical. Prior to 2003, they are
??>> mathematically equivalent, but Peason is numerically
??>> inferior.
??>>
JS> Without disputing your analysis, since all my tests seem to
JS> produce identical results with Excel 2002, can you point me
JS> to details of why PEARSON is inferior? Perhaps, you might
JS> let me have some data that would produce different answers.

I'll just add that I checked my results again but I had to look
at the 14th or 15th decimal to get a numerical difference. I
suppose there must be data where the difference is more apparent
but I'd debate whether the differences of the coefficients have
any meaning for my data.


James Silverton
Potomac, Maryland

E-mail, with obvious alterations:
not.jim.silverton.at.comcast.not

 
Reply With Quote
 
=?Utf-8?B?SmVycnkgVy4gTGV3aXM=?=
Guest
Posts: n/a
 
      18th Sep 2006
The numerical problems with the pre-2003 Pearson algorithm are the same as
with the pre-2003 StDev, Rsq, Slope, etc. They have been discussed in the
statistical literature for over 40 years and in these newsgroups for over 10.
You might find
http://groups.google.com/group/micro...a03470e7a1c650
to be useful.

You will find a number of threads where people report Rsq<0 or Abs(Rsq)>1.
In those instances Pearson will show much worse numerical problems than your
simple tests have shown.

For a relatively simple example, put =$C$1 in A1:B1 and =$C$1+1 in A2:B2.
=CORREL(A1:A2,B1:B2) and =PEARSON(A1:A2,B1:B2) should both be 1 for any
numeric value in C1. However if C1 contains 1E8 then PEARSON will give
#DIV/0, and if C1 contains 1E12 then PEARSON will give -1.

Jerry

"James Silverton" wrote:

>
> "Jerry W. Lewis" <post_a_reply@no_e-mail.com> wrote in message
> news:282E2A68-3C55-4A2D-9959-(E-Mail Removed)...
> > Correl is the better choice. In Excel 2003 and later Correl
> > and Pearson are
> > identical. Prior to 2003, they are mathematically equivalent,
> > but Peason is
> > numerically inferior.
> >

>
> Without disputing your analysis, since all my tests seem to
> produce identical results with Excel 2002, can you point me to
> details of why PEARSON is inferior? Perhaps, you might let me
> have some data that would produce different answers.
>
>
>
> --
> James Silverton
> Potomac, Maryland
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Correlation-Coefficient daniel chen Microsoft Excel Misc 3 31st Jan 2006 08:59 AM
spearman correlation coefficient =?Utf-8?B?TWFyY2VsIExhYm9udMOp?= Microsoft Excel Misc 1 12th May 2005 05:00 AM
Correlation Coefficient Issue Diane Microsoft Excel Worksheet Functions 8 17th Dec 2004 04:48 AM
Correlation coefficient (r) Phil C Microsoft Excel Charting 3 14th Aug 2004 05:27 AM
Correlation coefficient for log plot.. Phil C Microsoft Excel Charting 2 6th Aug 2004 09:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:07 AM.