0% found this document useful (0 votes)
87 views3 pages

Goodness of Fit Test

Goodness of fit tests measure how well a theoretical probability distribution fits a random sample of data. Common goodness of fit tests include the chi-square test, Kolmogorov-Smirnov test, and Anderson-Darling test. The chi-square test compares observed and expected frequencies to determine if they differ significantly. It calculates a chi-square statistic and compares it to a critical value. If the statistic exceeds the critical value, the null hypothesis that the distribution is a good fit is rejected. For example, a chi-square test of soda flavor preferences rejected the claim that consumers had no preference, as observed and expected frequencies differed more than expected by chance.
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)
87 views3 pages

Goodness of Fit Test

Goodness of fit tests measure how well a theoretical probability distribution fits a random sample of data. Common goodness of fit tests include the chi-square test, Kolmogorov-Smirnov test, and Anderson-Darling test. The chi-square test compares observed and expected frequencies to determine if they differ significantly. It calculates a chi-square statistic and compares it to a critical value. If the statistic exceeds the critical value, the null hypothesis that the distribution is a good fit is rejected. For example, a chi-square test of soda flavor preferences rejected the claim that consumers had no preference, as observed and expected frequencies differed more than expected by chance.
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/ 3

GOODNESS OF FIT TEST

Goodness of Fit Test


 The goodness of fit (GOF) tests measure the compatibility of a random sample
with a theoretical probability distribution function.
 In other words, these tests show how well the distribution selected fits to your
data.

There are multiple methods for determining goodness-of-fit. Some of the most popular
methods used in statistics include the following:
 Chi-square  Anderson-Darling test
 Kolmogorov-Smirnov test  Shipiro-Wilk test.

KEY TAKEAWAYS
 Goodness-of-fit tests are statistical tests aiming to determine whether a set of
observed values match those expected under the applicable model.

 There are multiple types of goodness-of-fit tests, but the most common is the chi-
square test.

 These tests can show you whether your sample data fit an expected set of data
from a population with normal distribution.

Chi square goodness of fit test


 Chi-Square goodness of fit test is a non-parametric test that is used to find out
how the observed value of a given phenomena is significantly different from the
expected value. 
• In Chi-Square goodness of fit test, the term goodness of fit is used to compare
the observed sample distribution with the expected probability distribution. 

The formula for the chi-square goodness of fit test is:


X2 = (O − E) 2
E
Where:
O - Observed values (data)
E – Expected values (from theory)

The number of degrees of freedom is 


df = (number of categories – 1).

Observed Frequencies vs. Expected Frequencies


Suppose a market analyst wished to see whether costumers have any preference
among any five flavors of a new fruit soda. A sample of 100 people provided these data.

Cherry Strawberry Orange Lime Grape


32 28 16 14 10

 Since the frequencies for each flavour were obtained from a sample, these actual
frequencies are called Observed Frequencies.
 The frequencies obtained by calculation (as if there were no preference) are
called the Expected Frequencies.

Observed Frequencies vs. Expected Frequencies

Frequency Cherry Strawberry Orange Lime Grape


Observed 32 28 16 14 10
Expected 20 20 20 20 20
Example
Is there enough evidence to reject the claim that there is no preference in the selection
of fruit soda flavors, using the data shown previously?
Let a = 0.05

Solution:
STEP 1: State the hypothesis and define the claim.
Ho – Consumers show no preference for flavors (claim)
Ha – Consumers show a preference
Step 2: Find the critical value.
df = number of categories – 1
df = 5 – 1
df = 4
df = 4, and a = 0.05, hence, the critical value from the chi-square distribution table is
9.488.

Step 3: Compute for the chi-square


X2 = (O − E) 2
E

X2 = (32 – 20) 2 + (28 – 20) 2 + (16 – 20) 2 + (14 – 20) 2 + (10 – 20) 2
20 20 20 20 20
2 2 2 2 2
X = (12) + (8) + (- 4) + (-6) + (-10)2
20 20 20 20 20
2
X = 144 + 64 + 16 + 36 + 100
20 20 20 20 20
2
X = 7.2 + 3.2 + 0.8 + 1.8 + 1.5
X2 = 18

STEP 4: Make the decision.


The decision if to reject the null hypothesis, since 18.0 > 9. 488
Remember:
  If the calculated value of Chi-Square goodness of fit test is greater than the
table value, we will reject the null hypothesis and conclude that there is a
significant difference between the observed and the expected frequency. 
 If the calculated value of Chi-Square goodness of fit test is less than the table
value, we will accept the null hypothesis and conclude that there is no significant
difference between the observed and expected value.

STEP 5: Summarize the results.


There is enough evidence to reject the claim that consumers show no preference for the
flavors.
A GOOD FIT
When the observed values and expected values are close together, the chi-square test
value will be small.
Then the decision will not to reject the null hypothesis – hence, there is a ‘’good fit.’’

NOT A GOOD FIT


When the observed values and expected values are far apart, the chi-square test value
will be large. Then, the null hypothesis will be rejected, hence, there is ‘’not a good fit.’’

CHI-SQUARE GOODNESS OF FITNESS TEST PROCEDURE SUMMARY


1. State the hypothesis and define the claim.
2. Find the critical value.
3. Compute the test value.
4. Make the decision.
5. Summarize the results.

You might also like