A bivariate gaussian probability distribution. More...
#include <prob_dens_func.h>
For a two-dimensional gaussian, given a mean and a covariance matrix
the PDF is
(taken from the Wikipedia page on the "Multivariate normal distribution").
The function o2scl::prob_dens_mdim_biv_gaussian::contour() gives a point on the contour line for a fixed value of the PDF given an angle . In particular, it solves
for the radius and then stores the values
and
in the reference parameters named
x
and y
. Thus this function can be used to map out the full contour by selecting values for .
The function o2scl::prob_dens_mdim_biv_gaussian::level_fixed_integral() gives the value of the PDF for which the integral inside the corresponding contour is some fraction of the total integral (which is always 1). Given a fraction , the argument of the exponential is related to the inverse of the cumulative distribution function for the chi-squared probability distribution for two degrees of freedom for
. For a fraction
, the value
(i.e. the Mahalanobis distance) is
and then the value of the PDF for the corresponding contour is
.
Definition at line 836 of file prob_dens_func.h.
Public Member Functions | |
prob_dens_mdim_biv_gaussian (const prob_dens_mdim_biv_gaussian &pdmbg) | |
Copy constructor. | |
prob_dens_mdim_biv_gaussian & | operator= (const prob_dens_mdim_biv_gaussian &pdmbg) |
Copy constructor with operator=. | |
void | set (double x_cent, double y_cent, double x_std, double y_std, double covar) |
Set the properties of the distribution. More... | |
virtual double | pdf (const vec_t &v) const |
Compute the normalized probability density. | |
virtual double | level_fixed_integral (double integral) |
Return the contour level corresponding to a fixed integral. | |
virtual void | contour (double level, double theta, vec_t &x) |
Return a point on the contour for a specified level given an angle. | |
![]() | |
virtual size_t | dim () const |
Return the dimensionality. | |
virtual double | log_pdf (const vec_t &x) const |
The log of the normalized density. | |
virtual void | operator() (vec_t &x) const |
Sample the distribution. | |
Private Attributes | |
double | x0 |
The x coordinate of the centroid. | |
double | y0 |
The y coordinate of the centroid. | |
double | sig_x |
The x standard deviation. | |
double | sig_y |
The y standard deviation. | |
double | rho |
The covariance. | |
|
inline |
Definition at line 888 of file prob_dens_func.h.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).