RosettaCodeData/Task/Diversity-prediction-theorem/Maxima/diversity-prediction-theorem.maxima
2026-04-30 12:34:36 -04:00

10 lines
409 B
Text

diversityprediction(obs, ests) := block(
sprint("True value:", obs), newline(),
apply(sprint, cons("Estimates:", ests)), newline(),
sprint("Average error:", mean((obs-ests)^2)), newline(),
sprint("Crowd error:", (obs-mean(ests))^2), newline(),
sprint("Prediction diversity:", mean((mean(ests)-ests)^2))
)$
diversityprediction(49, [48, 47, 51])$
diversityprediction(49, [48, 47, 51, 42])$