disc.cond2 | R Documentation |
Conditional Probability Distribution of Discrete Random Variables
disc.cond2(tabXY, Xs, Ys, prt = TRUE, plot = FALSE, dig = 5, dig2 = 4)
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 |
Conditional Frequency and PDF
fxy = with(mtcars, table(cyl, carb)) disc.cond2(fxy, Ys=1:4, plot=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.