cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
TriangleDJT
Level II

Correlation Coefficient Calculation

I'm trying to determine the correct way to caclulate the correlation value given in the table of correlations for a given DOE design (this is found in the color map when generating a DOE design). JMP support specialists have shared this formula with me, but I'm not sure it is matching. I'm attaching the small JMP file I'm examining as an example.

TriangleDJT_0-1684687316228.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
TriangleDJT
Level II

Re: Correlation Coefficient Calculation

All,

these responses were kind, thank you.

The correct formula is the following, as shared by a SAS trainer.

TriangleDJT_0-1687227690519.png

@Dan_Obermiller Indeed we use N-1, but the proper formula is in the image that hopefully you can see.

I'm attaching a JMP file to illustrate.

View solution in original post

7 REPLIES 7
MRB3855
Super User

Re: Correlation Coefficient Calculation

Hello, @TriangleDJT and welcome. That formula is correct...but it is only correct for the coded factors (with mean=0).  In general, the formula is Cov[X,Y]/(SD[X]*SD[Y]). Lot's of stuff out there, but this shows example calculations. 

https://www.mygreatlearning.com/blog/covariance-vs-correlation/

Re: Correlation Coefficient Calculation

Unfortunately, @MRB3855 , the link that you provide does not perform the calculations correctly and does not use the proper covariance formula.

 

The covariance formula is typically divided by n-1 rather than just n. The calculations are also incorrect as the last observation for (Y-Y bar) should be a -12, and the author just uses 12.

 

For the simple four observation example in the article, the correct correlation is 1. The covariance should be 26.67.

Dan Obermiller
MRB3855
Super User

Re: Correlation Coefficient Calculation

@Dan_Obermiller  thanks; I was trying to be helpful and didn't properly assess the source <sigh>. What could go wrong with a simple correlation calculation?!   Thanks again for the heads up, and hopefully @TriangleDJT  can still see what is going on.

Re: Correlation Coefficient Calculation

Remember that the correlations reported in the DOE platform are for the estimates of the model parameters (i.e., based on the model matrix used in the regression analysis), not for the data (i.e., the design matrix or runs).

TriangleDJT
Level II

Re: Correlation Coefficient Calculation

@Mark_Bailey How are the model estimates calculated? Would you be able to please share a small example file that has the formula embedded so I can view it?

 

I want to understand how the estimates are calculated and then see these estimates again alongside a script with the formula.

TriangleDJT
Level II

Re: Correlation Coefficient Calculation

All,

these responses were kind, thank you.

The correct formula is the following, as shared by a SAS trainer.

TriangleDJT_0-1687227690519.png

@Dan_Obermiller Indeed we use N-1, but the proper formula is in the image that hopefully you can see.

I'm attaching a JMP file to illustrate.

Re: Correlation Coefficient Calculation

@TriangleDJT , I am glad that you have your answer. I am sorry that I never went as far as to get the formula to you. I just knew the first one presented to you was not correct.

Dan Obermiller