Chi-Square Test Simulation

Chi-Square Test Simulation
Loading the math board and drawing, please wait…
2016-04-06 03:14
This example demonstrates the statistical process and distribution characteristics of the Chi-Square test. It involves core math concepts like probability & statistics, Chi-Square distribution, data simulation, and hypothesis testing. The construction uses GeoGebra commands and objects such as Shuffle, Take, CountIf, ChiSquaredTest, DotPlot, Point, Element for data generation and visualization. Suitable for high school and above mathematics and statistics education, helping to understand statistical inference methods.

GeoGebra Commands & Parameters

  1. Shuffle(list2) → list3
  2. Take(list3, 1, 54) → list4
  3. Take(list3, 55, 100) → list5
  4. CountIf(x ≟ "pepsi", list4) → C5
  5. CountIf(x ≟ "sprite", list4) → D5
  6. CountIf(x ≟ "coke", list5) → B6
  7. CountIf(x ≟ "pepsi", list5) → C6
  8. CountIf(x ≟ "sprite", list5) → D6
  9. CountIf(x ≟ "coke", list4) → B5
  10. ChiSquaredTest(matrix1) → list6
  11. DotPlot(data, true) → list7
  12. ChiSquaredTest(matrix2) → list8
  13. Point(a) → A
  14. Element(list6, 2) → D2

AI Drawing Prompt Reference

Create a statistical graphic simulating a chi-square test. Start with a shuffled list of 100 drink brand labels (coke, pepsi, sprite), then split it into two groups of 50 each. Count the frequency of each brand in both groups to form a 2x3 contingency table. Compute the chi-square test statistic from this table and display its value. Also, show a dot plot of the original data, with each dot representing a sample, colored by brand. Add a slider to adjust the significance level, and display the corresponding critical value, allowing visual comparison between the test statistic and the critical value.
The prompt above was compiled from the original drawing commands and is for reference only.