Class Size Statistics

Class Size Statistics
Loading the math board and drawing, please wait…
2022-08-08 09:02
In collections Statistische Kenngrößen
This example demonstrates how to calculate arithmetic mean, mode, and median by counting students in different classes. It uses commands like If, Shuffle, Append, Textfield, Polygon, Remove, Element, Sequence. Suitable for 5-6th grade students to practice statistics and data analysis.

GeoGebra Commands & Parameters

  1. If(questionCount ≟ 1, 6, If[questionCount ≟ 2, 7, If[questionCount ≟ 3, 8, If[questionCount ≟ 4, 6, If[questionCount ≟ 5, 7]]]]) → classes
  2. Shuffle(Sequence[Random[15, 28], i, 1, 100]) → class3b, {20, 24, 19, 24, 25, 26, 22, 16, 19, 23, 21, 17, 24, 27, 26, 19, 24, 23, 22, 17, 24, 18, 16, 25, 16, 18, 22, 27, 24, 27, 20, 25, 21, 15, 25, 19, 23, 15, 17, 28, 26, 24, 23, 23, 16, 15, 23, 27, 26, 26, 19, 24, 15, 24, 27, 20, 22, 17, 16, 23, 19, 15, 19, 23, 22, 18, 24, 16, 23, 24, 16, 21, 28, 16, 26, 19, 26, 20, 19, 24, 19, 23, 21, 28, 22, 20, 21, 15, 20, 28, 28, 27, 21, 16, 16, 16, 23, 27, 18, 24}
  3. Shuffle(Sequence[Random[25, 28], i, 1, 100]) → class3a, {25, 26, 25, 25, 27, 28, 28, 25, 26, 26, 26, 25, 28, 28, 27, 28, 25, 28, 25, 28, 28, 26, 28, 25, 27, 26, 25, 25, 28, 26, 26, 26, 26, 27, 28, 26, 27, 25, 25, 27, 27, 25, 26, 28, 28, 25, 26, 26, 27, 25, 28, 25, 27, 27, 28, 26, 26, 28, 28, 27, 27, 26, 25, 26, 25, 26, 26, 27, 25, 25, 26, 27, 28, 27, 25, 26, 26, 25, 26, 26, 27, 26, 25, 26, 25, 26, 27, 27, 25, 25, 28, 28, 28, 26, 25, 27, 25, 26, 28, 25}
  4. Shuffle(Sequence[Random[15, 28], i, 1, 100]) → class2b, {25, 25, 23, 27, 15, 25, 21, 23, 28, 16, 27, 24, 23, 26, 17, 15, 17, 28, 26, 21, 18, 24, 22, 22, 20, 27, 25, 18, 16, 15, 17, 28, 23, 24, 19, 15, 26, 21, 17, 25, 26, 28, 18, 27, 23, 22, 15, 22, 21, 21, 28, 28, 17, 21, 19, 19, 19, 23, 22, 27, 16, 24, 24, 21, 22, 22, 18, 19, 23, 21, 21, 24, 19, 26, 25, 25, 27, 23, 21, 23, 26, 28, 21, 17, 19, 16, 20, 27, 17, 21, 24, 16, 15, 27, 21, 16, 28, 26, 19, 19}
  5. Shuffle(Sequence[Random[15, 28], i, 1, 100]) → class2a, {24, 21, 28, 21, 15, 27, 21, 22, 15, 18, 23, 17, 17, 23, 17, 16, 23, 18, 21, 24, 17, 19, 15, 22, 27, 22, 18, 16, 27, 22, 15, 22, 22, 16, 15, 27, 23, 21, 22, 23, 16, 22, 20, 22, 25, 16, 17, 20, 23, 25, 27, 24, 20, 23, 16, 24, 28, 16, 22, 16, 23, 15, 26, 28, 17, 16, 27, 21, 25, 23, 17, 26, 17, 19, 18, 25, 26, 24, 20, 25, 27, 16, 23, 24, 28, 26, 28, 27, 19, 19, 23, 15, 19, 27, 28, 15, 16, 19, 21, 25}
  6. Shuffle(Sequence[Random[15, 28], i, 1, 100]) → class1c, {22, 22, 20, 28, 15, 17, 25, 18, 21, 19, 20, 26, 24, 20, 26, 20, 15, 20, 16, 22, 15, 15, 20, 27, 26, 22, 26, 19, 21, 27, 27, 15, 25, 19, 24, 19, 19, 15, 23, 22, 21, 16, 22, 16, 25, 24, 25, 28, 16, 21, 25, 19, 25, 26, 18, 19, 18, 21, 15, 23, 27, 23, 20, 19, 24, 23, 26, 27, 24, 17, 17, 28, 24, 27, 28, 15, 21, 21, 15, 18, 26, 22, 23, 23, 26, 25, 22, 21, 20, 19, 23, 25, 28, 25, 22, 27, 21, 20, 21, 15}
  7. Shuffle(Sequence[Random[15, 28], i, 1, 100]) → class1a, {19, 26, 27, 26, 25, 23, 21, 16, 27, 25, 24, 24, 23, 22, 17, 24, 28, 20, 27, 19, 15, 27, 21, 28, 19, 22, 18, 20, 21, 19, 28, 22, 26, 21, 23, 16, 15, 24, 17, 23, 19, 20, 20, 25, 15, 28, 27, 25, 19, 20, 22, 25, 21, 25, 16, 28, 21, 28, 20, 24, 15, 19, 18, 24, 25, 27, 28, 25, 15, 16, 26, 23, 20, 18, 17, 28, 18, 18, 19, 24, 28, 23, 28, 22, 19, 24, 27, 16, 28, 15, 16, 24, 24, 15, 24, 23, 28, 21, 26, 15}
  8. If(questionCount ≟ 1, 0, If[questionCount ≟ 2, 0, If[questionCount ≟ 3, 11, If[questionCount ≟ 4, 0, If[questionCount ≟ 5, 0]]]]) → b3
  9. If(questionCount ≟ 1, 0, If[questionCount ≟ 2, 20, If[questionCount ≟ 3, 17, If[questionCount ≟ 4, 0, If[questionCount ≟ 5, 21]]]]) → a3
  10. If(questionCount ≟ 1, 24, If[questionCount ≟ 2, 27, If[questionCount ≟ 3, 31, If[questionCount ≟ 4, 26, If[questionCount ≟ 5, 27]]]]) → b2
  11. If(questionCount ≟ 1, 18, If[questionCount ≟ 2, 19, If[questionCount ≟ 3, 20, If[questionCount ≟ 4, 18, If[questionCount ≟ 5, 19]]]]) → a2
  12. If(questionCount ≟ 1, 21, If[questionCount ≟ 2, 22, If[questionCount ≟ 3, 27, If[questionCount ≟ 4, 25, If[questionCount ≟ 5, 21]]]]) → c1
  13. If(questionCount ≟ 1, 22, If[questionCount ≟ 2, 20, If[questionCount ≟ 3, 27, If[questionCount ≟ 4, 18, If[questionCount ≟ 5, 23]]]]) → a1
  14. Shuffle(Sequence[Random[15, 28], i, 1, 100]) → class1b, {22, 27, 24, 22, 15, 27, 20, 15, 22, 25, 27, 27, 28, 27, 25, 19, 21, 26, 25, 19, 27, 28, 16, 27, 28, 19, 17, 28, 17, 15, 17, 19, 25, 20, 24, 20, 27, 20, 22, 26, 18, 23, 21, 19, 27, 27, 21, 17, 22, 19, 19, 16, 28, 23, 21, 17, 26, 19, 26, 25, 16, 28, 16, 15, 26, 25, 24, 22, 20, 21, 16, 17, 24, 23, 26, 21, 21, 20, 18, 22, 18, 19, 24, 23, 23, 25, 20, 19, 20, 23, 25, 26, 19, 26, 26, 25, 23, 26, 20, 25}
  15. If(questionCount ≟ 1, 15, If[questionCount ≟ 2, 24, If[questionCount ≟ 3, 14, If[questionCount ≟ 4, 13, If[questionCount ≟ 5, 21]]]]) → b1
  16. Append(listArithmMiddle6cl, a3) → listArithmMiddle7cl
  17. Append(listArithmMiddle7cl, b3) → listArithmMiddle8cl
  18. If(classes ≟ 6, mean[listArithmMiddle6cl], If[classes ≟ 7, mean[listArithmMiddle7cl], If[classes ≟ 8, mean[listArithmMiddle8cl]]]) → mittelwert
  19. Textfield(aInput) → InputBox1
  20. Polygon(PtopLeftCornerFeedback, PtopRightCornerFeedback, PbottomRightCornerFeedback, PbottomLeftCornerFeedback) → rectangleCorrect, ptopleftcornerfeedback, ptoprightcornerfeedback, pbottomrightcornerfeedback, pbottomleftcornerfeedback
  21. Append(true, Sequence[If[class1a(i) ≟ class1a(i - 1), false, true], i, 2, 100]) → stayX
  22. Append(true, Sequence[If[class1b(i) ≟ class1b(i - 1), false, true], i, 2, 100]) → stayY
  23. Remove(Sequence[If[stayX(i), class1a(i), 0], i, 1, 100], Sequence[0, i, 1, 100]) → randomNosForXwithoutRepeat
  24. Remove(Sequence[If[stayY(i), class1b(i), 0], i, 1, 100], Sequence[0, i, 1, 100]) → randomNosForYwithoutRepeat
  25. Element(randomNosForXwithoutRepeat, Mod[questionCount, Length[randomNosForXwithoutRepeat]] + 1) → numXwithoutRepeat
  26. Element(randomNosForYwithoutRepeat, Mod[questionCount, Length[randomNosForYwithoutRepeat]] + 1) → numYwithoutRepeat
  27. Sequence(Polygon[(i, 7), (i + 2, 7), (i + 2, 8), (i, 8)], i, -5, -5) → l1
  28. Sequence(Polygon[(i, 6), (i + 2, 6), (i + 2, 7), (i, 7)], i, -5, -5) → l3
  29. Sequence(Polygon[(i, 5), (i + 2, 5), (i + 2, 6), (i, 6)], i, -5, -5) → l4
  30. Sequence(Polygon[(i, 4), (i + 2, 4), (i + 2, 5), (i, 5)], i, -5, -5) → l5
  31. Sequence(Polygon[(i, 3), (i + 2, 3), (i + 2, 4), (i, 4)], i, -5, -5) → l6
  32. Sequence(Polygon[(i, 2), (i + 2, 2), (i + 2, 3), (i, 3)], i, -5, -5) → l7
  33. Sequence(Polygon[(i, 1), (i + 2, 1), (i + 2, 2), (i, 2)], i, -5, -5) → l8
  34. Sequence(Polygon[(i, 0), (i + 2, 0), (i + 2, 1), (i, 1)], i, -5, -5) → l9
  35. Sequence(Polygon[(i, 7), (i + 3, 7), (i + 3, 8), (i, 8)], i, -3, -3) → l2
  36. Sequence(Polygon[(i, 6), (i + 3, 6), (i + 3, 7), (i, 7)], i, -3, -3) → l10
  37. Sequence(Polygon[(i, 5), (i + 3, 5), (i + 3, 6), (i, 6)], i, -3, -3) → l11
  38. Sequence(Polygon[(i, 4), (i + 3, 4), (i + 3, 5), (i, 5)], i, -3, -3) → l12
  39. Sequence(Polygon[(i, 3), (i + 3, 3), (i + 3, 4), (i, 4)], i, -3, -3) → l13
  40. Sequence(Polygon[(i, 2), (i + 3, 2), (i + 3, 3), (i, 3)], i, -3, -3) → l14
  41. Sequence(Polygon[(i, 1), (i + 3, 1), (i + 3, 2), (i, 2)], i, -3, -3) → l15
  42. Sequence(Polygon[(i, 0), (i + 3, 0), (i + 3, 1), (i, 1)], i, -3, -3) → l16
  43. Sequence((-4.3, i), i, 0.7, 6.7) → l17
  44. Sequence((-1.8, i), i, 0.7, 6.7) → l18
  45. Polygon(C, D, E, F) → q1, c, d, e, f_1

AI Drawing Prompt Reference

Create a bar chart showing class size statistics. Each class is represented by a rectangle of varying width, arranged vertically with aligned bottoms. The chart includes tick marks on the left for value reference. An input box is placed at the top for entering answers. Multiple rectangular areas display data for different classes. The layout is clear for comparing class sizes.
The prompt above was compiled from the original drawing commands and is for reference only.