Comparing basketball teams with contingency tables: exploring Simpson’s paradox

Comparing basketball teams with contingency tables: exploring Simpson’s paradox
Loading the math board and drawing, please wait…
2024-09-25 19:49
In collections Kreuztabellen
This GeoGebra example uses a basketball-team scenario (Team A vs. Team B) to prompt students to make a well-justified decision even when the data appear to contradict each other. It highlights Simpson’s paradox: trends can reverse when data are aggregated versus when they are analyzed within subgroups. The core math concepts are reading and interpreting cross tables (contingency tables/fourfold tables) and understanding how grouping and summarization affect conclusions and evidence-based reasoning. Construction and interaction (from the construction summary) rely on configurable inputs and choices (textfield/input objects and DropDown selections such as DropDown17/16/15/14/10), dynamic geometric/measure elements (Point, Distance), and structured output assembly (Join, Flatten). Mathematical notation is rendered with LaTeX, while conditional logic for flow and correctness feedback is handled with If (e.g., inputCorrect* objects). Suitable for grades 7–8 and classroom lessons on probability & statistics, data interpretation, and guided discussion tasks.

GeoGebra Commands & Parameters

  1. SelectedIndex(DropDown17) → input17
  2. SelectedIndex(DropDown16) → input16
  3. SelectedIndex(DropDown15) → input15
  4. Textfield(input14) → Eingabefeld14
  5. Textfield(input13) → Eingabefeld13
  6. Textfield(input12) → Eingabefeld12
  7. Textfield(input11) → Eingabefeld11
  8. SelectedIndex(DropDown10) → input10
  9. Textfield(input9) → Eingabefeld9
  10. Textfield(input8) → Eingabefeld8
  11. Textfield(input7) → Eingabefeld7
  12. Textfield(input6) → Eingabefeld6
  13. SelectedIndex(DropDown5) → input5
  14. Textfield(input4) → Eingabefeld4
  15. Textfield(input3) → Eingabefeld3
  16. Textfield(input2) → Eingabefeld2
  17. Textfield(input1) → Eingabefeld1
  18. Point(Line[A0, yAxis]) → Ay1
  19. Point(Line[A0, xAxis]) → Ax1
  20. Point(Line[Ax1, xAxis]) → Ax2
  21. Distance(Ax1, Ax2) → asizex
  22. Join({Zip[Segment[P, (x(Ax5), y(P))], P, {A0, Ay1, Ay2, Ay3, Ay4}], Zip[Segment[(x(P), y(Ay1)), (x(P), y(Ay4))], P, {A0, Ax1, Ax2, Ax3, Ax4, Ax5}], Zip[Segment[P, (x(P), y(Ay1))], P, {A0, Ax5}]}) → grid1
  23. LaTeX(step, true, true) → Text2
  24. Flatten(Sequence[Sequence[(x(Ax1), y(Ay2)) + (m * (asizex, 0)) + (j * (0, asizey)), m, 0, 3], j, 0, 1]) → listTablePoints1
  25. Point(Line[T3, xAxis]) → T4
  26. If(step < 6, seasonA, seasonB) → season
  27. Zip(Text[(("\textsf\small\bold{" * n) * "}"), P + (absx, absy), true, true], n, {"\textsf{}", (("\textsf\textcolor{6557d2}{" * nameA) * "}"), (("\textsf\textcolor{db6114}{" * nameB) * "\vphantom{g}}")}, m, Sequence[1, 3, 1], P, {Ay1, Ay2, Ay3}) → textTableY1
  28. Zip(Text[(("\textsf\small\bold{" * n) * "}"), P + (1.5 + absx, (1.96 * asizey)), true, true, -0, 1], n, {"\textsf{gewonnene Spiele}", "\textsf{verlorene Spiele}", "\textsf{Spiele insgesamt}", "\textsf{Gewinnquote in %}"}, m, Sequence[1, 4, 1], P, {Ax1, Ax2, Ax3, Ax4}) → textTableX1
  29. Zip(Text[(("\textsf{" * n) * "}"), P + (1.5 + absx, (0.9 * asizey)), true, true, 0, 1], n, {8, 31, 2, 19}, m, Sequence[1, 4, 1], P, Zip[listTablePoints1(k), k, {1, 5, 2, 6}]) → textTableNums1
  30. Zip(Text["\textsf{\%}", P + (2.2 + absx, (0.95 * asizey)), true, true, 0, 1], P, Zip[listTablePoints1(k), k, If[step ≟ 2, {4}, {4, 8}]]) → textTableProzent1
  31. Zip(Text[(("\textsf{" * n) * "}"), P + (1.5 + absx, (0.9 * asizey)), true, true, 0, 1], n, {18, 18, 27, 32}, m, Sequence[1, 4, 1], P, Zip[listTablePoints1(k), k, {1, 5, 2, 6}]) → textTableNums2
  32. Zip(Text[(("\textsf{" * n) * "}"), P + (1.5 + absx, (0.9 * asizey)), true, true, 0, 1], n, {26, 49, 19, 51, 55, 100}, m, Sequence[1, 6, 1], P, Zip[listTablePoints1(k), k, {1, 5, 2, 6, 3, 7}]) → textTableNums3
  33. Join({Sequence[Segment[Corner[4] + (RasterPixMat * ((k * RasterStepXY), 0)), Corner[4] + (RasterPixMat * ((k * RasterStepXY), RasterMaxY))], k, RasterMaxX / RasterStepXY, RasterMaxX / RasterStepXY], Sequence[Segment[Corner[4] + (RasterPixMat * (0, (k * RasterStepXY))), Corner[4] + (RasterPixMat * (RasterMaxX, (k * RasterStepXY)))], k, RasterMaxY / RasterStepXY, RasterMaxY / RasterStepXY]}) → RasterAussen
  34. Element({false, input1 ≟ sol1 ∧ (¬inputCorrect1) ∨ input2 ≟ sol2 ∧ (¬inputCorrect2), input3 ≟ sol3 ∧ (¬inputCorrect3) ∨ input4 ≟ sol4 ∧ (¬inputCorrect4), false, false, input6 ≟ sol6 ∧ (¬inputCorrect6) ∨ input7 ≟ sol7 ∧ (¬inputCorrect7), input8 ≟ sol8 ∧ (¬inputCorrect8) ∨ input9 ≟ sol9 ∧ (¬inputCorrect9), false, false, input11 ≟ sol11 ∧ (¬inputCorrect11) ∨ input12 ≟ sol12 ∧ (¬inputCorrect12), input13 ∈ sol13 ∧ (¬inputCorrect13) ∨ input14 ≟ sol14 ∧ (¬inputCorrect14), false, false, false}, step) → showhintBerechne

AI Drawing Prompt Reference

Create a basketball team comparison graph showing win/loss data and percentages for two teams under different conditions. Use dropdown menus and text fields to input data, generating a grid table with team names, games played, wins, losses, total games, and win rates. The table has two rows for the two teams and includes percentage labels. Different colors distinguish the teams' data. Draw coordinate axes below the table and label them.
The prompt above was compiled from the original drawing commands and is for reference only.