A recent survey showed the number of children per household as follows:
# Children per household | Population |
0 | 4.3 |
1 | 1.0 |
2 | 2.3 |
3 | 0.3 |
4 | 0.2 |
5 | 0 |
Check how the data compares with a Poisson distribution with lambda = 1.
You may recall that lambda is the expected value of Poisson distribution. First, we create the Poisson probabilities for each category from the number of children per household = 0.
poi_prob <- dpois(0:5, 1)
0.367879441 0.367879441 0.183939721 0.061313240 0.015328310 0.003065662
Having established the expected probabilities, we perform the chi-squared test.
poi_prob <- dpois(0:5, 1)
child_perHouse <- c(4.3, 1.0, 2.3, 0.3, 0.2, 0)
chisq.test(child_perHouse, p = poi_prob, rescale.p = TRUE)
Chi-squared test for given probabilities
data: child_perHouse
X-squared = 2.4883, df = 5, p-value = 0.7783