This video continues a series that uses Mathematica/Wolfram-Cloud to explore the Chi-Square Distribution and Chi-Square Test. The video demonstrates that Mathematica's PearsonChiSquareTest method is not what I thought. First, it works with raw data rather than frequencies; and second, given raw data its determination of the "degrees of freedom" differed from my expectation. Next we showed how to get the p-value from the CDF (cumulative distribution function) of the Chi-Square Distribution. We showed for our dice simulation that the average frequency of rolling a 1 scaled with N the number of samples -- and that the standard-deviation (spread) scaled as N^0.5. In fact, the variance (standard deviation squared) divided by the average frequency appeared to be (SIDE -1)/SIDE where SIDE is the number of sides of the die in the simulation. Finally we looked at a sample of samples -- generating a set of p-values. Since by design the frequencies should be uniformly distributed, we expect the null hypothesis to be true. In our sample of samples, the Chi-Square Test suggests that our null hypothesis might be rejected about 5% of the time.
Watch video Wolfram Mathematica: Chi-Square Distribution and Chi-Square Test (die simulations) online without registration, duration hours minute second in high quality. This video was added by user Thomas Blum 31 May 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 71 once and liked it 1 people.