LightMySky
به انگلیسی

Chi-Square Tests for Categorical Data

Compare observed counts with the counts a model predicts. The same statistic serves goodness of fit, independence and homogeneity, with the degrees of freedom telling them apart.

شروع یادگیری این موضوعبه حساب کاربری نیازی نیست. پیشرفت در همین مرورگر ذخیره می‌شود.

کارهایی که یادگیرنده بعد از این درس می‌تواند انجام دهد

  • Compute expected counts and the statistic for a contingency table
  • State the degrees of freedom for each of the three tests
  • Check the expected-count condition before trusting the result

۱ · بخوان

A goodness of fit test asks whether observed counts match a claimed distribution. For each category you compare the observed count with the expected count under the claim and add up the squared gap divided by the expected count across all categories. Large totals signal a poor fit. The degrees of freedom are the number of categories minus 1, and every expected count should reach at least 5.

A test of independence works on a table with rows for one variable and columns for the other. When the variables are unrelated, each cell expects its row total times its column total divided by the grand total, and the same sum of squared gaps over expected measures the distance from independence. The degrees of freedom are rows minus 1 times columns minus 1, and the same expected count rule of at least 5 applies.

Try it together

A cell sits in a row totalling 30 and a column totalling 40 with 120 observations overall. Its expected count is 30 times 40 divided by 120, which is 10. A table with 3 rows and 4 columns uses 2 times 3, which is 6 degrees of freedom.

Good to know

Homogeneity looks numerically like independence but starts from several separate samples compared on one trait, while independence sorts one sample two ways. Read the design first: one sample sorted twice means independence, and several samples compared means homogeneity. Rejecting either test shows an association but never proves cause.

Expected counts set the target, the statistic measures the miss, and the design names the question.

برای خواندن بیشتر

11.2 Goodness-of-Fit Test

A goodness of fit test asks whether observed counts match a claimed distribution. For each category, compare the observed count O with the expected count E under the claim, then add up (O minus E) squared over E across all categories. Large totals signal a poor fit.

Degrees of freedom equal the number of categories minus 1, because the total count fixes one of them. The test needs expected counts of at least 5 in each cell. When that rule fails, small cells should be combined before trusting the result.

11.3 Test of Independence

A test of independence works on a contingency table with rows for one variable and columns for another. Under the null claim the two variables are unrelated, so each cell expects its row total times its column total divided by the grand total. The same sum of (O minus E) squared over E then measures how far the table strays from independence.

Degrees of freedom are (rows minus 1) times (columns minus 1). As usual, every expected count should reach at least 5. Rejecting the null means spotting an association, though it never proves that one variable causes the other.

11.4 Test for Homogeneity

A homogeneity test compares several populations to see whether they share the same distribution of a categorical trait. The table layout looks like the independence test, but the design differs: separate samples are drawn from each population, one per row or column. Expected counts and the statistic are computed the same way.

Because the arithmetic matches, students often mix the two tests up. The question wording settles it: one sample sorted two ways means independence, while several samples compared on one trait means homogeneity. State the design before computing so the conclusion answers the right question.

کاوش بیشتر

۲ · ببین

به انگلیسی

دور از صفحه‌نمایش

چاپ کاربرگکاغذ A4، با یک صفحهٔ جواب‌ها برای بزرگ‌ترها. بدون صفحه‌نمایش، بدون اینترنت.

جایگاه این موضوع

اول این‌ها را یاد بگیر

پیوندهای اختیاری

این موضوع راه این‌ها را باز می‌کند

این موضوع به کجا میرسه

شغل‌هایی که به این مهارت وابسته هستند. یکی رو دنبال کن تا ببینی روی چی ساخته شده.

سپس تمرین

۱۴ سؤال پشت این درس منتظرند، هر کدام با پاسخ توضیح‌داده‌شده. هر پاسخ آسمان را پر می‌کند: ستاره‌ها هنگام یادگیری روشن می‌شوند و وقتی زمان برگشتن است کمرنگ می‌شوند.

شروع یادگیری این موضوع