Chi-square

The Chi-square test is used to compare the differences between categorical data.

My Note from Datacamp subscription -

















เหมือนกับว่าเรามีค่า observatory data มาแล้ว และมันจะคำนวนหาค่า expected data มาให้ โดยค่าที่เป็น expected data จะเป็นค่าที่ ค่า variable 
































This statistic that we've just formulated is called the chi-squared statistic. It captures the distance between a contingency table and the table you would expect if the variables were independent of one another. We found that the statistic for the relationship between party and natspac was one-point-three-three. If we calculate the statistic for the relationship with natarms, we get a much greater distance: eighteen-point-nine-seven. With this statistic in hand, you can return to the hypothesis test to answer the question of if either of these observed statistics: one-point-three-three or eighteen-point-nine-seven is so great as to lead you to reject the null hypothesis that these spending priorities are independent of political party.

































Dataframe with each roll contains head/tail, the expected outcome should be 0.5/0.5 (head/tail) if not bias, if the flipping the coin is bias the change to get either head/tail will not be equally 0.5.


































Comments

Popular posts from this blog

Useful links (updated: 2024-05-05)

SUSA Thailand - Sustainable University? (update 2023-06-23)

Genome editing technology short note