Recall & Review
beginner
What is the purpose of goodness of fit evaluation in data science?
Goodness of fit evaluation checks how well a statistical model matches observed data. It helps us see if the model explains the data well or if it misses important patterns.
Click to reveal answer
beginner
Which Python library provides tools for goodness of fit tests like Chi-square and Kolmogorov-Smirnov?
The scipy.stats module offers functions like
chisquare() and kstest() to perform goodness of fit tests.Click to reveal answer
beginner
What does a low p-value in a goodness of fit test indicate?
A low p-value means the model does not fit the data well. It suggests the observed data is unlikely if the model were true, so we might reject the model.
Click to reveal answer
intermediate
Explain the Chi-square goodness of fit test in simple terms.
The Chi-square test compares observed counts in categories to expected counts from a model. It measures if differences are too big to be just chance.
Click to reveal answer
intermediate
What is the Kolmogorov-Smirnov test used for in goodness of fit?
The Kolmogorov-Smirnov test compares the shape of the observed data distribution to a theoretical distribution to see if they match closely.
Click to reveal answer
Which function in scipy.stats is used for the Chi-square goodness of fit test?
✗ Incorrect
The chisquare() function performs the Chi-square goodness of fit test.
What does a high p-value in a goodness of fit test suggest?
✗ Incorrect
A high p-value means we do not reject the model; it fits the data well.
Which test compares the cumulative distribution of data to a theoretical distribution?
✗ Incorrect
The Kolmogorov-Smirnov test compares cumulative distributions.
In goodness of fit, what are 'expected counts'?
✗ Incorrect
Expected counts are what the model predicts for each category.
Which scipy.stats function would you use to test if data fits a normal distribution?
✗ Incorrect
kstest() can test if data fits a specified distribution like normal.
Describe how you would use scipy to check if your data fits a theoretical distribution.
Think about comparing observed data to expected or theoretical distribution.
You got /3 concepts.
Explain the difference between the Chi-square test and the Kolmogorov-Smirnov test for goodness of fit.
Focus on what each test measures and the data format.
You got /3 concepts.