library("exams")
include_supplement("ml_anteilswert_sol.num", recursive=TRUE)
library("exams.forge")
instruction <- NULL
maxn <- 1000
repeat {
  n  <- sample(seq(5, maxn, 5),1)
  p  <- sample((1:20)/100, 1)
  x  <- n*c(p, 1-p)  
  if (all(has_digits(x, 0))) break
}
nx <- "der Unfälle"
lh <- sprintf("\\\\binom{%.0f}{%.0f}\\cdot p^%.0f \\cdot(1-p)^%.0f", n, x[1], x[1], x[2])
bcoeff <- lchoose(n, x[1])/log(10)
if (bcoeff>3) {
  bcp <- floor(bcoeff)
  bcm <- 10^(bcoeff-bcp)
  ll <- sprintf("\\log\\left(%.6f\\times 10^{%0.f}\\right)+ %.0f\\cdot\\log(p) + %.0f \\cdot\\log(1-p)", bcm, bcp, x[1], x[2])
} else 
  ll <- sprintf("\\log\\left(%.0f\\right)+ %.0f\\cdot\\log(p) + %.0f \\cdot\\log(1-p)", 10^bcoeff, x[1], x[2])
sc <- num_result(p, 4)

Question


Im Straßenverkehr kommt es immer wieder zu gefährlichen Situationen für Radfahrer. Mit einer Wahrscheinlichkeit $p$ kommt es tatsächlich zu einem Unfall. Die Verkehrslenkung Berlin hat eine Untersuchung in Auftrag gegeben, um diese Unfallwahrscheinlichkeit zu ermitteln. Das Forschungsinstitut hat bei r n gefährlichen Situationen r x[1] Unfälle beobachtet. Bestimmen Sie einen Schätzwert $\hat{p}$ für $p$ (mit Hilfe der untenstehenden Log-Likelihood-Funktion).

$$r ll$$


Meta-information

extype: num exsolution: r sc$fx[1] extol: r sc$tolerance exname: r knitr::current_input()



Try the exams.forge.data package in your browser

Any scripts or data that you put into this service are public.

exams.forge.data documentation built on Sept. 11, 2025, 9:09 a.m.