dnormratio: Density Function of a Normal Ratio Distribution

dnormratioR Documentation

Density Function of a Normal Ratio Distribution

Description

Density of the ratio of two independent Gaussian distributions.

Usage

dnormratio(z, bet, rho, delta)

Arguments

z

length p numeric vector.

bet, rho, delta

numeric values. The parameters (\beta, \rho, \delta_y) of the distribution, see Details.

Details

Let two independant random variables X \sim N(\mu_x, \sigma_x) and Y \sim N(\mu_y, \sigma_y).

If we denote \beta = \frac{\mu_x}{\mu_y}, \displaystyle{\rho = \frac{\sigma_y}{\sigma_x}} and \displaystyle{\delta_y = \frac{\sigma_y}{\mu_y}}, the probability distribution function of the ratio \displaystyle{Z = \frac{X}{Y}} is given by:

\displaystyle{ f_Z(z; \beta, \rho, \delta_y) = \frac{\rho}{\pi (1 + \rho^2 z^2)} \left[ \exp{\left(-\frac{\rho^2 \beta^2 + 1}{2\delta_y^2}\right)} + \sqrt{\frac{\pi}{2}} \ q \ \text{erf}\left(\frac{q}{\sqrt{2}}\right) \exp\left(-\frac{\rho^2 (z-\beta)^2}{2 \delta_y^2 (1 + \rho^2 z^2)}\right) \right] }

with \displaystyle{ q = \frac{1 + \beta \rho^2 z}{\delta_y \sqrt{1 + \rho^2 z^2}} } and \displaystyle{ \text{erf}\left(\frac{q}{\sqrt{2}}\right) = \frac{2}{\sqrt{\pi}} \int_0^{\frac{q}{\sqrt{2}}}{\exp{(-t^2)}\ dt} }

Another expression of this density, used by the estparnormratio() function, is:

\displaystyle{ f_Z(z; \beta, \rho, \delta_y) = \frac{\rho}{\pi (1 + \rho^2 z^2)} \ \exp{\left(-\frac{\rho^2 \beta^2 + 1}{2\delta_y^2}\right)} \ {}_1 F_1\left( 1, \frac{1}{2}; \frac{1}{2 \delta_y^2} \frac{(1 + \beta \rho^2 z)^2}{1 + \rho^2 z^2} \right) }

where _1 F_1\left(a, b; x\right) is the confluent hypergeometric function (Kummer's function):

\displaystyle{ _1 F_1\left(a, b; x\right) = \sum_{n = 0}^{+\infty}{ \frac{ (a)_n }{ (b)_n } \frac{x^n}{n!} } }

Value

Numeric: the value of density.

Author(s)

Pierre Santagostini, Angélina El Ghaziri, Nizar Bouhlel

References

El Ghaziri, A., Bouhlel, N., Sapoukhina, N., Rousseau, D., On the importance of non-Gaussianity in chlorophyll fluorescence imaging. Remote Sensing 15(2), 528 (2023). \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3390/rs15020528")}

Marsaglia, G. 2006. Ratios of Normal Variables. Journal of Statistical Software 16. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v016.i04")}

Díaz-Francés, E., Rubio, F.J., On the existence of a normal approximation to the distribution of the ratio of two independent normal random variables. Stat Papers 54, 309–323 (2013). \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s00362-012-0429-2")}

See Also

pnormratio(): probability distribution function.

rnormratio(): sample simulation.

estparnormratio(): parameter estimation.

Examples

# First example
beta1 <- 0.15
rho1 <- 5.75
delta1 <- 0.22
dnormratio(0, bet = beta1, rho = rho1, delta = delta1)
dnormratio(0.5, bet = beta1, rho = rho1, delta = delta1)
curve(dnormratio(x, bet = beta1, rho = rho1, delta = delta1), from = -0.1, to = 0.7)

# Second example
beta2 <- 2
rho2 <- 2
delta2 <- 2
dnormratio(0, bet = beta2, rho = rho2, delta = delta2)
dnormratio(0.5, bet = beta2, rho = rho2, delta = delta2)
curve(dnormratio(x, bet = beta2, rho = rho2, delta = delta2), from = -0.1, to = 0.7)


gaussratiovegind documentation built on June 16, 2025, 5:09 p.m.