Recall & Review
beginner
What is a t-test used for in data analysis?
A t-test helps us compare the average values of two groups to see if they are different in a meaningful way.
Click to reveal answer
beginner
Which function in scipy.stats is commonly used to perform a t-test for independent samples?
The function
scipy.stats.ttest_ind() is used to compare the means of two independent groups.Click to reveal answer
beginner
What does the p-value from a t-test tell us?
The p-value shows the chance that the difference between groups happened by random chance. A small p-value (like less than 0.05) means the difference is likely real.
Click to reveal answer
intermediate
How do you perform a paired t-test using scipy.stats?
Use
scipy.stats.ttest_rel() to compare two related samples, like measurements before and after a treatment on the same subjects.Click to reveal answer
intermediate
What assumptions must be met to correctly use a t-test?
The data should be roughly normally distributed, the samples should be independent (except for paired tests), and variances should be similar for independent t-tests.
Click to reveal answer
Which scipy.stats function is used for an independent two-sample t-test?
✗ Incorrect
ttest_ind compares means of two independent groups. ttest_rel is for paired samples, ttest_1samp compares one sample to a known value, and ANOVA is a different test.
What does a p-value less than 0.05 usually mean in a t-test?
✗ Incorrect
A p-value below 0.05 suggests the difference between groups is statistically significant, meaning it is unlikely due to chance.
Which t-test should you use to compare measurements before and after treatment on the same people?
✗ Incorrect
ttest_rel is for paired samples, like before-and-after measurements on the same subjects.
Which assumption is NOT required for a t-test?
✗ Incorrect
T-tests require numerical data, not categorical data.
What does
scipy.stats.ttest_1samp() do?✗ Incorrect
ttest_1samp tests if the average of one sample is different from a specific number.
Explain how to perform an independent t-test using scipy.stats and interpret the results.
Think about comparing two groups like test scores from two classes.
You got /4 concepts.
Describe the main assumptions behind using a t-test and why they matter.
Consider what could go wrong if data is very skewed or samples are related but treated as independent.
You got /4 concepts.