top of page
Inaugurated by IN-SPACe
ISRO Registered Space Tutor

S3-SA3-0417

What is a Goodness of Fit for Probability Distributions?

Grade Level:

Class 9

AI/ML, Data Science, Physics, Economics, Cryptography, Computer Science, Engineering

Definition
What is it?

Goodness of Fit for probability distributions tells us how well a chosen theoretical probability distribution (like a normal or uniform distribution) matches the actual data we have collected. It helps us check if our assumption about the data's pattern is correct. Essentially, it measures how 'good' the fit is between observed data and an expected model.

Simple Example
Quick Example

Imagine you predict that students in a class will score equally well in a test, meaning marks will be evenly spread (a uniform distribution). After the test, you collect the actual marks. Goodness of Fit helps you check if the actual marks are indeed spread out uniformly, or if they cluster around certain scores (like many students getting average marks).

Worked Example
Step-by-Step

Let's say a chai shop owner expects an equal number of customers (10 each) on Monday, Tuesday, Wednesday, Thursday, and Friday. This is their 'expected' distribution.

--- They observe the actual number of customers for a week: Monday (12), Tuesday (8), Wednesday (11), Thursday (9), Friday (10).

--- For each day, calculate the difference between observed and expected: (12-10), (8-10), (11-10), (9-10), (10-10) which are 2, -2, 1, -1, 0.

--- Square these differences: 2^2=4, (-2)^2=4, 1^2=1, (-1)^2=1, 0^2=0.

--- Divide each squared difference by the expected number for that day: 4/10, 4/10, 1/10, 1/10, 0/10. These are 0.4, 0.4, 0.1, 0.1, 0.

--- Add these values up: 0.4 + 0.4 + 0.1 + 0.1 + 0 = 1.0.

--- This sum (1.0) is a 'Goodness of Fit' statistic (specifically, a Chi-square statistic). A smaller value generally means a better fit. In this case, 1.0 indicates a reasonably good fit to the expected equal distribution.

Why It Matters

Goodness of Fit is crucial in fields like AI/ML and data science to ensure the models built are based on correct data assumptions. Engineers use it to verify if product performance matches theoretical predictions, and economists use it to check if market models align with real economic data. It helps data scientists, AI engineers, and statisticians make reliable predictions and decisions.

Common Mistakes

MISTAKE: Thinking a high Goodness of Fit value always means a perfect match. | CORRECTION: A Goodness of Fit value is usually a test statistic (like Chi-square). A *smaller* value often indicates a *better* fit, meaning the observed data is closer to the expected distribution.

MISTAKE: Only looking at one or two data points to decide if the fit is good. | CORRECTION: Goodness of Fit considers the overall pattern across *all* observed data points compared to the entire expected distribution, not just individual points.

MISTAKE: Confusing Goodness of Fit with how 'good' the data itself is. | CORRECTION: Goodness of Fit only checks how well the data matches a *specific chosen distribution*. It doesn't tell you if the data was collected properly or if the chosen distribution is the *only* possible one.

Practice Questions
Try It Yourself

QUESTION: If you expect 50 students to pass and 50 to fail an exam (total 100), but 60 pass and 40 fail, calculate the sum of squared differences divided by expected for this data. | ANSWER: For pass: (60-50)^2 / 50 = 100/50 = 2. For fail: (40-50)^2 / 50 = 100/50 = 2. Total sum = 2 + 2 = 4.

QUESTION: A mobile game developer expects an equal number of players (200 each) from Delhi, Mumbai, and Bengaluru. They observe 210 from Delhi, 190 from Mumbai, and 200 from Bengaluru. Calculate the Goodness of Fit statistic (sum of (Observed-Expected)^2 / Expected). | ANSWER: Delhi: (210-200)^2 / 200 = 100/200 = 0.5. Mumbai: (190-200)^2 / 200 = 100/200 = 0.5. Bengaluru: (200-200)^2 / 200 = 0/200 = 0. Total sum = 0.5 + 0.5 + 0 = 1.0.

QUESTION: A bus stop expects customer arrivals to follow a specific pattern: 20% in the first hour, 30% in the second, 50% in the third. Out of 100 total arrivals, they observed 15 in the first hour, 35 in the second, and 50 in the third. Calculate the Goodness of Fit statistic. | ANSWER: Expected: Hour 1 = 0.20 * 100 = 20. Hour 2 = 0.30 * 100 = 30. Hour 3 = 0.50 * 100 = 50. Statistic: (15-20)^2 / 20 + (35-30)^2 / 30 + (50-50)^2 / 50 = (-5)^2 / 20 + (5)^2 / 30 + 0 = 25/20 + 25/30 + 0 = 1.25 + 0.833 = 2.083 (approx).

MCQ
Quick Quiz

What does a Goodness of Fit test primarily help us determine?

The accuracy of data collection methods

How well observed data matches a theoretical probability distribution

The average value of a dataset

The total number of data points in a dataset

The Correct Answer Is:

B

Goodness of Fit specifically measures how closely the actual, observed data aligns with a particular theoretical distribution we expect it to follow. It's not about data collection accuracy or simple averages.

Real World Connection
In the Real World

Imagine a meteorologist in India trying to predict monsoon rainfall patterns. They might use historical data to see if the rainfall amounts follow a 'normal distribution' (bell curve). A Goodness of Fit test helps them confirm if the actual rainfall data from this year or past years indeed fits that normal distribution, which is crucial for farmers and water management.

Key Vocabulary
Key Terms

PROBABILITY DISTRIBUTION: A function that describes all possible values and likelihoods that a random variable can take. | OBSERVED DATA: The actual information or measurements collected from an experiment or study. | EXPECTED DISTRIBUTION: The theoretical pattern or frequencies that we predict the data should follow. | CHI-SQUARE TEST: A common statistical test used to calculate Goodness of Fit. | THEORETICAL MODEL: A mathematical description or assumption about how a system or data behaves.

What's Next
What to Learn Next

Now that you understand Goodness of Fit, you can explore specific probability distributions like the Normal Distribution or Binomial Distribution. Learning about these will help you understand what kinds of patterns real-world data can follow, and how to apply Goodness of Fit tests more effectively.

bottom of page