# fourfold: Fourfold Table

Exercise template for computing joint probabilities from a 2x2 table based on three randomly-drawn conditional or marginal probabilities.

Name:
fourfold
Description:
Computing all four joint probabilities (in percent) in a fourfold table based on two randomly-generated conditional probabilities and one marginal probability. The exercise is a cloze with four numeric answers presented in a list.
Solution feedback:
Yes
Randomization:
Random numbers
Mathematical notation:
Yes
Verbatim R input/output:
No
Images:
No
Other supplements:
No
Raw: (1 random version)
PDF:
HTML:

(Note that the HTML output contains mathematical equations in MathML, rendered by MathJax using ‘mathjax = TRUE’. Instead it is also possible to use ‘converter = “pandoc-mathjax”’ so that LaTeX equations are rendered by MathJax directly.)

Demo code:

library("exams")

set.seed(403)
exams2html("fourfold.Rmd", mathjax = TRUE)
set.seed(403)
exams2pdf("fourfold.Rmd")

set.seed(403)
exams2html("fourfold.Rnw", mathjax = TRUE)
set.seed(403)
exams2pdf("fourfold.Rnw")