Thursday, December 16, 2010

chi-squared worked example

Chapter 12, question 15. Flights stats, inc., collects data on the number of flights scheduled and the number of flights flown at major airports throughout the US. Flightstats data showed 56% of flights scheduled at Newark, La Guardia, and Kennedy airports were flown during a three-day storm. All airlines say they always operate within set safety parameters-if conditions are too poor they do not fly. the following data show a sample of 400 scheduled flights during the snowstorm.
Did it fly  American   Continental  Delta  United  Total
Yes          48                   69              68        25         210
no            52                   41              62        35          190
Use the chi-test of independance with a .05 significance to analyze the data what is your conclusion? do you have a preference for which airline you would choose to fly during similar snow storm conditions?

Answers: let’s write the hypotheses:
Ho: There is no difference in flying or not and airline
Ha: There is ....

Step 1 Fill in the column totals
Step 2 Calculate the expected values by going rowtotal*columntotal/n
Mine are
48
69
68
25
210
52
41
62
35
190
100
110
130
60
400





52.5
57.75
68.25
31.5

47.5
52.25
61.75
28.5






Then use =chitest(...) to get the p value. I get p = 0.04109. That means we can reject the null and say that there is a difference in airlines. I think I’d probably pick United, because their rate of not flying in bad weather is highest. That implies a more safety-conscious attitude. But a bit boring.


No comments: