Question

1.   A Bloomberg Businessweek subscriber study asked, “in the past 12 months, when traveling for business,...

1.   A Bloomberg Businessweek subscriber study asked, “in the past 12 months, when traveling for business, what type of airline ticket did you purchase most often?” A second question asked if the type of airline ticket purchased most often was for domestic or international travel. Sample data obtained are shown in the following table.

Type of Ticket

Domestic Flight

International Flight

First class

29

22

Business class

95

121

Economy class

518

135

a)   The study wants to test whether the type of ticket is independent of the type of flight. Clearly state the null and alternative hypotheses.

b)   Compute the expected frequencies by completing the table below.

Type of Ticket

Domestic Flight

International Flight

Total

First Class

Business Class

Economy Class

Total

c)   Compute the test statistic.
Please copy your R code and the result and paste them here.

d)   At 5% significance level, compute the critical value for the test statistic and the p value for the test. Draw your conclusion.
Please copy your R code and the result and paste them here.

e)   Use the function chisq.test() in R to run the test directly to confirm your results above are correct.

Please copy your R code and the result and paste them here.

Homework Answers

Answer #1

The obtained sample data is

Domestic flight International flight Total
First Class 29 22 51
Business Class 95 121 216
Economy Class 518 135 653
Total 642 278 920

a) Now we have to test whether the type of ticket is independent of the type of flight. Therefore the hypothesis is

Null hypothesis, H0 : Type of ticket is independent of the type of flight

Alternate hypothesis, H1 : Type of ticket is not independent of the type of flight.

b)

Now the expected frequencies are obtained by using following formula

Hence

Domestic flight International flight Total
First Class 35.5891 15.4109 51
Business Class 150.7304 65.2696 216
Economy Class 455.6804 197.3196 653
Total 642 278 920

c)

The test statistic for testing above hypothesis is

Oij (Observed frequency) Eij (Expected frequency) (Oij-Eij)2/Eij
29 35.5891 1.2199
22 15.4109 2.8172
95 150.7304 20.6055
121 65.2696 47.5854
518 455.6804 8.5229
135 197.3196 19.6824
Total 920

Therefore the value of test statistic is 100.4334.

R-Code:

> Oij=c(29,22,95,121,518,135) ## Oij = Observed Frequency
> Eij=c(35.5891,15.4109,150.7304,65.2696,455.6804,197.3196) ## Eij = Expected Frequency
> chi_test=sum(((Oij-Eij)^2)/Eij) ## chisquare test statistic
> chi_test
[1] 100.4334

Therefore the value of test statistic is 100.4334.

d)

Let the level of significance = = 0.05 and (r-1)*(c-1) = 2

Hence the degrees of freedom = 2

Therefore the critical value for the test statistic is

Now value of A is computed by using following formula

Hence A = 5.991 -------------------(By using chisquare table)

Therefore, the critical value for the test statistic is 5.991.

P-value is

Therefore p- value is 0.

R code:

> Oij=c(29,22,95,121,518,135) ## Oij = Observed Frequency
> Eij=c(35.5891,15.4109,150.7304,65.2696,455.6804,197.3196) ## Eij = Expected Frequency
> chi_test=sum(((Oij-Eij)^2)/Eij) ## chisquare test statistic
> critical_value = qchisq(p=0.05, df=2, lower.tail=FALSE)
> critical_value
[1] 5.991465
> pvalue=pchisq(chi_test,df=2,lower.tail=FALSE) ## pvalue for test
> pvalue
[1] 1.552954e-22

e)

> data=matrix(c(29,95,518,22,121,135),nrow=3,ncol=2)
> data
[,1] [,2]
[1,] 29 22
[2,] 95 121
[3,] 518 135
> chisq.test(data)

Pearson's Chi-squared test

