0% found this document useful (0 votes)
62 views5 pages

Chi-Square Test: What Do You Mean X Test?

The document discusses chi-square tests, which are used to analyze relationships between categorical variables. It defines three types of chi-square tests: tests of goodness of fit, independence, and homogeneity. It also explains contingency tables, expected frequencies, how to calculate chi-square statistics, and applications of chi-square tests.

Uploaded by

Alamgir Hossain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views5 pages

Chi-Square Test: What Do You Mean X Test?

The document discusses chi-square tests, which are used to analyze relationships between categorical variables. It defines three types of chi-square tests: tests of goodness of fit, independence, and homogeneity. It also explains contingency tables, expected frequencies, how to calculate chi-square statistics, and applications of chi-square tests.

Uploaded by

Alamgir Hossain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Chi-square Test

What do you mean X2 test?


It is used for testing the agreement of observed frequencies with those expected upon a
given hypothesis or in other words it can be said that it is test of deviation between
theoretical and observed frequencies and to see whether the deviation is significant or
not. If the deviation is significant then the assumed hypothesis on which the test is
performed is rejected.

Chi-square (or χ2) tests draw inferences and test for relationships between categorical
variables, that is a set of data points that fall into discrete categories with no inherent
ranking.
There are three types of Chi-square tests, tests of goodness of fit, independence and
homogeneity. All three tests also rely on the same formula to compute a test statistic.

The value is calculated for the degrees of freedom n-1 where n is the number of classes.

All three function by deciphering relationships between observed sets of data and
theoretical—or “expected”—sets of data that align with the null hypothesis.

What is the chi-square goodness of fit test?


The Chi-square goodness of fit test is used to compare a randomly collected sample
containing a single, categorical variable to a larger population. This test is most
commonly used to compare a random sample to the population from which it was
potentially collected.

Alomgir Hossain
The test begins with the creation of a null and alternative hypothesis. In this case,
the hypotheses are as follows:
Null Hypothesis (Ho): The collected data is consistent with the population
distribution.
Alternative Hypothesis (Ha): The collected data is not consistent with the
population distribution.

The next step is to create a contingency table that represents how the data would be
distributed if the null hypothesis were exactly correct.
The sample’s overall deviation from this theoretical/expected data will allow us to draw
a conclusion, with more severe deviation resulting in smaller p-values.

What is the chi-square test of independence?


The Chi-square test for independence looks for an association between two categorical
variables within the same population. Unlike the goodness of fit test, the test for
independence does not compare a single observed variable to a theoretical population,
but rather two variables within a sample set to one another.

The hypotheses for a Chi-square test of independence are as follows:


Null Hypothesis (Ho): There is no association between the two categorical variables
in the population of interest.
Alternative Hypothesis (Ha): There is no association between the two categorical
variables in the population of interest.

The next step is to create a contingency table of expected values that reflects how a data
set that perfectly aligns the null hypothesis would appear.
The simplest way to do this is to calculate the marginal frequencies of each row and
column; the expected frequency of each cell is equal to the marginal frequency of the
row and column that corresponds to a given cell in the observed contingency table
divided by the total sample size.

Alomgir Hossain
What is a contingency table?
Contingency table (also known as two-way tables) are grids in which Chi-square data is
organized and displayed. They provide a basic picture of the interrelation between two
variables and can help find interactions between them.

In contingency tables, one variable and each of its categories are listed vertically and the
other variable and each of its categories are listed horizontally.
Additionally, including column and row totals, also known as “marginal frequencies”,
will help facilitate the Chi-square testing process.
In order for the Chi-square test to be considered trustworthy, each cell of your expected
contingency table must have a value of at least five.

Calculate the chi square statistic (χ2) by completing the following steps:

1. Calculate the expected frequencies and the observed frequencies.


2. For each observed number in the table subtract the corresponding expected
number (O — E).
3. Square the difference (O —E)².
4. Divide the squares obtained for each cell in the table by the expected number
for that cell (O - E)² / E.
5. Sum all the values for (O - E)² / E. This is the chi square statistic.

What is the chi-square test for homogeneity?


The Chi-square test for homogeneity is organized and executed exactly the same as the
test for independence. The main difference to remember between the two is that the test
for independence looks for an association between two categorical variables within the
same population, while the test for homogeneity determines if the distribution of a
variable is the same in each of several populations (thus allocating population itself as
the second categorical variable).

Alomgir Hossain
The hypotheses for a Chi-square test of independence are as follows:
Null Hypothesis (Ho): There is no difference in the distribution of a categorical
variable for several populations or treatments.
Alternative Hypothesis (Ha): There is a difference in the distribution of a
categorical variable for several populations or treatments.

The difference between these two tests can be a bit tricky to determine especially in
practical applications of a Chi-square test. A reliable rule of thumb is to determine how
the data was collected.

If the data consists of only one random sample with the observations classified
according to two categorical variables, it is a test for independence. If the data consists
of more than one independent random sample, it is a test for homogeneity.

Chi-square test for the variances


A chi-square test ( Snedecor and Cochran, 1983) can be used to test if the variance of a
population is equal to a specified value. This test can be either a two-sided test or a one-
sided test. The two-sided version tests against the alternative that the true variance is
either less than or greater than the specified value. The one-sided version only tests in
one direction. The choice of a two-sided or one-sided test is determined by the problem.
For example, if we are testing a new process, we may only be concerned if its variability
is greater than the variability of the current process.

Applications of X2 – Test:

1. Testing goodness of fit.

2. To determine genetic ratios [gene(s) involved for a particular trait]

from F /BC segregating data.

Alomgir Hossain
3. Estimation of linkage.

4. Use in testing independence of classifications.

5. Use in testing heterogeneity of data.

Alomgir Hossain

You might also like