a. "H_0:" The ticket class chosen is independent on the traveling distance.
"H_a:" The ticket class chosen is dependent on the traveling distance.
b. df=(number of raws – 1)(numbers of columns – 1)
"df=(5-1)(3-1)= 4\\cdot2 = 8"
c. How many passengers are expected to travel between 201 and 300 miles and
purchase second-class tickets?
"\\frac{67\\cdot48}{200}=16.08"
d. How many passengers are expected to travel between 401 and 500 miles and
purchase first-class tickets?
e. test statistic:
for each category.
Expected 1-100miles 3rd class = "\\frac{73\\cdot41}{200}=14.965"
Expected 1-100miles 2nd class = "\\frac{67\\cdot41}{200}=13.735"
Expected 1-100miles 1st class = "\\frac{60\\cdot41}{200}=12.3"
Expected 101-200miles 3rd class = "\\frac{73\\cdot42}{200}=15.33"
Expected 101-200miles 2nd class = "\\frac{67\\cdot42}{200}=14.07"
Expected 101-200miles 1st class = "\\frac{60\\cdot42}{200}=12.6"
Expected 201-300miles 3rd class = "\\frac{73\\cdot48}{200}=17.52"
Expected 201-300miles 2nd class = "\\frac{67\\cdot48}{200}=16.08"
Expected 201-300miles 1st class = "\\frac{60\\cdot48}{200}=14.4"
Expected 301-400miles 3rd class = "\\frac{73\\cdot47}{200}=17.155"
Expected 301-400miles 2nd class = "\\frac{67\\cdot47}{200}=15.745"
Expected 301-400miles 1st class = "\\frac{60\\cdot47}{200}=14.1"
Expected 401-500miles 3rd class = "\\frac{73\\cdot22}{200}=8.03"
Expected 401-500miles 2nd class = "\\frac{67\\cdot22}{200}=7.37"
Expected 401-500miles 1st class = "\\frac{60\\cdot22}{200}=6.6"
"\\chi^2=\\frac{(21-14.965)^2}{14.965}+\\frac{(14-13.735)^2}{13.735}+\\frac{(6-12.3)^2}{12.3}+\\frac{(18-15.33)^2}{15.33}+\\frac{(16-14.07)^2}{14.07}+\\frac{(8-12.6)^2}{12.6}+\\frac{(16-17.52)^2}{17.52}+\\frac{(17-16.08)^2}{16.08}+\\frac{(15-14.4)^2}{14.4}+\\frac{(12-17.155)^2}{17.155}+\\frac{(14-15.745)^2}{15.745}+\\frac{(21-14.1)^2}{14.1}+\\frac{(6-8.03)^2}{8.03}+\\frac{(6-7.37)^2}{7.37}+\\frac{(10-6.6)^2}{6.6}=15.92"
f. For chi-square 15.92 and 8 df the p-value is 0.0435.
g. Since the p-value=0.0435 is less than the significance level 0.05 we cannot accept the null hypothesis. Or according to the critical values of chi square table with 5% significance level and 8 df the critical value is 15.51. Since 15.92 > 15.51 we can reject the null hypothesis. At the 5% significance level the data do provide sufficient evidence to conclude that the selection of ticket class is dependent on travel distance.
Comments
Leave a comment