Use the Pearson chi-squared goodness-of-fit test. Under the null hypothesis, each count has the specified binomial distribution, and no parameter is estimated from the data. The seven mutually exclusive classes give degrees of freedom. Their expected counts are all at least five, so the usual chi-squared asymptotic approximation does not require pooling. The computed statistic is
Since , do not reject fairness at the 5% level. The approximate -value is . This conclusion concerns agreement with the specified independent fair-coin count model; a nonrejection is not proof of fairness.
Under the null hypothesis, the defect count in each packet has a binomial distribution with parameters . The likelihood, apart from factors independent of , is
The maximum-likelihood estimate is therefore
The fitted binomial distribution probabilities for counts are , yielding expected packet counts . The Pearson chi-squared goodness-of-fit test uses
For binomial goodness-of-fit with an estimated parameter, there are statistical degrees of freedom: the category counts have a fixed total, and one parameter was estimated. At the conventional level the chi-squared distribution with two statistical degrees of freedom has upper critical value , so the data do not reject the independent common-defect-probability model. The approximate p-value is ; even at , the critical value exceeds the observed statistic.
This is a goodness-of-fit conclusion rather than proof that individual bulbs are independent. The last expected count is only , so the chi-squared asymptotic approximation is somewhat marginal in that cell. The stated calibration is the usual asymptotic test with all four cells retained; if more accurate small-count inference is required, calibrate the fitted statistic under the binomial distribution model. Pooling cells would require a corresponding treatment of parameter fitting and test calibration.
The Fort Worth observation for ages 75–84 is missing. It is not a zero count and cannot be replaced by one. The missing cell prevents a direct two-city comparison in that age group and leaves an unbalanced age-by-city table. The youngest groups have only one and four cases, so chi-squared asymptotic approximations to tests and uncertainty may be poor there. The open-ended oldest group and broad age bands can conceal different within-group age compositions between cities.
The denominators are population counts rather than reported person-time, and the observation period is not specified. Comparable coverage, case definitions and time periods must therefore be established before interpreting the numbers as comparable incidence measures. The data contain no information on potential confounders such as individual risk factors or differences in ascertainment. These are aggregated observations on women in the listed ages, and any fitted city association is not automatically causal or generalizable beyond that population.
Index city by and age group by , with the youngest group the reference level. For each of the 15 observed cells, the grouped-binomial logistic regression assumes
with independent cell counts. The response supplied to R is , and the weights specify the binomial numbers of trials . They are not 15 arbitrary precision weights: the conditional variance of the proportion is . The logit link models log odds, and the two sets of factor coefficients use corner-point constraints.
There are nine parameters: one intercept, seven age contrasts and one city contrast. Hence the residual degrees of freedom are , not the total population minus nine. The null model has only an intercept and residual degrees of freedom. Adding age uses seven more parameters and reduces the binomial deviance from to , a drop of . Adding city then uses one parameter and reduces it by to . These are sequential likelihood-ratio tests, asymptotically compared with chi-squared distributions on seven and one degrees of freedom. Both provide extremely strong evidence of an effect; the printed age p-value is rounding, not an exactly zero probability. Because the table is incomplete, sequential main-effect sums need not be invariant to the order of fitting.
The intercept estimate is the log odds for the youngest Minneapolis–Saint Paul group. It implies baseline odds and a fitted probability about . Its standard error is ; its reported Wald test tests log odds zero, or probability , rather than a scientifically interesting comparison of groups.
The age coefficients are log odds ratios relative to the youngest group within the same city. Their exponentials are approximately , , , , , and as age increases through the seven other groups. All these comparisons have large positive Wald statistics and small p-values. Thus the fitted probabilities are much higher in the older groups than in the youngest group. The slightly smaller coefficient in the oldest group than in the preceding group does not itself prove a real decline: that claim needs a contrast and its standard error, including the covariance of the two estimates.
The city coefficient is the log odds ratio for Fort Worth relative to Minneapolis–Saint Paul, adjusted for age. Its standard error gives , so the null city effect is strongly rejected by the Wald test, consistent with the sequential likelihood-ratio test. The fitted constant-over-age city odds ratio and an approximate 95% confidence interval are
This is an odds ratio, not generally a probability ratio. The probabilities here are sufficiently small that the two ratios are close. The absence of an age-by-city interaction is an assumption of the fitted additive log-odds model.
The final binomial deviance is on six degrees of freedom; its approximate upper-tail p-value is . It gives no indication of substantial lack of fit against the saturated observed-cell model. The deviance residuals range from to , with median zero and no conspicuously large value in the five-number summary. Neither statement proves that every model assumption holds. In particular, the small case counts motivate checking the accuracy of the chi-squared asymptotic approximation, for example by a fitted-model parametric bootstrap.
The dispersion is fixed at one by the binomial distribution; it was not estimated as a free scale parameter. Four Fisher scoring iterations describe the numerical optimization, not four additional parameters. Residual and cellwise observed-versus-fitted comparisons would help assess adequacy and potential overdispersion.
The null hypothesis is that price and score are independent, equivalently that the independence log-linear model for a two-way contingency table is correct. Against the saturated alternative, the reported Poisson deviance is the likelihood-ratio test statistic
Under the null and the usual large-sample regularity assumptions, Wilks theorem gives
The observations must be independent, the cell probabilities must not lie on the boundary of the parameter space, and the expected counts must be large enough for the chi-squared asymptotic approximation. The fitted counts are either or , so the customary expected-count check is comfortably satisfied. Since
(equivalently, the p-value is about ), we do not reject the null at the significance level. The data provide no significant lack of fit for independence.