Comparing New and Old Mean and Median
Loading the math board and drawing, please wait…
This example dynamically demonstrates how to compare the mean and median of new and old data sets. Key mathematical concepts include the calculation of mean and median. GeoGebra commands used include Random, Sequence, Join, Median, If, Defined, LaTeX, Textfield, etc. Suitable for high school mathematics education and learning.
GeoGebra Commands & Parameters
Random(5, 9) → numvaluesSequence(Random[0, 20], i, 1, numvalues) → OrigListJoin({OrigList, {usernum}}) → NewListMedian(NewList) → newmedianMedian(OrigList) → origmedianIf(meandiff > mediandiff, 1, If[meandiff < mediandiff, 2, 3]) → ansDefined(usernum) → Step1CorrectLaTeX(If[ans ≟ 1, "mean changed more", If[ans ≟ 2, "median changed more", "mean and median changed by the same amount"]]) → AnsDispTextfield(usertext) → InputBox1Circle((0.5, 3.3), 0.15) → Circ1Circle((0.5, 2.8), 0.15) → Circ2Circle((0.5, 2.3), 0.15) → Circ3Polygon((0, 6.5), (2.5, 6.5), (2.5, 4.2), (0, 4.2)) → NewValBox, f, g, h, iLaTeX((((("\begin{tabular}{c}\text{new mean }= " * newmean) * "\qquad\text{new median}=") * newmedian) * "\end{tabular}")) → NewDispLaTeX(If[numvalues > 5, "," + (Element[OrigList, 6]), ""]) → d6LaTeX(If[numvalues > 6, "," + (Element[OrigList, 7]), ""]) → d7LaTeX(If[numvalues > 8, "," + (Element[OrigList, 9]), ""]) → d9LaTeX(If[numvalues > 7, "," + (Element[OrigList, 8]), ""]) → d8LaTeX(d1to5 + d6 + d7 + d8 + d9) → dOrigListLaTeX((((((("\begin{tabular}{c}\phantom{1000000000000000000000}\\\text{Original Data Set: }" * dOrigList) * "\\\text{mean}=") * origmean) * "\qquad \text{median=}") * origmedian) * "\end{tabular}")) → OrigDisp