# The chi square goodness-of-fit test with no degrees of freedom left

• A
In summary: This is why the first one has zero degrees of freedom, while the second one has one.In summary, the conversation discusses the relationship between empirical and theoretical frequency distributions and the use of chi-square goodness-of-fit tests. It is noted that having no degrees of freedom does not guarantee a perfect fit between the two distributions. The concept of degrees of freedom is further explained and applied to an example. It is concluded that comparing different probability models to the same data can result in different measures of fit.
TL;DR Summary
How to deal with a chi square goodness-of-fit test if the number of degrees of freedom is equal to zero?
I have an empirical frequency distribution as for example below:

##f_{2} = \, \, \, 21##
##f_{3} = 111##
##f_{4} = \, \, \, 24##

The theoretical distribution is determined by two parameters. So for a chi-square goodness-of-fit test there are actually no degrees of freedom left. Yet the theoretical distribution deviates from the observed distribution. The fact that there are no degrees of freedom left does not ensure that the theoretical and the observed distribution coincide. Can you still say something about the goodness-of-fit ?

If you have three measurements and two parameters, you have one degree of freedom.

An example of zero degrees of freedom would be a linear fit to two points. In that case there is no goodness of fit information.

For the theoretical distribution ##P (X = k)## it holds in this case that ##k = 2, 3, 4 \dots ##. If I calculate chi square for the scores ##2, 3, 4## with expected values ##NP (X = 2)##, ##NP (X = 3)## and ##NP (X \geq 4)## then I get .381, but if I compute chi square for the scores ##2, 3, 4## and ##5##, where ##f_{5} = 0## with expected value ##NP(X = 2)##, ##NP(X = 3)##, ##NP (X = 4)## and ##NP(X \geq 5)## then get I as a result 3.719 and that would be significant with one degree of freedom.

I don't see how your second message has anything to do with your first. Your first measurement has 3 measurements and 2 parameters - i.e. one degree of freedom.

I thought the number of degrees of freedom (##df##) was equal to the number of classes minus the number of estimated parameters minus 1. So in this case for ##f_{2} = \, \, \, 21##, ##f_{3} = 111## and ##f_{4} = \, \, \, 24## one would expect ##df = 0## (##= 3-2-1##).

I don't know what you mean by "class". You have X data points and Y fit parameters, so you have X-Y degrees of freedom. So if, as your OP says, you have 3 data points and 2 parameters in your model, you have one degree of freedom.

but if I compute chi square for the scores ##2, 3, 4## and ##5##, where ##f_{5} = 0## with expected value ##NP(X = 2)##, ##NP(X = 3)##, ##NP (X = 4)## and ##NP(X \geq 5)## then get I as a result 3.719 and that would be significant with one degree of freedom.

You are comparing two different probability models to the same data, so isn't surprising that you get different measures of fit. The first probability model makes no prediction for X=4. The second one does.

## 1. What is the chi square goodness-of-fit test with no degrees of freedom left?

The chi square goodness-of-fit test with no degrees of freedom left is a statistical test used to determine if a set of observed data fits a particular theoretical distribution. It is typically used when there are no degrees of freedom left, meaning that all the parameters of the distribution have been estimated from the data.

## 2. When should the chi square goodness-of-fit test with no degrees of freedom left be used?

This test is typically used when the sample size is small and the expected frequencies for each category are low. It is also used when the data does not fit a normal distribution and cannot be transformed to fit one.

## 3. How is the chi square goodness-of-fit test with no degrees of freedom left calculated?

The test statistic for this test is calculated by summing the squared differences between the observed and expected frequencies for each category, divided by the expected frequency for that category. This is then compared to a critical value from the chi square distribution to determine if the data fits the theoretical distribution.

## 4. What is the interpretation of the results of the chi square goodness-of-fit test with no degrees of freedom left?

If the calculated test statistic is greater than the critical value, it indicates that the data does not fit the theoretical distribution. However, if the calculated test statistic is less than or equal to the critical value, it suggests that the data fits the theoretical distribution.

## 5. Are there any limitations to the chi square goodness-of-fit test with no degrees of freedom left?

Yes, this test is only appropriate for categorical data and assumes that the expected frequencies for each category are greater than 5. It also assumes that the data is independent and that the sample is representative of the population.

• Set Theory, Logic, Probability, Statistics
Replies
5
Views
2K
• Calculus and Beyond Homework Help
Replies
3
Views
1K
• Set Theory, Logic, Probability, Statistics
Replies
5
Views
7K
• Set Theory, Logic, Probability, Statistics
Replies
5
Views
1K
• Set Theory, Logic, Probability, Statistics
Replies
20
Views
3K
• Set Theory, Logic, Probability, Statistics
Replies
14
Views
2K
• Set Theory, Logic, Probability, Statistics
Replies
4
Views
3K
• Set Theory, Logic, Probability, Statistics
Replies
2
Views
2K
• Set Theory, Logic, Probability, Statistics
Replies
4
Views
2K
• Set Theory, Logic, Probability, Statistics
Replies
4
Views
2K