\( \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: Mittel, Median und Modus

GenerateIntegers() INTEGERS.length INTEGERS.join( ", " ) INTEGERS.join( " + " ) sortNumbers( INTEGERS ) SORTED_INTS.join( ", " ) DisplayMedian( SORTED_INTS ) mean( INTEGERS ) median( INTEGERS ) mode( INTEGERS )

Was ist das arithmetische Mittel der folgenden Zahlen?

\large INTEGER_LIST

MEAN

Um das arithmetische Mittel zu berechnen, müssen wir alle Zahlen addieren und dann durch die Anzahl der Zahlen teilen.

INTEGER_LIST_PLUS = sum(INTEGERS)

Es sind insgesamt INTEGERS_COUNT Zahlen.

Das arithmetische Mittel ist \displaystyle fractionSimplification( sum(INTEGERS), INTEGERS_COUNT ).

Was ist der Median der folgenden Zahlen?

\large INTEGER_LIST

MEDIAN

Als erstes ordnen wir die Zahlen:

SORTED_LIST

Da wir 2 mittlere Zahlen haben, ist der Median das arithmetische Mittel beider Zahlen!

Der Median ist die mittlere Zahl:

\large MEDIAN_LIST

Der Median ist \dfrac{SORTED_INTS[ SORTED_INTS.length / 2 - 1 ] + SORTED_INTS[ SORTED_INTS.length / 2 ]}{2}.

Daher ist der Median fractionReduce(2 * MEDIAN, 2).

Was ist der Modus der folgenden Zahlen?

\large INTEGER_LIST

MODE

Der Modus ist am häufigsten vorkommende Zahl.

Wir können die Zahlen in einem Histogramm darstellen, um zu sehen, wie häufig jede Zahl vorkommt.

var freq = {}; var maxFreq = 0; $.each(INTEGERS, function( index, number ) { var count = freq[ number ] = (freq[ number ] || 0) + 1; maxFreq = count > maxFreq ? count : maxFreq; }); init({ range: [ [-0.5, 10.5], [-1, ( maxFreq + 1.5 ) / 2] ] }); style({ stroke: "#666" }, function() { numberLine( 0, 10, 1 ); }); for ( var num in freq ) { for ( var i = 0, l = freq[ num ]; i < l; i++ ) { circle( [num, ( i + 1.5 ) / 2], 5/40, { stroke: "none", fill: "#6495ed" } ); } }

Die Zahl MODE kommt häufiger vor, als jede andere Zahl, daher ist MODE der Modus.