I fitted some data to a Poisson distribution, the data is as follows:
observed <- c(290, 630, 873, 853, 618, 310, 138, 54, 21, 9, 4)
estimated_prob_mass <- c(0.064, 0.176, 0.242, 0.222, 0.152, 0.084, 0.038, 0.015, 0.005, 0.002, 0.000)
Visually, the scaled distribution fits the data really well. I used the ChiSq goodness of fit test to check the data and got the following result:
chisq.test(observed, p=estimated_prob_mass)
#Warning message in chisq.test(observed, p = estimated_prob_mass):
#"Chi-squared approximation may be incorrect"
#Chi-squared test for given probabilities
#data: observed
#X-squared = Inf, df = 10, p-value < 2.2e-16
Why would I get an infinite ChiSq value and a near zero p-value in this case?