English
The chi-squared test 卡方检验 compares the results you actually counted (the observed numbers, $O$) with the results you expected from the genetic diagram (the expected numbers, $E$). It tells you whether the difference is small enough to be due to chance, or large enough to mean something else is going on.
You add up, for every group, the squared difference between observed and expected, divided by the expected:
$$\chi^2 = \sum \frac{(O - E)^2}{E}$$
Then you compare this $\chi^2$ value with a critical value from a table. The row you use is set by the degrees of freedom (the number of groups minus 1). If $\chi^2$ is less than the critical value, the difference is not significant — the results fit the expected ratio, and any difference is just chance. If $\chi^2$ is greater than the critical value, the difference is significant, so some other factor is involved.
Worked example. A $\text{Tt} \times \text{Tt}$ cross gives $160$ offspring: $114$ tall and $46$ short. Test whether this fits the expected $3:1$ ratio.
The expected numbers are $\tfrac{3}{4} \times 160 = 120$ tall and $\tfrac{1}{4} \times 160 = 40$ short. Then:
$$\chi^2 = \frac{(114 - 120)^2}{120} + \frac{(46 - 40)^2}{40} = \frac{36}{120} + \frac{36}{40} = 0.30 + 0.90 = 1.20.$$
There are $2$ groups, so degrees of freedom $= 2 - 1 = 1$. The critical value at $p = 0.05$ is $3.84$. Because $1.20 < 3.84$, the difference is not significant: the results fit a $3:1$ ratio, and the small difference is due to chance.
Tiếng Việt
The chi-squared test compares the results you actually counted (the observed numbers, $O$) with the results you expected from the genetic diagram (the expected numbers, $E$). It tells you whether the difference is small enough to be due to chance, or large enough to mean something else is going on.
You add up, for every group, the squared difference between observed and expected, divided by the expected:
$$\chi^2 = \sum \frac{(O - E)^2}{E}$$
Sau đó bạn so sánh giá trị $\chi^2$ này với giá trị tới hạn từ bảng tra cứu. Hàng mà bạn sử dụng được xác định bởi bậc tự do (số nhóm trừ đi 1). Nếu $\chi^2$ nhỏ hơn giá trị tới hạn, sự chênh lệch không có ý nghĩa thống kê — kết quả phù hợp với tỷ lệ dự kiến, và mọi sự chênh lệch chỉ là do ngẫu nhiên. Nếu $\chi^2$ lớn hơn giá trị tới hạn, sự chênh lệch có ý nghĩa thống kê, do đó có yếu tố khác tham gia.
Ví dụ minh họa. Một phép lai $\text{Tt} \times \text{Tt}$ tạo ra $160$ con: $114$ cao và $46$ thấp. Hãy kiểm tra xem kết quả này có phù hợp với tỷ lệ $3:1$ dự kiến hay không.
Số lượng dự kiến là $\tfrac{3}{4} \times 160 = 120$ cao và $\tfrac{1}{4} \times 160 = 40$ thấp. Sau đó:
$$\chi^2 = \frac{(114 - 120)^2}{120} + \frac{(46 - 40)^2}{40} = \frac{36}{120} + \frac{36}{40} = 0.30 + 0.90 = 1.20.$$
Có $2$ nhóm, nên bậc tự do là $= 2 - 1 = 1$. Giá trị tới hạn tại $p = 0.05$ là $3.84$. Vì $1.20 < 3.84$, sự khác biệt không có ý nghĩa thống kê: kết quả phù hợp với tỷ lệ $3:1$, và sai số nhỏ là do ngẫu nhiên.