nce to determine if there is a relationship. Less than 5 weeks 5-14 weeks tation 84 112 ation 50 55 cial 89 105
Find test value and p-score.
Let A and B be the two attributes divided into r and s classes respectively. Then, to test whether the attributes A and B are independent or not, following procedure will be followed:
Let oij is the observed frequency for contingency table category in column i and row j and eij is the corresponding expected frequency for contingency table category in column i and row j.
Null hypothesis: the attributes A and B are independent.
Alternative hypothesis: the attributes A and B are not independent.
Test statistics:
The expected frequency is calculated as . N is total frequency. Here, ri and cj are ith row total and jth column total and follows chi-square distribution with degree of freedom. Now compute the p-value associated with the calculated value at given level of significance and degree of freedom, we will accept or reject the hypothesis.
Step by step
Solved in 5 steps