Given:
The null hypothesis states that there is no association between the variables. The alternative hypothesis states that there is an association between the variables.
: There is no association between treatment and outcome. : There is an association between treatment and outcome.
The expected frequencies E are the product of the column and row total,divided by the table total.
Conditions
The conditions for performing a chi-square test of homogeneity /independence are: Random, Independent (10%), Large counts. Random: Satisfled, because the sub jects were randomly assigned to a treatment... Independent: Satisfied, because the 160 subjects are less than 10% of all people (since there are more than 1600 people). Large counts: Satisfied, because all expected counts are at least 5. Since all conditions are satisfied, it is appropriate to carry out test of homogeneity /independence.
Hypothesis test
The chi-square subtotals are the squared differences between the observed and expected frequencies, divided by the expected frequency.
The value of the test-statistic is then the sum of the chi-square subtotals:
The P-value is the probability of obtaining the value of the test statistic, or a value more extreme. The P-value is the number (or interval) in the column title of the chi-square distribution table in the appendix containing the :
Command which results in a P-value of 0.570. Note: You can replace 1E99 by any other very large number.
If the P-value is less than or equal to the significance level, then the null hypothesis is rejected:
There is convincing evidence of an association between treatment and outcome for subjects like these.