disc.ind2: Independence of Two Discrete Random Variables

View source: R/ch4-fn.R

disc.ind2R Documentation

Independence of Two Discrete Random Variables

Description

Determine Independence of Two Discrete Random Variables

Usage

disc.ind2(X, Y, prt = TRUE)

Arguments

X

Sample space vector of X

Y

Sample space vector of Y

prt

Print detailed output? Default: TRUE

Value

Joint PDF

Examples

S = rolldie2(4)
sum3 = function(x) sum(x>=3)
X = apply(S, 1, sum3)
even = function(x) sum(x %% 2 ==0)
Y = apply(S,1, even)
disc.ind2(X, Y)

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