cont.jexp: Expected Value of Two Continuous Random Variables

View source: R/ch5-fn.R

cont.jexpR Documentation

Expected Value of Two Continuous Random Variables

Description

Joint pdf and Expected Value of Two Continuous Random Variables

Usage

cont.jexp(FUN, lo1 = -Inf, up1 = Inf, lo2 = -Inf, up2 = Inf,
  dig = 4, prt = "exp")

Arguments

FUN

Continuous joint probability density function

lo1

Lower limit of X, Default: -Inf

up1

Upper limit of X, Default: Inf

lo2

Lower limit of Y, Default: -Inf

up2

Upper limit of Y, Default: Inf

dig

Number of digits below the decimal point, Default: 4

prt

Option for detailed output in c("", "exp", "cov", "cor"), Default: ”

Value

list(Ex=E(X), Dx=D(X), Ey=E(Y), Dy=D(Y), Vxy=Cov(X,Y), Cxy=Corr(X,Y))

Examples

pdf = function(x, y) 0.5*(x+3*y)*(x>0 & x<1)*(y>0 & y<1)
cont.jexp(pdf, prt="cor")

adoocavo/Rstat_M1 documentation built on March 19, 2022, 3:34 a.m.