disc.cond2: Conditional PDF of Discrete Random Variables

View source: R/ch4-fn.R

disc.cond2R Documentation

Conditional PDF of Discrete Random Variables

Description

Conditional Probability Distribution of Discrete Random Variables

Usage

disc.cond2(tabXY, Xs, Ys, prt = TRUE, plot = FALSE, dig = 5,
  dig2 = 4)

Arguments

tabXY

Joint frequency table of two random variables

Xs

Conditioning value of X

Ys

Conditioning value of Y

prt

Print the marginal frequency and probability? Default: TRUE

plot

Plot the marginal PDF? Default: FALSE

dig

Number of digits below the decimal point in the console, Default: 5

dig2

Number of digits below the decimal point in the graph, Default: 4

Value

Conditional Frequency and PDF

Examples

fxy = with(mtcars, table(cyl, carb))
disc.cond2(fxy, Ys=1:4, plot=TRUE)

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