Day 6: Correlation and Regression Lines #1
Objective
In this challenge, we practice calculating the correlation between two elements.
Resources
Here are some useful articles explaining the relationship between and the slopes of the regression lines.
- Correlation and R-squared
- Khan Academy tutorial about the coefficient of determination
- Formula: where the symbols used are the standard ones, given the context.
Task
For a particular scatter plot, the line of regression of on is:
And the line of regression of on is:
Find the Pearson Product moment coefficient, , correct to a scale of decimal places.
Output Format
Your answer should be a single floating point/decimal number, correct to a scale of decimal places. You can submit solutions in either of the following ways:
- Solve the problem manually and submit your result as Plain Text. In the text box below, enter a single floating point/decimal number.
- Submit an R or Python program, which uses the above parameters (hard-coded), then computes and prints the score.
Your answer should follow the format below, and must not contain any extra white space or newline characters:
4.23
xxxxxxxxxx
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
return 0;
}