Correlation analysis measures how two things move together. If one goes up and the other goes up too, they have a positive correlation. If one goes up and the other goes down, they have a negative correlation.
Click to reveal answer
beginner
What does a correlation coefficient of 0 mean?
A correlation coefficient of 0 means there is no linear relationship between the two variables. They do not move together in any predictable linear way.
Click to reveal answer
intermediate
Name two common methods to calculate correlation.
Two common methods are Pearson correlation (measures linear relationship) and Spearman correlation (measures monotonic relationship, good for ranked data).
Click to reveal answer
beginner
Why is correlation not the same as causation?
Correlation shows that two things move together, but it does not prove one causes the other. There could be other reasons or just coincidence.
Click to reveal answer
beginner
What is the range of values for the Pearson correlation coefficient?
The Pearson correlation coefficient ranges from -1 to 1. -1 means perfect negative correlation, 1 means perfect positive correlation, and 0 means no linear correlation.
Click to reveal answer
What does a correlation coefficient of -0.8 indicate?
AStrong positive correlation
BNo correlation
CPerfect correlation
DStrong negative correlation
✗ Incorrect
A value close to -1 means a strong negative correlation, so -0.8 indicates a strong negative relationship.
Which correlation method is best for ranked data?
ASpearman correlation
BPearson correlation
CLinear regression
DK-means clustering
✗ Incorrect
Spearman correlation works well with ranked or non-linear data by measuring monotonic relationships.
If two variables have a correlation coefficient of 0, what does it mean?
AThey have a perfect positive relationship
BThey have a perfect negative relationship
CThey have no linear relationship
DOne causes the other
✗ Incorrect
A zero correlation coefficient means no linear relationship between the variables.
Which of these statements is true about correlation?
ACorrelation measures how two variables move together
BCorrelation is only for categorical data
CCorrelation always equals 1
DCorrelation proves causation
✗ Incorrect
Correlation measures how two variables move together, but it does not prove causation.
What is the maximum value of the Pearson correlation coefficient?
A0
B1
C-1
D100
✗ Incorrect
The Pearson correlation coefficient ranges from -1 to 1, with 1 being the maximum positive correlation.
Explain in your own words what correlation analysis is and why it is useful.
Think about how two things can move together or apart.
You got /4 concepts.
Describe the difference between correlation and causation with an example.
Consider two things that happen together but one does not cause the other.
You got /4 concepts.
Practice
(1/5)
1. What does a correlation value of 0 indicate between two variables?
easy
A. There is no linear relationship between the variables
B. The variables move exactly together in the same direction
C. One variable increases while the other decreases perfectly
D. The variables have a perfect nonlinear relationship
Solution
Step 1: Understand correlation meaning
Correlation measures linear relationship strength between two variables.
Step 2: Interpret zero correlation
A correlation of 0 means no linear relationship exists between the variables.
Final Answer:
There is no linear relationship between the variables -> Option A
Quick Check:
Correlation = 0 means no linear link [OK]
Hint: Zero correlation means no linear link between variables [OK]
Common Mistakes:
Thinking zero means variables are unrelated in any way
Confusing zero correlation with negative correlation
Assuming zero means perfect nonlinear relationship
2. Which of the following is the correct Python syntax to calculate Pearson correlation between two lists x and y using NumPy?
easy
A. np.correlation(x, y)
B. np.corrcoef(x, y)[0, 1]
C. np.pearson(x, y)
D. np.corr(x, y)
Solution
Step 1: Recall NumPy correlation function
NumPy uses np.corrcoef() to compute correlation matrix.
Step 2: Extract Pearson correlation value
The correlation between x and y is at position [0, 1] in the matrix.
Final Answer:
np.corrcoef(x, y)[0, 1] -> Option B
Quick Check:
Use np.corrcoef and index [0,1] for Pearson [OK]
Hint: Use np.corrcoef(x, y)[0,1] to get Pearson correlation [OK]
Common Mistakes:
Using non-existent functions like np.correlation or np.pearson
Forgetting to index the correlation matrix
Confusing correlation with covariance functions
3. Given the code below, what is the output?
import numpy as np
x = [1, 2, 3, 4, 5]
y = [2, 4, 6, 8, 10]
correlation = np.corrcoef(x, y)[0, 1]
print("{:.2f}".format(round(correlation, 2)))
medium
A. 1.00
B. -1.00
C. 0.00
D. 0.50
Solution
Step 1: Analyze the data relationship
List y is exactly twice x, so they have a perfect positive linear relationship.
Step 2: Calculate correlation
Perfect positive linear relationship means correlation = 1.0.
Final Answer:
1.00 -> Option A
Quick Check:
Perfect positive linear relation = 1.00 [OK]
Hint: Perfect multiples have correlation 1.00 [OK]
Common Mistakes:
Thinking correlation is 0 because values differ
Confusing correlation with covariance magnitude
Rounding errors causing wrong output
4. Identify the error in the following code snippet for calculating correlation:
import numpy as np
x = [1, 2, 3]
y = [4, 5]
correlation = np.corrcoef(x, y)[0, 1]
print(correlation)
medium
A. Missing import statement for correlation function
B. np.corrcoef requires pandas Series, not lists
C. Lists x and y have different lengths causing an error
D. Indexing [0, 1] is incorrect for correlation matrix
Solution
Step 1: Check input data lengths
Lists x and y have lengths 3 and 2, which must be equal for correlation.
Step 2: Understand np.corrcoef requirements
np.corrcoef requires inputs of equal length arrays to compute correlation matrix.
Final Answer:
Lists x and y have different lengths causing an error -> Option C
Quick Check:
Input arrays must be same length [OK]
Hint: Check input lengths match before correlation [OK]
Common Mistakes:
Assuming np.corrcoef works with unequal length lists
Thinking pandas Series are required for np.corrcoef
Misindexing the correlation matrix
5. You have two features: hours_studied and exam_score. You calculate their correlation and get -0.85. What does this imply and what should you consider next?
hard
A. Perfect negative nonlinear relationship; use polynomial regression
B. Strong positive linear relationship; increase study hours to improve score
C. No relationship; ignore this feature in modeling
D. Strong negative linear relationship; consider if data or labels are reversed
Solution
Step 1: Interpret correlation sign and magnitude
A correlation of -0.85 means a strong negative linear relationship between the two features.
Step 2: Consider real-world meaning
Since more study usually means higher scores, a strong negative correlation suggests possible data issues or reversed labels.
Final Answer:
Strong negative linear relationship; consider if data or labels are reversed -> Option D
Quick Check:
Negative strong correlation may indicate reversed data [OK]
Hint: Strong negative correlation may mean reversed data [OK]
Common Mistakes:
Assuming negative correlation means no relationship
Ignoring domain knowledge about expected relationships
Confusing negative linear with nonlinear relationships
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.