An archive the questions from Mark's Summer 2018 Stat 185.

For anyone who is confused about the Chi-Squared stuff

jthomps6

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.

jgilfill

Open Math Homework on Chi-Squared Test (Critical Value Help) Different Problem

You are conducting a Goodness of Fit hypothesis test for the claim that the 4 categories occur with the following frequencies:

pA=0.1
pB=0.3
pC=0.1
pD=0.5

Sum Observations: 95

(Correct) Expected Values:

A: 9.5
B: 28.5
C: 9.5
D: 47.5

Observed Values:

A: 11
B: 30
C: 6
D: 48

(11-9.5)^2 / 9.5 + (30-28.5)^2 / 28.5 + (6-9.5)^2 / 9.5 + (48-47.5)^2 / 47.5 =

0.23684 + 0.07895 + 1.28947 + 0.005263 = 1.6105 =

(Correct) ChiSquared Test-Statistic: 1.611

For the statistical test in R:
chisq.test(c(11, 30, 6, 48), p=c(0.1, 0.3, 0.1, 0.5))

Chi-squared test for given probabilities

data: c(11, 30, 6, 48)
X-squared = 1.6105, df = 3, p-value = 0.657

(Incorrect) This is my problem: For a significance of level alpha = 0.005, what is the chi-square critical value? Table? R? I’ve tried everything.

R?
qchisq(0.005,3)
[1] 0.07172177

Table?
χ2= 12.84 or 12.840 with 3 df

What would be the decision of this hypothesis test?

1.611 < 12.840

(Correct) Fail to reject null hypothesis (Ho)

Give all answers as decimals rounded to 3 places after the decimal point, if necessary.

Help would be greatly appreciated.
Remember the other assignment due tonight.

jthomps6

So what I get for the Chi-Squared Test following the rules of an Alpha = 0.005 and df = 3 is the following:
Critical Value = 12.838

I found this value here on this website: https://www.medcalc.org/manual/chi-square-table.php

Also with your R Code it should look like this instead.

qchisq(0.995, 3)
12.83816