Mean, Median, Mode: Tabulated Data with Unknown Frequency

Mean, Median, Mode: Tabulated Data with Unknown Frequency
Loading the math board and drawing, please wait…
2013-08-24 05:46
This GeoGebra example demonstrates a five-category frequency table in which one frequency is unknown, allowing users to adjust category values and frequencies and observe how mean, median, and mode change. It covers tabulated data, frequency, central tendency, weighted data, sorting, and statistical measures. The construction uses Sequence, RemoveUndefined, Insert, and Join to build category and frequency lists, TableText and Textfield/inputBox objects to display the table and inputs, and Mean, Median, Mode, Sum, and Vector commands to compute target statistics. Suitable for middle-school or high-school statistics lessons on data organization and measures of center.

GeoGebra Commands & Parameters

  1. Sequence(Cell[i + 1, 1], i, 1, B3) → ListCategoryValues
  2. Sequence(Cell[i + 1, 2], i, 1, B3) → ListFrequencyValuesFromCells
  3. RemoveUndefined(ListFrequencyValuesFromCells) → ListFrequencyValuesRemovedUndefined
  4. Insert(a, ListFrequencyValuesRemovedUndefined, B4) → ListFrequencyValueswithVariable
  5. Insert("a", ListFrequencyValuesRemovedUndefined, B4) → ListFrequencyValueswithText
  6. Join({ListCategoryTitle, ListCategoryValues}) → ListCategory
  7. Textfield(targetmode) → inputBox1
  8. Textfield(targetmedian) → inputBox2
  9. Textfield(targetmean) → inputBox3
  10. Median(Take[ListCategory, 2, 5], Take[ListFrequencyNum, 2, 5]) → medianvalue1
  11. Join({ListFrequencyTitle, ListFrequencyValueswithText}) → ListFrequencyVariableText
  12. TableText({ListCategory, ListFrequencyNum}, "c|_") → Table2Solution
  13. TableText({ListCategory, ListFrequencyVariableText}, "c|_") → Table1Problem
  14. Join({ListFrequencyTitle, ListFrequencyValueswithVariable}) → ListFrequencyVariableSearch
  15. TableText({ListCategory, ListFrequencyVariableSearch}, "c|_") → Table3HiddenSearch
  16. Sum(Take[ListFrequencyVariableSearch, 2]) → totalfrequency
  17. Median(Take[ListCategory, 2, numberofcategories + 1], Take[ListFrequencyVariableSearch, 2, numberofcategories + 1]) → medianvaluesearch
  18. Sequence(If[i < numberofcategories, "+", ""], i, 1, numberofcategories) → ListAddSign
  19. Sequence(Element[ListCategoryValues, i] + "×" + (Element[ListFrequencyValueswithVariable, i] + Element[ListAddSign, i]), i, 1, numberofcategories) → CategoryFrequencyProductList
  20. Sequence(Element[MatrixAllSortedSearch, 1, i], i, 1, totalfrequency) → ListAllSortedSearch
  21. Sequence(Polygon[(i - 1, 0), (i, 0), (i, Element[ListAllSortedSearch, i]), (i - 1, Element[ListAllSortedSearch, i])], i, 1, totalfrequency) → DataVisualBar
  22. Sequence(Text[Element[ListAllSortedSearch, i], (i - 1, Element[ListAllSortedSearch * 1.1, i])], i, 1, totalfrequency) → DataVisualText
  23. Mean(Take[ListCategory, 2, numberofcategories + 1], Take[ListFrequencyVariableSearch, 2, numberofcategories + 1]) → meanvaluesearch
  24. Mode(ListAllSortedSearch) → modesearch
  25. Vector(((2 * medianposition - 1) / 2, Element[ListAllSortedSearch, totalfrequency]), ((2 * medianposition - 1) / 2, Max[Element[ListAllSortedSearch, totalfrequency] * 0.5, Element[ListAllSortedSearch, medianposition] * 1.2])) → medianpositionpointer
  26. Sum(CategoryFrequencyProductList) → TextSumCategoryFrequency

AI Drawing Prompt Reference

Create a frequency table with five categories, one of which has an unknown frequency. Users can adjust the category values and frequencies to observe changes in mean, median, and mode. Draw a bar chart to represent the frequency data and indicate the median position on the chart. Finally, calculate and display the mean, median, and mode.
The prompt above was compiled from the original drawing commands and is for reference only.