|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metsci.glimpse.util.math.stat.BivariateGaussianDistributionUtils
public class BivariateGaussianDistributionUtils
This class contains a collection of static methods for dealing with Bivariate Gaussian distributions.
Constructor Summary | |
---|---|
BivariateGaussianDistributionUtils()
|
Method Summary | |
---|---|
static double[] |
fromUnitCovarianceEllipse(double semiMajorAxisLength,
double semiMinorAxisLength,
double orientation)
Given the parameters defining the unit covariance ellipse for a Bivariate Gaussian distribution centered about the origin, this method returns sigmaX = Sqrt[Var(X)], sigmaY = Sqrt[Var(Y)], and correlation = Cov(X,Y) / (sigmaX sigmaY) for this probability distribution. |
static void |
main(java.lang.String[] args)
|
static double[] |
toUnitCovarianceEllipse(double sigmaX,
double sigmaY,
double correlation)
Returns the parameters defining the unit covariance ellipse for a Bivariate Gaussian distribution centered about the origin with given sigmaX, sigmaY, and correlation. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BivariateGaussianDistributionUtils()
Method Detail |
---|
public static double[] toUnitCovarianceEllipse(double sigmaX, double sigmaY, double correlation)
Note: correlation must be <= 1 and >= -1.
Ref: Data Analysis for Scientists and Engineers, Stuart Meyer, 1975, p.288-290.
sigmaX
- X standard deviation = Sqrt[Var(X)]sigmaY
- Y standard deviation = Sqrt[Var(Y)]correlation
- correlation coefficient = Cov(X,Y) / (sigmaX sigmaY)
java.lang.IllegalArgumentException
- if correlation is outside valid domain.public static double[] fromUnitCovarianceEllipse(double semiMajorAxisLength, double semiMinorAxisLength, double orientation)
Note: Calculation is based on COV = Q' R Q where Q is rotation matrix {cos,sin;-sin, cos} for given orientation and R is diagonal matrix {semiMaj, 0; 0, semiMin} for axis lengths. With COV computed, we get sigmaX = Sqrt[COV(0,0)], sigmaY = Sqrt[COV(1,1)], and finally correlation = COV(0,1)/(sigmaX * sigmaY).
semiMajorAxisLength
- length of semi-major axis of 1-sigma covariance ellipsesemiMinorAxisLength
- length of semi-minor axis of 1-sigma covariance ellipseorientation
- orientation of covariance ellipse (azimuth of semi-major axis)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |