Step Through Histogram Construction

Step Through Histogram Construction
Loading the math board and drawing, please wait…
2014-03-20 00:42
This example demonstrates the step-by-step process of constructing a histogram. It involves core mathematical concepts like data binning, frequency counting, and adjusting sample size. GeoGebra commands and objects such as Mod, Sequence, Min, Max, If, Sort, CountIf, Append, Element, Segment, Text, VerticalText, GrHt, GrTp, GrBt, GrLf, classes, seed, ACDT, size, L0, L1, Mn1, MxX1, UB, LB, CWC4, CWC3, CWC2, CWC1, CW0, MxX2, FrqSq, MxFq1, VSc1, MxFq2, GrWd, RtEnd, LfEnd, FDRt, FDTp, FDLf, LCLSq2, TbCW, TbLf, TbTp, TbCH, DTp, DLf, DWd, TbBt, sz1 are used in the construction. Suitable for high school mathematics teaching or statistics courses.

GeoGebra Commands & Parameters

  1. Mod(seed, 3) → ACDT
  2. Sequence(RandomPoisson[seed], k, 1, size) → L0
  3. Sequence((Element[L0, k] * 10^((-ACDT))), k, 1, size) → L1
  4. Min(L1) → Mn1
  5. Max(L1) → MxX1
  6. If(CWC1 ≤ UB, CWC1, If[CWC2 ≤ UB, CWC2, If[CWC3 ≤ UB, CWC3, CWC4]]) → CW0
  7. Sequence(CountIf[i ≤ x < i + CW0, L1], i, Mn1, MxX2 - CW0, CW0) → FrqSq
  8. Max(FrqSq) → MxFq1
  9. Sequence(k, k, Mn1, Mn1 + ((classes - 1) * CW0), CW0) → LCLSq2
  10. Sequence(Element[L1, k], k, 1, sz1) → L2
  11. Sequence(Element[LCLSq2, k], k, 1, classes - 1) → LCLSq1
  12. Sequence(k, k, Mn1, MxX1, 10^((-ACDT))) → DtDm
  13. Sort(Intersection[DtDm, L1]) → DtRng
  14. CountIf(x < MxX1 + 1, DtRng) → RngCnt
  15. Max(Sequence[If[floor((10^(k) * CW0)) / 10^(k) ≠ CW0, k + 1, 0], k, 0, 2]) → ACCW
  16. Max(ACDT, ACCW) → ACNw
  17. Sequence(" to ", k, 1, classes) → ToSq
  18. Append(Mn1, LCLSq1) → LCLCnSq
  19. Element(LCLSq2, 2) → LCL2
  20. Sequence(Element[L1, k], k, sz1 + 1, size) → L3
  21. Segment(TbML, TbMR) → tbmd
  22. Segment(TbLL, TbLR) → tbbt
  23. Segment(TbMR, TbUR) → tbrt
  24. Sequence(CW1, k, 1, classes - 1) → CWSq1
  25. Append(" ", CWSq1) → CWSq2
  26. Sequence(UCL1 + (k * CW1), k, 0, classes - 1) → UCLSq
  27. Append(UCL1, UCLSq) → UCLCnSq
  28. Sequence(Sequence[" | ", k, 1, Element[FrqSq, j]], j, 1, classes) → TlySq
  29. Segment(TbUL, TbUR) → tbtp
  30. Sequence(Segment[(TbLf + (k * TbCW), TbBt), (TbLf + (k * TbCW), TbTp)], k, 0, floor(size / 2)) → TbVrtSq
  31. Text("The table shows the percent unemployed for " + size + " different cities.") → DD1
  32. Text("The table shows numbers of bird feeders sold in " + size + " different months.") → DD0
  33. Text("The table shows proportions of students who earned C's in " + size + " different classes.") → DD2
  34. Element(DDSq, ACDT + 1) → DD
  35. If(ACDT ≟ 1, ".", "s.") → PLP1
  36. If(ACCW ≟ 1, "", "s") → PLN2
  37. If(ACNw ≟ 1, ".", "s.") → PLP3
  38. If(ACNw ≟ 1, "", "s") → PLN3
  39. Sequence(Text[Element[LCLSq2, k], (FDLf, FDTp - (0.07 * k))], k, 1, classes) → LCLTxSq
  40. If(ACDT ≟ 1, "", "s") → PLN1
  41. Sequence(Text[Element[UCLSq, k], (FDLf + 8, FDTp - (FDRt * k))], k, 1, classes) → UCLTxSq
  42. Sequence(Text[Element[ToSq, k], (FDLf + 4.5, FDTp - (0.07 * k))], k, 1, classes) → ToTxSq
  43. Sequence(Text[Element[FrqSq, k], (FDLf + 15, FDTp - (FDRt * k))], k, 1, classes) → FrqTxSq
  44. Text("Construct a histogram with " + classes + " different classes.") → PrbStm
  45. Segment(GrUL, GrLL) → gvax
  46. Segment(GrLL, GrLR) → ghax
  47. Sequence(Text[(k * VSc1), (GrLf - 3, GrTp - GrHt - 0.025 + ((VSc1 * VSc2) * k))], k, 0, MxFq2 / VSc1) → VTcLb
  48. Sequence(k, k, Mn1, Mn1 + (classes * CW0), CW0) → LCLSq3
  49. Sequence(adp2(Element[LCLSq3, k]), k, 1, classes + 1) → BESq
  50. Sequence(Text[Element[LCLSq3, k], (Element[BESq, k] - 1.5, GrBt - 0.08)], k, 1, classes + 1) → HTcLb
  51. Sequence(Segment[(Element[BESq, k], GrBt), (Element[BESq, k], GrBt - 0.02)], k, 1, classes + 1) → HTcs
  52. Sequence(Segment[(GrLf - 0.5, GrBt + (k * VSc2)), (GrLf, GrBt + (k * VSc2))], k, 0, MxFq2) → VTcs
  53. Segment(GrLR, (GrLf + GrWd, GrBt + (Element[FrqSq, classes] * VSc2))) → grsd
  54. Sequence(Segment[(Element[BESq, k + 1], GrBt), (Element[BESq, k + 1], GrBt + (Max[Element[FrqSq, k], Element[FrqSq, k + 1]] * VSc2))], k, 1, classes - 1) → BrSdSq
  55. Sequence(Segment[(Element[BESq, k], adp3(Element[FrqSq, k])), (Element[BESq, k + 1], adp3(Element[FrqSq, k]))], k, 1, classes) → BrTpSq
  56. VerticalText("Frequency") → FrqAxLb
  57. Element(TtlSq, ACDT + 1) → GrTtl
  58. Sequence(Text[Element[L1, k], ((k * TbCW) + TbLf - 4.5, TbR1L)], k, 1, ceil(size / 2)) → DtRw1
  59. Sequence(Text[Element[L3, k], ((k * TbCW) + TbLf - 4.5, TbR2L)], k, 1, ceil(size / 2)) → DtRw2
  60. Text(Element[HLbSq, ACDT + 1], (41, -1.5)) → HAxLb

AI Drawing Prompt Reference

Create a histogram to show data distribution. First, determine the data range and number of classes, then calculate the frequency for each class. Mark class boundaries and centers on the x-axis, and display frequencies on the y-axis. Use bars to represent the frequency of each class, labeling classes and frequencies. Finally, add a title explaining the data source.
The prompt above was compiled from the original drawing commands and is for reference only.