In: Statistics and Probability
Note: Please write down the formulas clearly. Thank you
The office occupancy rates were reported for four California metropolitan areas. | |||||||
Do the following data suggest that the office vacancies were independent of the metropolitan area? | |||||||
Run a hypothesis test at alpha of 0.05. What is your conclusion? | |||||||
Observed Frequencies | |||||||
Occupancy Status/Metropolitan Area | Los Angeles | San Diego | San Francisco | San Jose | Total | ||
Occupied | 160 | 116 | 192 | 174 | 642 | ||
Vacant | 40 | 34 | 33 | 26 | 133 | ||
Total | 200 | 150 | 225 | 200 | 775 |
Null hypothesis : Ho : Office vacancies were independent of the metropolitan area
Alternate Hypothesis : Ha : Office vacancies were not independent of the metropolitan area
Test Statistic :
O : Observed Frequency
E: Expected Frequency
Expected Frequencies | |||||
Occupancy Status/Metropolitan Area | Los Angeles | San Diego | San Francisco | San Jose | Total |
Occupied | (642*200)/775 | (642*150)/775 | (642*225)/775 | (642*200)/775 | 642 |
Vacant | (133*200)/775 | (133*150)/775 | (133*225)/775 | (133*200)/775 | 133 |
Total | 200 | 150 | 225 | 200 | 775 |
Expected Frequencies | |||||
Occupancy Status/Metropolitan Area | Los Angeles | San Diego | San Francisco | San Jose | Total |
Occupied | 165.6774 | 124.2581 | 186.3871 | 165.6774 | 642 |
Vacant | 34.3226 | 25.7419 | 38.6129 | 34.3226 | 133 |
Total | 200 | 150 | 225 | 200 | 775 |
O | E | O-E | (O-E)2 | (O-E)2/E |
160 | 165.6774 | -5.6774 | 32.2331 | 0.1946 |
40 | 34.3226 | 5.6774 | 32.2331 | 0.9391 |
116 | 124.2581 | -8.2581 | 68.1956 | 0.5488 |
34 | 25.7419 | 8.2581 | 68.1956 | 2.6492 |
192 | 186.3871 | 5.6129 | 31.5047 | 0.1690 |
33 | 38.6129 | -5.6129 | 31.5047 | 0.8159 |
174 | 165.6774 | 8.3226 | 69.2653 | 0.4181 |
26 | 34.3226 | -8.3226 | 69.2653 | 2.0181 |
Total | 7.7528 |
Test Statistic :
Degrees of freedom = (number of rows -1)*(Number of columns - 1) = (2-1)*(4-1) = 3
for 3 degrees of freedom ,
As p-value : 0.0514 > level of significance : : 0.05 ; Fail to reject the null hypothesis.
These is not sufficient for the data to suggest that the Office vacancies were not independent of the metropolitan area.
p-value is computed using the excel function : CHISQ.DIST.RT
CHISQ.DIST.RT function
Returns the right-tailed probability of the chi-squared distribution.
The χ2 distribution is associated with a χ2 test. Use the χ2 test to compare observed and expected values. For example, a genetic experiment might hypothesize that the next generation of plants will exhibit a certain set of colors. By comparing the observed results with the expected ones, you can decide whether your original hypothesis is valid.
Syntax
CHISQ.DIST.RT(x,deg_freedom)
The CHISQ.DIST.RT function syntax has the following arguments:
X Required. The value at which you want to evaluate the distribution.
Deg_freedom Required. The number of degrees of freedom.