Recall & Review
beginner
What does the Pearson correlation coefficient measure?
It measures the strength and direction of a linear relationship between two variables.
Click to reveal answer
beginner
What is the range of values for the Pearson correlation coefficient?
The values range from -1 to 1, where 1 means perfect positive linear correlation, -1 means perfect negative linear correlation, and 0 means no linear correlation.
Click to reveal answer
beginner
How do you calculate Pearson correlation using scipy?
Use scipy.stats.pearsonr(x, y) where x and y are arrays of data. It returns the correlation coefficient and the p-value.
Click to reveal answer
intermediate
What does a p-value returned by scipy.stats.pearsonr indicate?
It indicates the probability that the observed correlation happened by chance. A small p-value (e.g., < 0.05) suggests the correlation is statistically significant.
Click to reveal answer
intermediate
Can Pearson correlation detect non-linear relationships?
No, Pearson correlation only measures linear relationships. Non-linear relationships may have a low or zero Pearson correlation even if variables are related.
Click to reveal answer
What does a Pearson correlation coefficient of 0.8 indicate?
✗ Incorrect
A value of 0.8 means a strong positive linear relationship between the two variables.
Which scipy function calculates Pearson correlation?
✗ Incorrect
scipy.stats.pearsonr calculates the Pearson correlation coefficient and p-value.
What does a p-value less than 0.05 mean in Pearson correlation test?
✗ Incorrect
A p-value less than 0.05 suggests the correlation is statistically significant and unlikely due to chance.
What is the Pearson correlation coefficient for no linear relationship?
✗ Incorrect
A coefficient of 0 means no linear relationship between variables.
Can Pearson correlation detect a curved (non-linear) relationship?
✗ Incorrect
Pearson correlation only measures linear relationships and may miss non-linear associations.
Explain how to use scipy to calculate Pearson correlation between two data arrays.
Think about the function name and what it returns.
You got /4 concepts.
Describe what the Pearson correlation coefficient tells us about two variables.
Focus on what the number means in terms of relationship.
You got /4 concepts.