Histogram Construction Examples

Histogram Construction Examples
Loading the math board and drawing, please wait…
2015-08-13 02:54
This example demonstrates how to construct histograms from data, visually representing data distribution. Key math concepts include data binning, frequency statistics, and bar chart creation. GeoGebra commands and objects used are Element, Sequence, Min, Max, If, KeepIf, Sort, CountIf, Append, Segment, Sum, VerticalText. Suitable for high school mathematics teaching, particularly for introductory probability & statistics and data processing practice.

GeoGebra Commands & Parameters

  1. Element(AccSq, Data) → Acc
  2. Element(RtSq, Mod[Seed, 8] + 1) → Rate
  3. Sequence(Mod[(Rate * k) + Start, 20] + 1, k, 0, 19, 1) → OptSq
  4. Element(DtSq, Data) → Dt0
  5. Sequence(Element[Dt0, Element[OptSq, k]], k, 1, Size) → SmpSq
  6. Min(SmpSq) → DtMn
  7. Max(SmpSq) → DtMx
  8. If(C0 ≤ UB, C0, If[C1 ≤ UB, C1, If[C2 ≤ UB, C2, If[C3 ≤ UB, C3, C4]]]) → ClsWd
  9. Sequence(DtMn + (k * ClsWd), k, 0, NoCls - 1) → LCL
  10. Element(LCL, 2) → LCL2
  11. If(C0 ≤ UB, 0, If[C1 ≤ UB, 0, If[C2 ≤ UB, 1, If[C3 ≤ UB, 2, 3]]]) → CWAcc
  12. Max(Acc, CWAcc) → CnAcc
  13. Sequence(UCL1 + (ClsWd * k), k, 0, NoCls - 1) → UCL
  14. Sequence(CountIf[Element[LCL, k] ≤ x ≤ Element[UCL, k], SmpSq], k, 1, NoCls) → FrqSq
  15. Max(FrqSq) → MxFrq
  16. Sequence(TbTp - k, k, 0, 3) → TbLHSq
  17. Element(TbLHSq, 3) → TbLH2
  18. Element(TbLHSq, 1) → TbLH0
  19. Element(TbLHSq, 4) → TbLH3
  20. Element(TbLHSq, 2) → TbLH1
  21. Element(LCL, 1) → HAxMn
  22. Element(PlcSq, Data) → DP
  23. Sequence(k, k, 1, 19) → StrtSq
  24. KeepIf(floor(20 / x) ≠ 20 / x, StrtSq) → RlPrmSq
  25. Sequence(Element[SmpSq, k], k, 1, RwLn1) → DtRw1
  26. Sequence(Element[SmpSq, k], k, RwLn1 + 1, Size) → DtRw2
  27. Element(DDSq, Data) → DD0
  28. Sort(SmpSq) → SortSq
  29. CountIf(x > 0, RtSq) → RateNo
  30. Element(SclSq, Data) → Scale
  31. Element(TSSq, Data) → TS
  32. Sequence(If[k > 1, " + ", " "], k, 1, NoCls) → PlsSq
  33. Sequence(" = ", k, 1, NoCls) → EqlSq
  34. Sequence(DtMn + (k * ClsWd), k, 0, NoCls - 2) → LCLCn1
  35. Append(DtMn, LCLCn1) → LCLCn2
  36. Sequence(ClsWd, k, 1, NoCls - 1) → CWSq1
  37. Append(" ", CWSq1) → CWSq2
  38. Sequence(UCL1 + (ClsWd * k), k, 0, NoCls - 2) → UCLCn1
  39. Append(UCL1, UCLCn1) → UCLCn2
  40. Sequence("to", k, 1, NoCls) → ToSq
  41. Sequence(If[Element[FrqSq, j] > 0, Sequence["|", k, 1, Element[FrqSq, j]], {" "}], j, 1, NoCls) → Tly
  42. Element(LCL, 1) → LCL1
  43. Segment(TbML, TbLR) → tbmd
  44. Segment(TbLL, TbMR) → tbbt
  45. Segment(TbUL, TbUR) → tbtp
  46. Sum(FrqSq) → ChkSz
  47. CountIf(x ≠ (0, 0), Dt0) → DtCnt
  48. Sequence(Segment[(TbLf + (CllWd * k), TbLH0), (TbLf + (CllWd * k), TbLH2)], k, 0, RwLn2) → TbVLn
  49. If(Mod[Size, 2] ≟ 1, Segment[TbLR, TbUR], Segment[TbMR, TbUR]) → tbrg
  50. Segment(GLL, GLR) → hax
  51. Segment(GUL, GLL) → vax
  52. Sequence(Segment[(GL - 0.3, VAdp(k)), (GL, VAdp(k))], k, 0, VAxMx) → VTc
  53. Sequence(Segment[(HAdp(k), GB), (HAdp(k), VAdp(Max[Element[FrqSq, k], Element[FrqSq, k + 1]]))], k, 1, NoCls - 1) → BrSd
  54. Segment((GR, GB), (GR, VAdp(Element[FrqSq, NoCls]))) → rgsd
  55. Sequence(Segment[(HAdp(k - 1), VAdp(Element[FrqSq, k])), (HAdp(k), VAdp(Element[FrqSq, k]))], k, 1, NoCls) → BrTp
  56. Sequence(Text[DtMn + (k * ClsWd), (HAdp(k) - 0.3, GB - 0.9)], k, 0, NoCls) → HAxNmSq
  57. VerticalText("Frequency") → VAxTtl
  58. Element(TtlSq, Data) → Ttl
  59. Element(HALSq, Data) → HAL
  60. Sequence(Text[k, (GL - 1.4, VAdp(k) - 0.3)], k, 0, VAxMx, VScl) → VAxNmSq
  61. Sequence(Text[Element[LCL, k], (FDLf + 0.3, DLTp - (0.9 * k))], k, 1, NoCls) → LCLTxt2
  62. Sequence(Text[Element[FrqSq, k], (FDLf + 8.4, DLTp - (0.9 * k))], k, 1, NoCls) → FrqTxt
  63. Sequence(Text[Element[DtRw2, k], (TbLf - 2.2 + (k * CllWd), TbLH2 + 0.15)], k, 1, RwLn2) → TxtRw2
  64. Sequence(Text[Element[DtRw1, k], (TbLf - 2.2 + (k * CllWd), TbLH1 + 0.15)], k, 1, RwLn1) → TxtRw1
  65. Sequence(Text[Element[UCL, k], (FDLf + 3.9, DLTp - (0.9 * k))], k, 1, NoCls) → UCLTxt2
  66. Sequence(Text[Element[ToSq, k], (FDLf + 2.8, DLTp - (0.9 * k))], k, 1, NoCls) → ToTxt
  67. Sequence(Segment[(HAdp(k), GB), (HAdp(k), GB + 0.1)], k, 1, NoCls - 1) → HTc

AI Drawing Prompt Reference

Draw a histogram construction example. Start with a random sample dataset, compute its minimum and maximum, choose a suitable class width, and generate consecutive intervals with lower and upper bounds. Count frequencies in each interval and represent them as vertical bars whose heights match the counts. Also include a frequency distribution table with class ranges, frequency counts, and tally marks, framed by border lines. Show the overall data distribution and verify the total frequency.
The prompt above was compiled from the original drawing commands and is for reference only.