If you are confused about any of the Chi-Squared stuff this should hopefully help/clear things up for you.
Probabilities = A:0.4, B:0.1, C:0.25, D:0.25
Category | Observation | Expected Value |
---|---|---|
A | 57 | 66 |
B | 23 | 16.5 |
C | 47 | 41.25 |
D | 38 | 41.25 |
Total | 165 |
To find your expected value, you need to find the total then divide the total by the probability.
Ex: 165*0.4 = 66
This could be for Category A and so on.
Once you find your values you need to calculate the Chi-Squared Statistical Test using this formula down below.
O = Observed
E = Expected
X^2 = (O_1 - E_1)^2 / E_1 + (O_2 - E_2)^2 / E_2 + (O_3 - E_3)^2 / E_3 + (O_4 - E_4)^2 / E_4
This will look like the following…
X^2 = (57 - 66)^2 / 66 + (23 - 16.5)^2 / 16.5 + (47 - 41.25)^2 / 41.25 + (38 - 41.25)^2 / 41.25
Calculate this step by step and you should get an answer of: x^2 = 4.486
In MyOpenMath this should be rounded to three decimal places like it is above.
To find the Critical value you need to look it up on the table. On MyOpenMath it wants it to three decimal places; therefore, you cannot use the one on our class website you need to find a table that has all three decimal places.
R-Studio Code (can be used to double check your answers.)
For the statistical test:
chisq.test(c(57, 23, 47, 38), p=c(0.4, 0.1, 0.25, 0.25))
Chi-squared test for given probabilities
data: c(57, 23, 47, 38)
X-squared = 4.8455, df = 3, p-value = 0.1835
For the critical value
qchisq(α, df) #This will give you the critical value based on your alpha number (α) and degrees of freedom (df)
Note that the alpha value should be your confidence interval that you are looking for such as 0.95
If you have any other questions on this just reply to this post.