In: Economics
House price and number of bedrooms Suppose that you are provided the following data on house prices and the number of bedrooms
selling Price number of bedrooms
400 2
700 4
400 3
Calculate the sample mean for both selling price and mean number of bedrooms.
Calculate the sample standard deviations for both selling price and number of bedrooms.
Calculate the sample covariance between the selling price and the number of bedrooms.
Calculate the sample correlation between the selling price and the number of bedrooms.
Calculate the fraction of the variation in selling price that is explained (or attributed) to the number of bedrooms.
House price | no. of bedrooms |
400 | 2 |
400 | 3 |
700 | 4 |
(a) Sample mean for house price
Sample mean for number of bedrooms
(b) Sample standard deviation of house prices
Sample standard deviation of number of bedrooms
(c) Sample covariance between the house price and number of bedrooms
House price | no. of bedrooms | |||
400 | 2 | 100 | 1 | 100 |
400 | 3 | 100 | 0 | 0 |
700 | 4 | -200 | -1 | 200 |
total | 0 | 0 | 100 |
(d) Sample correlation between the house price and number of bedrooms
(e) To calculate the fraction of the variation in selling price that is explained (or attributed) to the number of bedrooms, we have to find the r-squared value which measures the variation of one variable, say x which explains the variation of the other say y.