From Histograms to Frequency Polygons

From Histograms to Frequency Polygons
Loading the math board and drawing, please wait…
2013-10-02 08:52
In collections S2,3,5 Statistics
This example demonstrates how to draw a frequency polygon from a histogram and shows how the area enclosed by the frequency polygon relates to the total area of the histogram. Using GeoGebra commands such as Midpoint, Polygon, and PolyLine, it dynamically illustrates the transformation between histograms and frequency polygons in statistics, helping students understand data distribution visualization and statistical features such as the arithmetic mean. The applet allows learners to interactively explore how connecting the midpoints of the tops of histogram bars creates a frequency polygon, and how both representations preserve the same total area, reinforcing the connection between visual and numerical summaries of data. Students can manipulate the histogram and observe in real time how the corresponding frequency polygon adjusts, deepening their understanding of how frequency distributions are represented graphically and how key statistical measures are derived from these visualizations.

GeoGebra Commands & Parameters

  1. If(C2 - A2 > 0, C2 - A2 + A3 - C2, 5) → k
  2. Point(Ray[(10 * k, 0), (10 * k, 1)]) → Q10
  3. Point(Ray[(9 * k, 0), (9 * k, 1)]) → Q9
  4. Midpoint(Q10, Q9) → M9
  5. Point(Ray[(8 * k, 0), (8 * k, 1)]) → Q8
  6. Midpoint(Q8, Q9) → M8
  7. Point(Ray[(7 * k, 0), (7 * k, 1)]) → Q7
  8. Midpoint(Q8, Q7) → M7
  9. Point(Ray[(6 * k, 0), (6 * k, 1)]) → Q6
  10. Midpoint(Q6, Q7) → M6
  11. Point(Ray[(5 * k, 0), (5 * k, 1)]) → Q5
  12. Midpoint(Q6, Q5) → M5
  13. Point(Ray[(4 * k, 0), (4 * k, 1)]) → Q4
  14. Midpoint(Q4, Q5) → M4
  15. Point(Ray[(3 * k, 0), (3 * k, 1)]) → Q3
  16. Midpoint(Q3, Q4) → M3
  17. Point(Ray[(2 * k, 0), (2 * k, 1)]) → Q2
  18. Midpoint(Q2, Q3) → M2
  19. Point(Ray[(k, 0), (k, 1)]) → Q1
  20. Midpoint(Q1, Q2) → M1
  21. CountIf(x ≠ " ", list7) → n
  22. Polygon((unitx, 0.3), (unitx, -0.3), (2.5 * unitx, -0.3), (2.5 * unitx, 0.3)) → poly1, a, b, c, d
  23. PolyLine((unitx, 0), (1.5 * unitx, h), (2 * unitx, -h), (2.5 * unitx, 0)) → e
  24. Sequence(Segment[(xmin + xint2 * i, ymax), (xmin + xint2 * i, ymin)], i, 1, (xmax - xmin) / xint2) → list3
  25. Sequence(Segment[(xmin, ymin + yint2 * i), (xmax, ymin + yint2 * i)], i, 1, (ymax - ymin) / yint2) → list4
  26. Sequence(Sequence[Segment[(xint2 * (j - 1) + xint1 * i, ymax), (xint2 * (j - 1) + xint1 * i, ymin)], i, 1, 4], j, 1, ceil(xmax / xint2)) → list5
  27. Sequence(Sequence[Segment[(xmin, (j - 1) * yint2 + yint1 * i), (xmax, (j - 1) * yint2 + yint1 * i)], i, 1, 4], j, 1, ceil(ymax / yint2)) → list6
  28. Sequence(Segment[(k * i + 0.5 * k, 0), (k * i + 0.5 * k, (-h) / 2.5)], i, 1, n - 1) → list9
  29. Sequence(Segment[(k * i, 0), (k * i, (-h) / 2.5)], i, 1, n) → list8
  30. Textfield(text23) → inputBox2
  31. Textfield(text24) → inputBox4
  32. Textfield(xint1') → inputBox3
  33. Sequence(Polygon[((i - 0.5) * k, 0), ((i + 0.5) * k, 0), ((i + 0.5) * k, Element[list1, i]), ((i - 0.5) * k, Element[list1, i])], i, 1, n) → list2
  34. Segment(Q1, Q2) → l1
  35. Segment(Q2, Q3) → l2
  36. Segment(Q3, Q4) → l3
  37. Segment(Q4, Q5) → l4
  38. Segment(Q5, Q6) → l5
  39. Segment(Q6, Q7) → l6
  40. Segment(Q7, Q8) → l7
  41. Segment(Q8, Q9) → l8
  42. Segment(Q9, Q10) → l9
  43. Sequence(If[y(Element[list10, i]) > y(Element[list11, i - 1]), Rotate[Polygon[Element[list10, i], Element[list11, i - 1], Element[list10, i] - (0.5 * k, 0)], t, Element[list11, i - 1]], Polygon[Element[list10, i], Element[list10, i] - (0.5 * k, 0), Element[list10, i]]], i, 2, n) → list2_3
  44. Sequence(If[y(Element[list10, i]) < y(Element[list11, i]), Polygon[Element[list10, i], Element[list10, i] - (0, y(Element[list10, i])), Element[list10, i] - (-0.5 * k, y(Element[list10, i])), Element[list10, i] + (0.5 * k, 0)], Polygon[Element[list10, i], Element[list11, i], Element[list11, i] - (0, y(Element[list11, i])), Element[list10, i] - (0, y(Element[list10, i]))]], i, 1, n - 1) → list2_2
  45. Sequence(If[y(Element[list11, i]) < y(Element[list10, i + 1]), Polygon[Element[list11, i], Element[list10, i + 1], Element[list10, i + 1] - (0, y(Element[list10, i + 1])), Element[list11, i] - (0, y(Element[list11, i]))], Polygon[Element[list10, i + 1], Element[list10, i + 1] - (k / 2, 0), Element[list10, i + 1] - (k / 2, y(Element[list10, i + 1])), Element[list10, i + 1] - (0, y(Element[list10, i + 1]))]], i, 1, n) → list2_1
  46. Sequence(If[y(Element[list10, i]) > y(Element[list11, i]), Rotate[Polygon[Element[list10, i], Element[list11, i], Element[list10, i] + (0.5 * k, 0)], -t, Element[list11, i]], Polygon[Element[list10, i], Element[list10, i] + (0.5 * k, 0), Element[list10, i]]], i, 1, n - 1) → list2_4
  47. Polygon(Q1, Q1 - (0.5 * k, 0), Q1 - (0.5 * k, y(Q1)), (x(Q1), 0)) → poly2, q1, f, i, j
  48. Polygon(Element[list10, n], (x(Element[list10, n]), 0), (x(Element[list10, n]) + 0.5 * k, 0), Element[list10, n] + (0.5 * k, 0)) → poly3, l, m, p, q
  49. RotateText("Frequency", 90*°) → text12

AI Drawing Prompt Reference

Draw a histogram with uniform bar widths and heights determined by a data set. Place points at the midpoints of the top edges of each bar, then connect these points sequentially with straight line segments to form a frequency polygon. Below the histogram, add a horizontal reference line and some auxiliary segments to illustrate the relationship between the area enclosed by the frequency polygon and the total area of the histogram. Include coordinate axes, grid lines, and interactive input boxes for adjusting data or bar width, allowing the graph to update dynamically.
The prompt above was compiled from the original drawing commands and is for reference only.