Creating Histograms from Popcorn Data

Creating Histograms from Popcorn Data
Loading the math board and drawing, please wait…
2022-12-05 22:41
This activity demonstrates how to create histograms from popcorn data. Key math concepts include data organization, frequency analysis, and histogram plotting. Construction involves using GeoGebra commands like Shuffle, Sort, CountIf, and Bar to organize data and draw histograms. Suitable for students in grades 6-8 for statistics practice.

GeoGebra Commands & Parameters

  1. Shuffle(Join[{Sequence[176, 224], Sequence[176, 224], Sequence[176, 224], Sequence[176, 224], Sequence[176, 224]}]) → randomList1, {196, 191, 222, 188, 179, 196, 176, 213, 216, 179, 210, 199, 203, 211, 214, 203, 194, 184, 199, 220, 185, 221, 177, 218, 221, 179, 197, 217, 189, 180, 223, 201, 177, 195, 220, 200, 213, 212, 178, 193, 218, 200, 191, 217, 216, 184, 207, 176, 220, 178, 181, 214, 196, 192, 210, 183, 215, 207, 210, 217, 176, 189, 219, 203, 213, 182, 206, 216, 222, 193, 206, 191, 194, 202, 197, 181, 176, 209, 214, 181, 223, 217, 187, 214, 196, 204, 191, 208, 201, 195, 220, 203, 194, 185, 197, 202, 222, 184, 212, 187, 186, 201, 207, 211, 189, 222, 223, 211, 188, 223, 206, 179, 208, 198, 197, 218, 200, 184, 221, 185, 209, 180, 198, 208, 195, 190, 221, 190, 213, 209, 205, 200, 219, 224, 204, 186, 220, 215, 205, 218, 202, 204, 204, 177, 180, 182, 195, 213, 223, 207, 192, 187, 218, 193, 208, 185, 202, 201, 205, 192, 210, 206, 188, 186, 219, 189, 199, 201, 183, 186, 212, 211, 177, 193, 215, 180, 187, 224, 188, 186, 204, 182, 187, 224, 198, 205, 217, 183, 219, 190, 178, 183, 196, 219, 200, 215, 185, 209, 192, 183, 191, 214, 178, 207, 178, 202, 193, 212, 177, 208, 224, 216, 221, 182, 179, 195, 216, 198, 199, 190, 192, 203, 222, 184, 194, 224, 181, 181, 176, 189, 206, 188, 182, 215, 210, 199, 212, 197, 180, 190, 205, 198, 211, 194, 209}
  2. Sort(Take[randomList1, 1 + (20 * Mod[countQuestion, 12]), 20 + (20 * Mod[countQuestion, 12])]) → data
  3. CountIf(x > 215, data) → ansBar5
  4. CountIf(x > 205 ∧ x ≤ 215, data) → ansBar4
  5. CountIf(x > 195 ∧ x ≤ 205, data) → ansBar3
  6. CountIf(x > 185 ∧ x ≤ 195, data) → ansBar2
  7. CountIf(x ≤ 185, data) → ansBar1
  8. If(showsolution, Max[{ansBar1, ansBar2, ansBar3, ansBar4, ansBar5}], Max[{input1, input2, input3, input4, input5}]) → highestBar
  9. Bar((4, 0), (5, ((tt * ansBar5) * heightUnit))) → barSln5
  10. Bar((3, 0), (4, ((tt * ansBar4) * heightUnit))) → barSln4
  11. Bar((2, 0), (3, ((tt * ansBar3) * heightUnit))) → barSln3
  12. Bar((1, 0), (2, ((tt * ansBar2) * heightUnit))) → barSln2
  13. Bar((0, 0), (1, ((tt * ansBar1) * heightUnit))) → barSln1
  14. CountIf(x ≥ 215, data) → ansBar5x
  15. CountIf(x ≥ 205 ∧ x < 215, data) → ansBar4x
  16. CountIf(x ≥ 195 ∧ x < 205, data) → ansBar3x
  17. CountIf(x ≥ 185 ∧ x < 195, data) → ansBar2x
  18. CountIf(x < 185, data) → ansBar1x
  19. Shuffle(Sequence[15]) → randomList2, {6, 3, 12, 9, 1, 10, 11, 7, 4, 15, 14, 8, 13, 2, 5}
  20. Element(randomList2, Mod[countQuestion, 15] + 1) → randomNum2
  21. Element(randomList1, Mod[countQuestion, 20] + 1) → randomNum1
  22. Textfield(input1) → InputBox1
  23. Textfield(input2) → InputBox2
  24. Polygon(Zip[PixelsToPoint[Corner[1], Corner[3], Corner[5], A], A, {(pixelsLeft, pixelsTop), (pixelsLeft, y(Corner[5]) - pixelsBottom), Corner[5] - (pixelsRight, pixelsBottom), (x(Corner[5]) - pixelsRight, pixelsTop)}]) → borderBox
  25. Textfield(input3) → InputBox3
  26. Textfield(input4) → InputBox4
  27. Textfield(input5) → InputBox5
  28. Bar((0, 0), (1, (input1 * heightUnit))) → barSt1
  29. Bar((1, 0), (2, (input2 * heightUnit))) → barSt2
  30. Bar((2, 0), (3, (input3 * heightUnit))) → barSt3
  31. Bar((3, 0), (4, (input4 * heightUnit))) → barSt4
  32. Bar((4, 0), (5, (input5 * heightUnit))) → barSt5
  33. PolyLine({(5.3, 0), (0, 0), (0, ((1.05 * highestBar) * heightUnit))}) → Axes
  34. Bar((0, 0), (1, (input1 * heightUnit))) → barSt1Border
  35. Bar((1, 0), (2, (input2 * heightUnit))) → barSt2Border
  36. Bar((2, 0), (3, (input3 * heightUnit))) → barSt3Border
  37. Bar((3, 0), (4, (input4 * heightUnit))) → barSt4Border
  38. Bar((4, 0), (5, (input5 * heightUnit))) → barSt5Border
  39. Sequence(Segment[(0, (n * heightUnit)), (5.3, (n * heightUnit))], n, 1, highestBar) → gridSt
  40. Sequence(Segment[(n, 0), (n, -2)], n, 0, 5) → ticksStH
  41. Sequence(Segment[(0, n), (-0.05, n)], n, heightUnit, (heightUnit * highestBar), heightUnit) → ticksStV
  42. VerticalText("Numbers of Bags") → LabelStV
  43. If(showsolution, -11, -6) → MinX
  44. If(showsolution, 5, 11.5) → MaxX
  45. Bar((0, 0), (1, ((tt * ansBar1) * heightUnit))) → barSln1Border
  46. Bar((1, 0), (2, ((tt * ansBar2) * heightUnit))) → barSln2Border
  47. Bar((2, 0), (3, ((tt * ansBar3) * heightUnit))) → barSln3Border
  48. Bar((3, 0), (4, ((tt * ansBar4) * heightUnit))) → barSln4Border
  49. Bar((4, 0), (5, ((tt * ansBar5) * heightUnit))) → barSln5Border
  50. Corner(5) → AppSize
  51. Zip(Text[A, B, true, true, 0], A, Sequence[175, 225, 10], B, Sequence[(n, -15), n, 0, 5]) → ticksLblStX
  52. Zip(Text[If[Mod[A, ticksLblStYStep] ≟ 0, ("" * A), ""], B, true, true, -1, 0], A, Sequence[1, highestBar], B, Sequence[(0, (n * heightUnit) + 1), n, 1, highestBar]) → ticksLblStY

AI Drawing Prompt Reference

Draw a histogram with five bars representing data intervals: x > 215, 205-215, 195-205, 185-195, and x ≤ 185. The bar heights are determined by statistical counts. Also draw five input boxes and a histogram using the input box values, along with axes, ticks, grid, and vertical text "Numbers of Bags".
The prompt above was compiled from the original drawing commands and is for reference only.