Learn R Programming

sn (version 2.0.0)

pprodt2: The distribution of the product of two jointly normal or t variables

Description

Consider the product \(W=X_1 X_2\) from a bivariate random variable \((X_1, X_2)\) having joint normal or Student's t distribution, with 0 location and unit scale parameters. Functions are provided for the distribution function of \(W\) in the normal and the t case, and the quantile function for the t case.

Usage

pprodn2(x, rho)
pprodt2(x, rho, nu)
qprodt2(p, rho, nu, tol=1e-5, trace=0)

Arguments

x

a numeric vector

p

a numeric vector of probabilities

rho

a scalar value representing the correlation (or the matching term in the t case when correlation does not exists)

nu

a positive scalar representing the degrees of freedom

tol

the desired accuracy (convergence tolerance), passed to function uniroot

trace

integer number for controlling tracing information, passed on to uniroot

Value

a numeric vector

Details

Function pprodt2 implements formulae in Theorem 1 of Wallgren (1980). Corresponding quantiles are obtained by qprodt2 by solving the pertaining non-linear equations with the aid of uniroot, one such equation for each element of p.

Function pprodn2 implements results for the central case in Theorem 1 of Aroian et al. (1978).

References

Aroian, L.A., Taneja, V.S, & Cornwell, L.W. (1978). Mathematical forms of the distribution of the product of two normal variables. Communications in statistics. Theory and methods, 7, 165-172

Wallgren, C. M. (1980). The distribution of the product of two correlated t variates. Journal of the American Statistical Association, 75, 996-1000

See Also

uniroot

Examples

Run this code
# NOT RUN {
p <-  pprodt2(-3:3, 0.5, 8)
qprodt2(p, 0.5, 8)
# }

Run the code above in your browser using DataLab