Dear Users,
i have two 1-dimensional data sets either on different or the same axes. They have the same number of points and they are saved in one file.
1> szabop/ELTE-kozos/REMO_change.nc (default)
name title I J K L
T2 T1[X=1:224] 1:224 ... ... ...
P2 P1[Y=1:224] ... 1:224 ... ...
2> szabop/ELTE-kozos/REMO_changediff.nc (default)
name title I J K L
T2 T1[X=1:224] 1:224 ... ... ...
P2 P1[X=1:224] 1:224 ... ... ...
The T2 ranges from 2 to 2.5, while the P2 from -10 to 10 (in units).
I could easily plot/vs them, but my goal is to have something like that applying the bivariate normal distribution:
(Dots then) concentric circles (as an overlay).
The bivariate normal distribution has this density function (named bivar):
let xvar = (t2 - t2[x=@ave]) / t2[x=@var]
let yvar = (p2 - p2[x=@ave]) / p2[x=@var]
let bivar = (1 / (2 * 3.14 * ((1 - c^2)^0.5) * p2[x=@var] * t2[x=@var])) * exp (-1 * (xvar^2 + yvar^2 - 2 * c * xvar * yvar) / (2 - 2 * c^2))
[[I could add this question as well:
Why do not they "have" correlation after performing this?
let p = t2
let q = p2
go variance
So i chose a constant value for correlation (named c in the above equation): let c = 0.4.]]
However hard i try to contour the bivar, i never get the correct circles: 1. using D=1 i get a messy picture 2. using D=2 i cannot even contour the plots as the bivar is 1-dimensional. Should i attach something as well?
Many thanks for any help,
Peter Szabo
Attachment:
gmdistribution_fit2.gif
Description: GIF image