In: Statistics and Probability
A researcher conducts a long-term study of the correlation between the number of children a family has (X) and the number of pets they have 20 years later (Y). He finds the following results:
Children (X) Pets 20 years later (Y)
2 4
4 6
3 1
0 2
1 2
First, the researcher wants to calculate the correlation between the two variables. Using this dataset, calculate r. (3 pts)
Next, the researcher wants to use his knowledge about the correlation to be able to predict future pet ownership based on current family size. Using the information from the original test, calculate the linear regression equation for this dataset (2 pts)
Finally, use the regression equation to predict the number of future pets owned by a family that currently has 3 children. Use it again to predict the number of future pets owned by a family with 1 child. Make sure to label your answers clearly (1 pt each)
Answer to
1st Question:
The following table shows the calculations –
Children(X) |
Pets 20 years later(Y) |
X^2 |
Y^2 |
XY |
|
2 |
4 |
4 |
16 |
8 |
|
4 |
6 |
16 |
36 |
24 |
|
3 |
1 |
9 |
1 |
3 |
|
0 |
2 |
0 |
4 |
0 |
|
1 |
2 |
1 |
4 |
2 |
|
Total |
10 |
15 |
30 |
61 |
37 |
Total number of observations, n = 5
Mean of X, = 10/5 = 2
Mean of Y, = 15/5 = 3
Standard Deviation of X, Sx = {((X^2) / n) - (^2)}^0.5 = {(30/5) – (2^2)}^0.5 = 1.4142
Standard Deviation of Y, Sy = {((Y^2) / n) - (^2)}^0.5 = {(61/5) – (3^2)}^0.5 = 1.7888
Covariance between X and Y, Cov.(X,Y) = ((XY) / n) - () = (37/5) – (2 x 3) = 1.4
Correlation Coefficient, r = Cov.(X, Y) / (Sx.Sy) = 1.4 / (1.4142 x 1.7888) = 0.5534
(Here, all measures are rounded up to 4 decimal places)
Answer to
2nd Question:
The general way of obtaining a least – squares regression equation
for two variables is given below –
Where b is the slope of the regression equation and a is the Y – Intercept
Therefore,
b = (r.Sy) / Sx = (0.5534 x 1.7888) / 1.4142 = 0.6999 = 0.7 (approximately)
a = - b = 3 – (0.7 x 2) = 1.6
The regression equation is -
(predicted value) = 1.6 + 0.7X
Answer to 3rd
Question:
When the family has 3 children, that is, when X = 3
= 1.6 + (0.7 x 3) = 4 (rounded to the nearest whole number)
Therefore, when the family has 3 children, the number of future pets owned by the family is 4
When the family has 1 child, that is, when X = 1
= 1.6 + (0.7 x 1) = 2 (rounded to the nearest whole number)
Therefore, when the family has 1 child, the number of future pets owned by the family is 2