Practice with Contingency Tables and 2×2 Four-Field Tables: Randomized Questions
Loading the math board and drawing, please wait…
In collections
Kreuztabellen
This GeoGebra lesson demonstrates how to represent discrete data in contingency tables (cross-tabulations) and in 2×2 four-field tables, using an interactive workflow that generates multiple questions and provides immediate feedback. The key math concepts are the structure of contingency tables, the meaning of counts in a 2×2 four-field table, and data representation needed for later probability & statistics topics. Construction/implementation highlights: Text and Textfield elements build question prompts and user inputs (e.g., input22/input23/...); Sequence and a QuestionList manage randomized selection of questions (randomQuestions/randomQuestion); Join composes formatted question text (txtQuestion01–txtQuestion05); graphical components (e.g., PolyLine, rectangleFeedback) draw the table layout and feedback area; If statements compare user entries to expected results (correct22–correct44 aggregated into correct) and toggle validation controls; Table01–Table05 and AllTables switch between the various table states, while btnValidate plus attemptCount/correctCount track performance. Best suited for middle school grades (around 7–8) as guided practice for data representation in statistics.
GeoGebra Commands & Parameters
Element(randomQuestions, Mod[questionCount - 1, Length[randomQuestions]] + 1) → randomQuestionTextfield(input) → inputBoxSequence(Sequence[PosTable + (Sum[ListSpalte, k], (-Sum[ListZeile, m])), k, 0, 4], m, 0, 4) → TablePosMatTextfield(input22) → InputBox22Textfield(input23) → InputBox23Textfield(input24) → InputBox24Textfield(input32) → InputBox32Textfield(input33) → InputBox33Textfield(input34) → InputBox34Textfield(input42) → InputBox42Textfield(input43) → InputBox43Textfield(input44) → InputBox44Text((("\textsf{\bold{" * TableCapList12(randomQuestion)) * "\vphantom{g}}}"), Midpoint[TablePosMat(1, 2), TablePosMat(2, 2)], false, true, 1, 0) → TableCap12Text((("\textsf{\bold{" * TableCapList13(randomQuestion)) * "\vphantom{g}}}"), Midpoint[TablePosMat(1, 3), TablePosMat(2, 3)], false, true, 1, 0) → TableCap13Text("\textsf{\bold{Gesamt\vphantom{g}}}", Midpoint[TablePosMat(1, 4), TablePosMat(2, 4)], false, true, 1, 0) → TableCap14Text((("\textsf{\bold{" * TableCapList21(randomQuestion)) * "\phantom{g}}}"), Midpoint[TablePosMat(2, 1), TablePosMat(3, 1)], false, true, 1, 0) → TableCap21Text((("\textsf{\bold{" * TableCapList31(randomQuestion)) * "\phantom{g}}}"), Midpoint[TablePosMat(3, 1), TablePosMat(4, 1)], false, true, 1, 0) → TableCap31Text("\textsf{\bold{Gesamt\phantom{g}}}", Midpoint[TablePosMat(4, 1), TablePosMat(5, 1)], false, true, 1, 0) → TableCap41Join({Sequence[Segment[Corner[4] + (RasterPixMat * ((k * RasterStepXY), 0)), Corner[4] + (RasterPixMat * ((k * RasterStepXY), RasterMaxY))], k, 0, RasterMaxX / RasterStepXY], Sequence[Segment[Corner[4] + (RasterPixMat * (0, (k * RasterStepXY))), Corner[4] + (RasterPixMat * (RasterMaxX, (k * RasterStepXY)))], k, 0, RasterMaxY / RasterStepXY]}) → RasterStreckenJoin({Sequence[Text[UnicodeToLetter[65 + k], Midpoint[Corner[4] + (RasterPixMat * ((k * RasterStepXY), RasterMaxY)), Corner[4] + (RasterPixMat * (((k + 1) * RasterStepXY), RasterMaxY))], false, true, 0, -1], k, 0, RasterMaxX / RasterStepXY - 1], Sequence[Text[("" * k), Midpoint[Corner[4] + (RasterPixMat * (RasterMaxX, ((k - 1) * RasterStepXY))), Corner[4] + (RasterPixMat * (RasterMaxX, (k * RasterStepXY)))], false, true, 1, 0], k, 1, RasterMaxY / RasterStepXY]}) → RasterBeschriftungSequence(Sequence[Corner[4] + (RasterPixMat * ((k * RasterStepXY), (m * RasterStepXY))), k, 0, RasterMaxX / RasterStepXY], m, 0, RasterMaxY / RasterStepXY) → RasterPunkteTextfield(InputName) → InputBoxNamePolyLine(PosSB, Corner[txt001, 1] + (0.6, 0), Corner[txt001, 2] + (0.1, 0), Corner[txt001, 3] + (0.1, 0.1), Corner[txt001, 4] + (-0.1, 0.1), Corner[txt001, 1] + (-0.1, 0.5), PosSB) → sb001PolyLine(PosSB, Corner[txt002, 1] + (0.6, 0), Corner[txt002, 2] + (0.1, 0), Corner[txt002, 3] + (0.1, 0.1), Corner[txt002, 4] + (-0.1, 0.1), Corner[txt002, 1] + (-0.1, 0.5), PosSB) → sb002If(accept, (0, 10), (0.75, 4.25)) → PosMailText(txtQuestion, PosMail + (0, (-headerHeight) - 1.4), false, true, 1, -1) → MailTextText(txtGoal, PosMail + (0, (-headerHeight) - 1.4), false, true, 1, -1) → MailTextEndText(txtGoalAlt, PosMail + (0, (-headerHeight) - 1.4), false, true, 1, -1) → txtEndAlt
AI Drawing Prompt Reference
Draw a 2×2 four-field table with two categorical variables, with four input fields for the number of each category value. The table title and total label should change according to the randomly generated question. Draw a grid around the table with letter and number labels. Draw a text field for the user to input their answer and a text field to display the answer feedback.
The prompt above was compiled from the original drawing commands and is for reference only.