[Thread Prev][Thread Next][Index]

Re: varaince and var_n jnl files



Hello Sudheer,
	I agree that there is something wrong in the way variance.jnl and
var_n.jnl combine in the demonstration link
	http://ferret.pmel.noaa.gov/Ferret/FAQ/analysis/correlations.html
The reported maximum correlation of "Maximum value: 1.0841" near the end
of the page is clear indication that something is wrong, and it is not
just roundoff error.
	The trouble lies in the use of var_n.jnl I think.  The purpose of
the n/n-1 factor is to get unbiased estimates of the variances and the
covariance.  But the correction factor should cancel when the correlation
coefficient is computed because it appears in both the numerator and the
denominator.  So in the demo, while it is correct that the covariance
value (and the p and q variances) should change before and after the use
of var_n.jnl, the value of "correl" should not have changed. I think that
some of the "masked" variables are not getting the n/n-1 correction.

	If I am right in this, if you want to compute and plot "correl"
you should do so without using var_n.jnl
!---------------------------------------------
SET DATA coads_climatology
LET p = sst[x=150:220,y=0:40]
LET q = airt[x=150:220,y=0:40]
go variance
stat correl
!...
 Maximum value: 0.9938  !!! That's more like it !!!
!---------------------------------------------
Then, if you were interested in reporting or plotting the unbiassed
variances or covariance, you could define the correction factor
yourself (12/11 = 1.090909 in this example) and apply it, skipping
var_n.jnl entirely.

Good luck,
Mick

|!!! Mick.Spillane@noaa.gov !!!|
|__Room 2070 Bldg#3 NOAA/PMEL__|
|____Phone_:_(206)526-6780_____|




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement