Wolfram Mathematica: Chi-Square Distribution and Chi-Square Test (die simulations)

Опубликовано: 31 Май 2024
на канале: Thomas Blum
71
1

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.


Смотрите видео Wolfram Mathematica: Chi-Square Distribution and Chi-Square Test (die simulations) онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Thomas Blum 31 Май 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 7 раз и оно понравилось людям.