Table 2.
Table to compute χ2 test score.
| Positive class | Negative class | Total | |
|---|---|---|---|
| Feature fi occurs | α | β | α+β=μ |
| Feature fi does not occur | λ | γ | λ+γ=τ − μ |
| Total | α+β=ω | β+γ=τ − ω | τ |
The sum of instances comprising feature fi is denoted by μ, the sum of instances without feature fi is denoted by τ − μ, the sum of instances that are positive is expressed as ω, and the sum of instances that are negative are represented by τ − ω. Let the observed values be α, β, λ, and γ with the expected values Eα, Eβ, Eλ, and Eγ. Based on the hypothesis that the two events are independent, the expected value can be evaluated as follows: