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.
pprodn2(x, rho)
pprodt2(x, rho, nu)
qprodt2(p, rho, nu, tol=1e-5, trace=0)
a numeric vector
a numeric vector of probabilities
a scalar value representing the correlation (or the matching term in the t case when correlation does not exists)
a positive scalar representing the degrees of freedom
the desired accuracy (convergence tolerance),
passed to function uniroot
integer number for controlling tracing information,
passed on to uniroot
a numeric vector
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).
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
# NOT RUN {
p <- pprodt2(-3:3, 0.5, 8)
qprodt2(p, 0.5, 8)
# }
Run the code above in your browser using DataLab