0
$\begingroup$

I am trying to solve an exercise where I applied the chi-squared test.

I have already calculated the test statistic and the degrees of freedom.

At the question: "For how many degrees of freedom is the test statistic proved of significance?" we have to compute the degrees of freedom, right?

An other question is the following: "With which realization probability is this or an even greater effect to be expected when the null hypothesis is valid?"

I haven't really understood what I am supposed to do here? Could you give me a hint?

1 Answers 1

2

I assume this is a chi-squared goodness-of-fit test for data in $k$ categories (treated by the test as nominal). The test statistic is $$Q = \sum_{i=1}^k \frac{(X_i = E_i)^2}{E_i},$$ where the $X_i$ are the observed counts in the categories and the $E_i$ are the expected counts (unrounded), computed from the model being fit.

Small values of $Q$ represent relative good fit to the model and large values represent bad fit. So you will reject the null hypothesis that the data match the model for sufficiently large values of $Q.$

Provided that the $E_i$ are all above 5 (some authors say most are above 3), $Q$ is approximately distributed as $\mathsf{Chisq}(\nu),$ where the number of degrees of freedom is $\nu = k - 1.$ However, if the model is given only generically, and you have to estimate $r$ parameters in order to find the $E_i,$ then $\nu = k - r = 1.$

I believe the second part of the question is asking for the critical value of the test. That is, the value $c$ such that $Q > c$ leads to rejection at a specified significance level. Knowing the significance level and $\nu,$ you can get the value $c$ appropriate for a particular test from printed tables of the chi-squared distribution or by using software.

In R statistical software, the critical value for a test at the 5% level with $\nu = 5$ is $c = 11.07.$ Here is the computation from R statistical software, perhaps you can compare it with a printed table.

qchisq(.95, 5)
## 11.0705
  • 0
    We have the table https://i.stack.imgur.com/L1Yob.png and all the $E_i$ are over $5$. I haven't erally understood why $\nu=k-r=1$. Could you explain it to me?2017-02-14
  • 0
    For the second part: The significance level is not given. To we suppose that it is $5\%$ ? Which $\nu$ do we take?2017-02-14
  • 0
    It is $Q=118.91$.2017-02-14
  • 0
    For my first question is it $(r-1)\cdot (c-1)$ where $r$ is the number of rows and $c$ the number of columns?2017-02-14
  • 1
    There are many kinds of chi-sq tests. Your question was vague, so I guessed the most common one--with one categorical variable. Hence "I assume this is a chi-squared goodness-of-fit test for data in $k$ categories." You have a 'contingency table' with _two_ categorical variables. Presumably you are testing whether 'religious preference' and 'political party vote' are indep. cat. variables. If so, you are using row and column totals along with the assumption of independence to find the $E_{ij}.$ DF are $\nu = (r-1)(c-1) = (3-1)(3-1) = 4.$ // In general, if signif. level not specified, use 5%.2017-02-14
  • 0
    So, for the second part: From the table https://www.medcalc.org/manual/chi-square-table.php we get $c=9.488$, right? The critival point is that probability? At the next question we have to determine whether the following sentence is true. "That is, the bivariate relationship between these two features in the population is only with a probability of about x% (x is the value from the previous task, so the one of my post above.) is different than that in her sample." This means that we have to determine if the null hypothesis is accepted or rejected?2017-02-14
  • 1
    The critical value for a chi-squared test with 4 DF at level 5% is found in R as `qchisq(.95, 4)` which returns 9.487729. If the chi-squared statistic exceeds this value then reject the null hypothesis of independence.2017-02-14
  • 0
    Yes, but at the sentence it is not clarified if it exceeds, is it? It says that it is about x%. Does this mean that it does not exceed the critical value?2017-02-14
  • 1
    I get chisq statistic = 118.885. Maybe it's asking for a P-value. "x%" is not really specific. I agree it's unclear. And maybe translation from German to English is not helping.2017-02-14
  • 0
    Ok, I will look again my calculations... I think I made a mistake at the rounding offs.2017-02-14
  • 0
    _Time to end this exchange of comments._ Please post this as a new Question, being as specific as possible, and showing the computations you have made.2017-02-14
  • 0
    Ok, I will do that. Thank you!! :-)2017-02-14
  • 0
    My new question is : http://math.stackexchange.com/questions/2144546/chi-squared-test-is-the-sentence-true2017-02-14