disc.marg2: Marginal PDF of Two Discrete Random variables

View source: R/ch4-fn.R

disc.marg2R Documentation

Marginal PDF of Two Discrete Random variables

Description

Marginal PDF of Two Discrete Random variables

Usage

disc.marg2(tabXY, Xn, Yn, prt = TRUE, plot = FALSE, dig = 5,
  dig2 = 4)

Arguments

tabXY

Joint frequency table of two random variables

Xn

Name of the first random variable (default="X")

Yn

Name of the second random variable (default="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

Marginal Probabilities

Examples

fxy = with(mtcars, table(cyl, carb))
disc.marg2(fxy)
disc.marg2(fxy, "Cylinder", "Carbrator", prt=FALSE, plot=TRUE)

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