data: data
X-squared = 100.43, df = 2, p-value < 2.2e-16

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
A Bloomberg BusinessWeek subscriber study asked, "In the past 12 months, when traveling for business, what...
A Bloomberg BusinessWeek subscriber study asked, "In the past 12 months, when traveling for business, what type of airline ticket did you purchase most often?" A second question asked if the type of airline ticket purchased most often was for domestic or international travel. Sample data obtained are shown in the following table. Type of Flight Type of Ticket Domestic International First Class. 29    21 Business Class. 98 122 Economy Class 511 136 Compute the value of the 2...
A  Bloomberg BusinessWeek subscriber study asked, "In the past 12 months, when traveling for business, what type...
A  Bloomberg BusinessWeek subscriber study asked, "In the past 12 months, when traveling for business, what type of airline ticket did you purchase most often?" A second question asked if the type of airline ticket purchased most often was for domestic or international travel. Sample data obtained are shown in the following table.   Type of Flight Type of Ticket Domestic International First Class. 26. 22 Business Class. 97 129 Economy Class 511. 134 Compute the value of the   2 test statistic (to...
A Bloomberg BusinessWeek subscriber study asked, "In the past 12 months, when traveling for business, what...
A Bloomberg BusinessWeek subscriber study asked, "In the past 12 months, when traveling for business, what type of airline ticket did you purchase most often?" A second question asked if the type of airline ticket purchased most often was for domestic or international travel. Sample data obtained are shown in the following table. Type of Ticket Domestic International First Class 27 21 Business Class 92 124 Economy Class 519 137 a. Using a .05 level of significance, is the type...
1.) The following table contains observed frequencies for a sample of 200. Row Variable Column Variable...
1.) The following table contains observed frequencies for a sample of 200. Row Variable Column Variable A B C P 24 48 54 Q 26 22 26 Test for independence of the row and column variables using α = 0.05. Find the value of the test statistic. (Round your answer to three decimal places.) = ??? Find the p-value. (Round your answer to four decimal places.) = ???? 2.) A magazine subscriber study asked, "In the past 12 months, when...
1.   The Wall Street Journal’s Shareholder Scoreboard tracks the performance of 1000 major U.S. companies. The...
1.   The Wall Street Journal’s Shareholder Scoreboard tracks the performance of 1000 major U.S. companies. The performance of each company is rated based on the annual total return, including stock price changes and the reinvestment of dividends. Ratings are assigned by dividing all 1000 companies into five groups from a (top 20%), b (next 20%), to e (bottom 20%). Shown here are the one-year ratings for a sample of 60 of the largest companies. A B C D E 5...
A consumer research group is interested in testing an automobile manufacturer’s claim that a new economy...
A consumer research group is interested in testing an automobile manufacturer’s claim that a new economy model will travel at least 25 miles per gallon of gasoline. Provide a null and alternative hypothesis for the test. Suppose a test on 25 cars of this model indicates an average of 24 mpg, with a sample standard deviation of 3 mpg. Compute the value for the test statistic and the p-value. Please copy your R code and the result and paste them...
The variance in a production process is an important measure of the quality of the process....
The variance in a production process is an important measure of the quality of the process. A large variance often signals an opportunity for improvement in the process by finding ways to reduce the process variance. The following sample data show the weight of bags (in pounds) produced on two machines: machine 1 and 2. m1 = (2.95, 3.45, 3.50, 3.75, 3.48, 3.26, 3.33, 3.20, 3.16, 3.20, 3.22, 3.38, 3.90, 3.36, 3.25, 3.28, 3.20, 3.22, 2.98, 3.45, 3.70, 3.34, 3.18,...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how the firms resources incompetencies support the given pressures regarding costs and local responsiveness. Describe entry modes have they usually used, and whether they are appropriate for the given strategy. Any key issues in their global strategy? casestudy: Atlanta, June 17, 2014. Sea of Delta employees and their families swarmed between food trucks, amusement park booths, and entertainment venues that were scattered throughout what would...
Mattel Responds to Ethical Challenges Business Ethics This case was written by Debbie Thorne, John Fraedrich,...
Mattel Responds to Ethical Challenges Business Ethics This case was written by Debbie Thorne, John Fraedrich, O. C. Ferrell, and Jennifer Jackson, with the editorial assistance of Jennifer Sawayda. This case was developed for classroom discussion rather than to illustrate either effective or ineffective handling of an administrative, ethical, or legal discussion by management. All sources used for this case were obtained through publicly available material. Mattel, Inc. is a world leader in the design, manufacture, and marketing of family...
What tools could AA leaders have used to increase their awareness of internal and external issues?...
What tools could AA leaders have used to increase their awareness of internal and external issues? ???ALASKA AIRLINES: NAVIGATING CHANGE In the autumn of 2007, Alaska Airlines executives adjourned at the end of a long and stressful day in the midst of a multi-day strategic planning session. Most headed outside to relax, unwind and enjoy a bonfire on the shore of Semiahmoo Spit, outside the meeting venue in Blaine, a seaport town in northwest Washington state. Meanwhile, several members of...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT