Using Mathematica/Wolfram-Cloud to simulate the rolling of a Die to compare to Chi-Square Distr.

Поделиться
HTML-код
  • Опубликовано: 10 окт 2024
  • In this video we look at using Mathematica/Wolfram-Cloud to simulate the rolling of a die. The number of sides of the die and the number of rolls in a sample are left as variables. For a given sample we calculate the chi-squared quantity -- we sum (X_i - M_i)^2/M_i for all i where X_i is the frequency (the number of times) that a value of i was rolled, and where M_i is the expected value (freq.) which for a regular die would be 1/6 of all the samples. The procedure is repeated many times, and we collect the chi-square values. We compare a PDF histogram of this result to the so-called Chi-Square Distribution with a parameter (degree of freedom) one less the the number of sides of the die. We did this for a six-sided die, a four-sided die and a twelve-sided die, and in each case the simulated chi-square distribution and the mathematical Chi-Square definition matched up well.

Комментарии • 1

  • @thomasblum9803
    @thomasblum9803  4 месяца назад

    www1.lasalle.edu/~blum/c152wks/DieSimulation.pdf