\( \newcommand{\br}[1]{\left( #1\right)} \newcommand{\logpar}[1]{\log\left( #1\right)} \newcommand{\cospar}[1]{\cos\left( #1\right)} \newcommand{\sinpar}[1]{\sin\left( #1\right)} \newcommand{\tanpar}[1]{\tan\left( #1\right)} \newcommand{\arcsinpar}[1]{\sin^{-1}\!\left( #1\right)} \newcommand{\arccospar}[1]{\cos^{-1}\!\left( #1\right)} \newcommand{\arctanpar}[1]{\tan^{-1}\!\left( #1\right)} \newcommand{\asin}[1]{\sin^{-1}\! #1} \newcommand{\acos}[1]{\cos^{-1}\! #1} \newcommand{\atan}[1]{\tan^{-1}\! #1} \newcommand{\asinh}[1]{\sinh^{-1}\! #1} \newcommand{\acosh}[1]{\cosh^{-1}\! #1} \newcommand{\atanh}[1]{\tanh^{-1}\! #1} \newcommand{\logten}[1]{\log_{10}\! #1} \definecolor{explaination}{RGB}{0, 166, 226} \newcommand{\ubrace}[2][u]{ { \color{explaination}{\underbrace{ {\color{black}{#2}} }_{#1}} } } \newcommand{\obrace}[2][u]{ { \color{explaination}{\overbrace{ {\color{black}{#2}} }^{#1}} } } \definecolor{highlight}{RGB}{181, 41, 118} \newcommand{\xplain}[1]{{ \textcolor{explaination} { \footnotesize{ #1 \newline}}}} \newcommand{\hilite}[1]{{ \textcolor{highlight} { { #1 }}}} \definecolor{lightergray}{gray}{.675} \newcommand{\hide}[1]{{ \textcolor{lightergray} { \footnotesize{ #1 \newline}}}} \newcommand{\mth}[1]{ { \textcolor{black} { { \small #1 } } } } \)

Übung: Lageparameter: Mittelwert und Median

-7 -1 * LOWER_BOUND random() < 0.8 ? 10 : 5 roundTo(1, randRangeNonZero((LOWER_BOUND + 1) * 2, (UPPER_BOUND - 1) * 2) / 2) ((POINTS / 2) * (MEDIAN + 0.5) + MEDIAN - 0.5 + (POINTS / 2 - 1) * LOWER_BOUND) / POINTS ((POINTS / 2) * (MEDIAN - 0.5) + MEDIAN + 0.5 + (POINTS / 2 - 1) * UPPER_BOUND) / POINTS roundTo(1, randRangeNonZero(MIN_MEAN * 10, MAX_MEAN * 10) / 10)

Platziere die POINTS orangefarbenen Punkte auf dem Zahlenstrahl so, dass das arithmetische Mittel \blue{localeToFixed(MEAN,1)} ist und der Median \green{localeToFixed(MEDIAN,1)}. Der Abstand zwischen jedem Intervall auf dem Zahlenstrahl ist 1.

graph.targetMedian = MEDIAN; graph.targetMean = MEAN; graph.numPoints = POINTS; init({ range: [ [LOWER_BOUND - 0.3, UPPER_BOUND + 0.2], [-3, 3]], scale: 35 }); style({ stroke: "#bbb" }); line([LOWER_BOUND, 0], [UPPER_BOUND, 0]); for (var x = LOWER_BOUND; x <= UPPER_BOUND; x++) { line([x, -0.2], [x, 0.2]); } style({ strokeWidth: 3.5 }); line([0, -0.2], [0, 0.2]); label([0, -0.53], "0", "center", {}); style({ strokeWidth: 2, stroke: BLUE, fill: BLUE, opacity: 1.0 }); graph.meanArrow = path([ [0, 0.7], [0.05, 0.7], [0, 0.6], [-0.05, 0.7], [0, 0.7], [0, 1.0] ]); graph.meanLabel = label([0, 1.3], "\\text{" + $._("Mittel") + "}", "above", { color: BLUE }); graph.meanValueLabel = label([0, 0.8], "0", "above", { color: BLUE }); style({ strokeWidth: 2, stroke: GREEN, fill: GREEN }); graph.medianArrow = path([ [0, -1.1], [0.05, -1.1], [0, -1], [-0.05, -1.1], [0, -1.1], [0, -1.4] ]); graph.medianLabel = label([0, -1.7], "\\text{" + $._("Median") + "}", "below", { color: GREEN }); graph.medianValueLabel = label([0, -1.2], "0", "below", { color: GREEN }); addMouseLayer(); graph.points = []; for (var x = 0; x < POINTS; x++) { graph.points[x] = addMovablePoint({ coord: [x - POINTS / 2 + 0.5, 0], constraints: { constrainY: true }, snapX: 0.5 }); } graph.median = 0; graph.mean = 0; graph.moved = false; $.each(graph.points, function(idx, point) { this.onMove = function(x, y) { graph.moved = true; return onMovePoint(point, x, y, updateMeanAndMedian); }; });
Wenn die orangefarbenen Punkte verschoben werden, verändern sich auch Mittel und Median.
$.map(graph.points, function(el) { return el.coord[0]; })
if (roundTo(1, mean(guess)) === MEAN && roundTo(1, median(guess)) === MEDIAN) { return true; } else if (graph.moved) { return false; } else { return ""; }
$.each(guess, function(i, x) { onMovePoint(graph.points[i], x, 0); }); updateMeanAndMedian();
irgendeine Anordnung der orangefarbenen Punkte, sodass Mittel und Median korrekt sind.

Der Median ist die Mittlere Zahl. Das heißt, dass der Median die Punkte in zwei Teile teilt, die jeweils aus der selben Anzahl an Punkten besteht. Ist sind daher genauso viele Punkte links vom Median wie zu dessen rechter Seite.

Versuche die Punkte so zu ziehen, dass die Hälfte von ihnen links von \green{localeToFixed(MEDIAN,1)} sind, und die andere Hälfte rechts von \green{localeToFixed(MEDIAN,1)}. Die beiden Punkte in der Mitte sollten denselben Abstand zu \green{localeToFixed(MEDIAN,1)} haben. Der Punkt in der Mitte sollte bei \green{localeToFixed(MEDIAN,1)} liegen.

Solange genauso viele Punkte links wie rechts vom Median sind, wird er sich nicht verändern. Aber das arithmetische Mittel wird mit der Wert jedes Punktes berechnet. Versuche die Punkte auf einer der beiden Seiten des Medians zu verschiebe, und schau, wie sich der Mittelwert verändert.

Es gibt verschiedene Arten, auf welche die Punkte angeordnet werden können, damit das arithmetische Mittel \blue{localeToFixed(MEAN,1)} ist und der Median \green{MEDIAN}.