```{r, echo=FALSE}
library("exams")
library("exams.forge")
instruction <- NULL
library("knitr")
include_supplement("modus_klassiert.num", recursive=TRUE)
# required variables:
#  sc <- num_result(...)
#  exact, pos
repeat {
  breaks <- histbreaks(seq(1, 7, by=0.5), 4:6)
  f      <- ddiscrete(runif(length(breaks)-1))
  n      <- sample_size_freq(seq(10, 200, 10), f)
  #hw <- histwidth(1.5, 2.1, widths=0.05*(1:4))
  h  <- histdata(histx(breaks, n*f), breaks)
  if(unique_max(h$density) && (which.max(h$counts)!=which.max(h$density))) break
}
n  <- sum(h$counts)
m  <- cbind(h$lower, h$upper, h$counts)
colnames(m) <- c("Von ...", "Bis unter ...", "Häufigkeit")
rownames(m) <- sprintf("%.0f", 1:length(h$density))
fcb <- "%.2f"
hxy <- html_matrix_sk (m, fmt=c(fcb, fcb, "%.0f"), title="Klasse")
exact <- all(is_terminal(h$density))
sc    <- num_result (mcval(h, exact=exact), digits = 3, tolmult = 2)
```

Question
========

```{r, error=TRUE, child=instruction}
```

Eine Umfrage über den Bierkonsum Münchner Bürger ergab bei `r n` Personen folgende Daten (in Liter):

```{r, echo=FALSE, results='asis'}
cat(toHTMLorLatex(hxy))
```


```{r, child="modus_klassiert.num"}
```

Meta-information
================
extype: num
exsolution: `r sc$fx[1]`
extol: `r sc$tolerance`
exname: `r knitr::current_input()`
