Constructing a Frequency Polygon from a Histogram

Constructing a Frequency Polygon from a Histogram
Loading the math board and drawing, please wait…
2012-06-11 12:12
In collections S2,3,5 Statistics
This mathematical applet demonstrates how to construct a frequency polygon from a histogram. Through dynamic geometric construction, it shows that the vertices of the frequency polygon are the midpoints of the top edges of the histogram's rectangles. It also visually verifies that the area under the frequency polygon equals the total area of the original histogram, helping students understand graphical representations of data distributions and their area-conservation properties. Users can interact with the applet by adjusting the class intervals and frequencies of the histogram using sliders or draggable elements. As they modify the histogram, the frequency polygon updates in real time, allowing learners to observe how changes in data affect the shape of both graphs. The applet highlights the correspondence between each rectangle's top edge midpoint and the corresponding vertex on the polygon, reinforcing the construction method step by step. The interactive visualization supports classroom instruction and independent exploration in introductory statistics courses. By manipulating the histogram and watching the frequency polygon transform accordingly, students develop an intuitive grasp of how frequency polygons summarize and represent the same distribution as a histogram while offering a smoother visual outline of the data. This dynamic approach makes abstract statistical concepts more accessible and engaging for learners at the secondary education level.

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

AI Drawing Prompt Reference

Create a single coordinate diagram showing a histogram together with a frequency polygon. Draw adjacent rectangles for the class intervals, using their top edges as the frequency-height carriers. For each rectangle, mark the midpoint of its top edge; then connect these midpoints in order to form the frequency polygon as a smooth polyline, adding the usual baseline endpoints so the polygon visually matches the histogram. Make the class width and rectangle heights adjustable so the rectangles and polygon update together. Visually stress the one-to-one correspondence between each rectangle’s top-edge midpoint and the corresponding vertex on the frequency polygon to support the idea of area conservation between the two representations.
The prompt above was compiled from the original drawing commands and is for reference only.