# sample variance, co-variance and correlation coefficient

I need help with this little stats question a friend gave me.

Q) A random sample of cars produced the following fuel consumption figures, in miles per gallon. For each car, we also know the maximum speed in km/hour.

Car (i)                 1   2   3
Fuel Comsumption (X)    54  42  39
Maximum Speed (Y)       170 190 230


a) Find the mode, median and mean of the fuel consumption sample. What does the relation between the mean and median indicate about the shape of the data?

b) Find the sample variance and the sample standard deviation of both characteristics (fuel consumption and maximum speed).

c) Find the sample co-variance and the sample correlation coefficient. In general, which of the variance and the sample correlation coefficient is a more useful measure of the relationship between two variables?

For part (a) I've worked out the mode=54, median=42 and mean=(54+42+39)/3=45 and that mean>median implies negative distribution (I think).

For (b) I thought the variance=[(1$^2$x54)+(2$^2$x42)+(3$^2$x39)-(45)$^2$ but that gives a negative answer so can't the right.

-

(a) I don't think there is a mode in this case with three cars producing different numbers. The mean greater that the median is often taken as a measure of positive (i.e. right) skewness, though there are counter-examples.

(b) For a sample variance with the unbiased correction you might want to calculate $$\frac{(54-45)^2+(42-45)^2+(39-45)^2}{2}$$ or $$\frac32 \left( \frac{54^2+42^2+39^2}{3}-45^2\right)$$

(c) I will leave the calculations to you, but for considering the relationship between the two variables you will want to use the sample correlation coefficient to say that there is a non-linear relationship, where higher fuel consumption is associated with a lower top speed.

-