In: Statistics and Probability
Jonathan considers booking a flight to see the temple at Chichen
Itza, which is near Cancun Mexico. Expedica.ca offers both business
class (non-stop/direct) as well as first class flights (with a
1-stop layover). Jonathan wants to know if the prices for his
options are approximately the same, or if flying first class will
generally cost more. Can you help him find this out? Use
α=0.042α=0.042 for all calculations. The specifics can be found in
the file below.
Non_Stop_Flights | one_Stop_flights | |
1 | 1664.03 | 1440.2 |
2 | 1812.87 | 1430.47 |
3 | 1496.77 | 1542.1 |
4 | 1435.27 | 1559.53 |
5 | 1630.48 | 1543.1 |
6 | 1409.64 | 1386.76 |
7 | 1566.82 | 1682.94 |
8 | 1525.67 | 1638.89 |
9 | 1414.73 | |
10 | 2098.55 |
(a) Check to see if the distribution of the flight classes
appear to be normal. Hint: use a p-value to decide with
α=0.042α=0.042.
A. neither direct flights nor layover flights
appear to be normal
B. Both direct flights and layover flights appear
to be normal
C. layover flights appear to be normal but direct
flights do not appear to be normal
D. direct flights appear to be normal but layover
flights do not appear to be normal
(b) Report the p-value of the test you ran in (a) concerning the
normality of first class flights, use at least two decimals in your
answer.
(c) Does there appear to be a negative difference in the general
price between business and first class flights?
A. I have too much information to answer this
question
B. I don't have enough information to answer this
question
C. Yes
D. No
(d) At what level of significance would you come to a different
conclusion? Please use at least four digits in your answer. Give a
decimal not a percentage.
Significance Level =
In order to solve this question I used R software.
R codes and output:
> non_stop=scan('clipboard')
Read 8 items
> non_stop
[1] 1664.03 1812.87 1496.77 1435.27 1630.48 1409.64 1566.82
1525.67
> one_stop=scan('clipboard')
Read 10 items
> one_stop
[1] 1440.20 1430.47 1542.10 1559.53 1543.10 1386.76 1682.94 1638.89
1414.73
[10] 2098.55
> shapiro.test(non_stop)
Shapiro-Wilk normality test
data: non_stop
W = 0.95407, p-value = 0.7521
> shapiro.test(one_stop)
Shapiro-Wilk normality test
data: one_stop
W = 0.78783, p-value = 0.01031
> t.test(non_stop,one_stop)
Welch Two Sample t-test
data: non_stop and one_stop
t = -0.07455, df = 15.338, p-value = 0.9415
alternative hypothesis: true difference in means is not equal to
0
95 percent confidence interval:
-178.1992 166.1327
sample estimates:
mean of x mean of y
1567.694 1573.727
Que.a
Layover flights appear to be normal but direct flights do not appear to be normal.
Que.b
p-value = 0.01031
Que.c
No.
P value for testing difference between two prices is 0.9415, which is greater than 0.05, hence we conclude that there does not exist statistically significant difference between mean prices.