# Is it possible to have covariance zero?

#### Student0001

##### New Member
Hello,

I am doing my homework for statistic course, and I've got some problems with a test.

A Hong Kong snack-food vendor offers 3 types of boxed “lunches to go,” priced at $3,$5,
and \$10, respectively. The vendor would like to establish whether there is a relationship
between the price of the boxed lunch and the number of sales achieved per hour.
Consequently, over a 15-day period the vendor records the number of sales made for each
of the 3 types of boxed lunches. The following data show the boxed lunch price (x) and the
number sold (y) during each of the 15 lunch hours.

(3 , 7), (5 , 5), (10, 2), (3 , 9), (5 , 6), (10, 5), (3 , 6), (5 , 6), (10, 1), (3 , 10), (5 , 7), (10, 4), (3 , 5), (5 , 6), (10, 4)

a. Describe the data numerically with their covariance and correlation.
b. Discuss the relationship between the price and number of boxed lunches sold.
So I put these data in excel and then calculated covariance...and it's zero! Am I missing something?

Thanks a lot,

Best regards

#### bruin

##### Member
Is it possible for a correlation coefficient to be zero?

Alternatively (looking at your data) can X covary with Y if X doesn't vary at all?

Edit: I just read the problem more carefully, and realized that these are supposed to be one dataset, not three. So you might want to check how you entered them in excel. The covariance is not zero for these data. Why did you split it into three columns? It's just two variables, you should just have two columns, one for x and one for y.

Last edited:

#### noetsi

##### Fortran must die
I would think that a covariance of zero meant that two variables were totally independent of each other. I doubt this would occur very often with real data because of random error or chance correlation.