You are on page 1of 17

ONE-WAY CHI-SQUARE TEST

(Goodness of Fit Test)


CHI-SQUARE TEST
The Chi-Square (χ²) test is a statistical test used to determine if there is a
significant association or relationship between two categorical
variables.
It is a non-parametric test, which means it does not make assumptions
about the underlying probability distribution of the data.
The Chi-Square test is commonly used in various fields, including biology, social
sciences, and market research, to analyze contingency tables and assess the
independence of categorical variables.
The Chi-Square test can be applied in two
main contexts:
• Used to determine whether a sample • The Chi-Square test of Independence is
of categorical data follows a used to determine whether there is a
hypothesized or expected distribution. significant association or relationship
between two categorical variables.
• It assesses how well the observed data
matches the expected or theoretical • It assesses whether the two variables are
distribution. statistically independent of each other or
if there is a meaningful association.

GOODNESS OF FIT TEST TEST OF INDEPENDENCE


When to use?
Conditions:
1. You want to test a hypothesis about the distribution of one categorical
variable.
◦ if you want to assess whether the distribution of observed data differs
significantly from, or matches, a theoretical or expected distribution.
2. The sample was randomly selected from the population.
3. There are a minimum of 5 observations expected in each group.
ONE-WAY CHI-SQUARE TEST
(Goodness of Fit Test)
One-Way Chi-Square Test & Example
Suppose we are hired by the FB company to identify the preferred social media
platforms of 150 people in our area like Quezon City, and we want to test whether the
distribution of preferences matches a hypothesized distribution.

HYPOTHESIZED OR EXPECTED distribution:

Social Media Flatform Percentage of Usage


FACEBOOK 35%
TWITTER 20%
INSTAGRAM 30%
LIKEDIN 15%
HYPOTHESIZED OR EXPECTED Distribution:
Social Media Flatform Percentage of Usage
FACEBOOK 35%
TWITTER 20%
INSTAGRAM 30%
LIKEDIN 15%

OBSERVED Distribution: (data gathered thru Survey)

Social Media Flatform Population


FACEBOOK 50
TWITTER 30
INSTAGRAM 40
LIKEDIN 30
One-Way Chi-Square Test
Step 1: Set Up the Hypotheses:
• Null Hypothesis (H₀): The observed distribution
matches the expected distribution.

• Alternative Hypothesis (H₁ or Hₐ): The observed


distribution does not match the expected distribution.
One-Way Chi-Square Test
Step 2: Calculate Expected Frequencies:

Calculate the expected frequencies (E) for each category by multiplying the
hypothesized proportions by the total sample size (150):

•Expected Facebook count = 0.35 * 150 = 52.5


•Expected Twitter count = 0.20 * 150 = 30.0
•Expected Instagram count = 0.30 * 150 = 45.0
•Expected LinkedIn count = 0.15 * 150 = 22.5
One-Way Chi-Square Test
Step 3: Create a Contingency Social Media Observed Expected
Table: Platform frequency frequency
(O) (E)
• Construct a contingency table
(also known as a frequency or Facebook 50 52.5
cross-tabulation table) that
shows the observed and
Twitter: 30 30.0
expected frequencies for each Instagram: 40 45.0
category.
LinkedIn: 30 22.5
Total 150 150
One-Way Chi-Square Test
Step 4: Calculate the Chi-Square
Statistic:
• Calculate the Chi-Square statistic
using the formula:
• χ² represents the Chi-Square statistic
• O is the observed frequency in each
category
• E is the expected frequency in each
category under the assumption that
the data follows the expected
distribution
One-Way Chi-Square Test

Social Observed Expected (O - E)² / E


Media frequency frequency
Platform (O) (E)
Facebook 50 52.5 0.1190
Twitter (X) 30 30.0 0.000
Instagram: 40 45.0 0.5556
LinkedIn: 30 22.5 2.500

Total 150 150 3.1746


One-Way Chi-Square Test
Step 5: Determine Degrees of In the example of social media preferences, we
Freedom (df): have four categories: Facebook, Twitter,
Instagram, and LinkedIn.
• Degrees of freedom for a one-way
Chi-Square test is the number of
categories minus one So, to calculate the degrees of freedom:
• df = (Number of Categories - 1) df = (4 - 1) = 3

Therefore, the degrees of freedom (df) is equal


to 3.
One-Way Chi-Square Test
Step 6: Choose the Other level of significance:
Significance Level (α):
α = 0.01 (1% Significance Level): This level is often used when researchers want to
be more conservative and minimize the risk of Type I errors. It signifies a 1%
•Typically, the chance of committing a Type I error.
significance level
(α) is set at 0.05. α = 0.10 (10% Significance Level): Occasionally, a significance level of 10% is used,
especially in exploratory or less stringent analyses. It allows for a higher tolerance
for Type I errors.

α = 0.001 (0.1% Significance Level): This extremely low significance level is used in
highly critical or sensitive situations where the cost of Type I errors is extremely
high. It implies a very low probability of making a Type I error.
One-Way Chi-Square Test
Step 7: Find the Critical Chi-
Square Value:

• Consult a Chi-Square
distribution table or use a
calculator or software to find
the critical Chi-Square value
• Use the df and significance
level (α) to determine our
chi-square critical value

df = 3
α = 0.05
One-Way Chi-Square Test
Step 8: Compare Calculated Critical Value Approach:
and Critical Chi-Square Values X
2 = 3.1746 < X2 = 7.81
and make a decision: obt crit

P- Value Approach:
The null hypothesis is rejected
when the obtained chi-square P-value = 7.81 > α = 5% (.05)
value is equal to or greater
than the critical chi-square Our obtained chi-square value is lesser than the critical chi-
value square value, and our p-value > α.

Or the p-value is less than or Therefore we fail to reject the null hypothesis and state that the
equal to the chosen observed data on the preferred social media platforms follows the
significance level (α), typically expected distribution.
denoted as 0.05 (5%) or 0.01
(1%).
END

You might also like