In: Statistics and Probability
Data on 72 randomly selected flights departing from the three major NYC airports. Departure in minutes. Negative times represent early departures.
dep_delay |
-4 |
-3 |
58 |
-5 |
-5 |
-4 |
-1 |
-1 |
-1 |
-3 |
-5 |
-7 |
-5 |
-4 |
-5 |
-8 |
-2 |
4 |
-1 |
0 |
11 |
-5 |
37 |
22 |
65 |
6 |
-1 |
19 |
16 |
-5 |
178 |
-3 |
-5 |
4 |
-1 |
4 |
15 |
-3 |
-7 |
-6 |
-7 |
-3 |
-5 |
51 |
-4 |
-6 |
-1 |
-7 |
-11 |
2 |
1 |
102 |
-7 |
36 |
11 |
1 |
-6 |
-7 |
-5 |
-3 |
9 |
115 |
58 |
-2 |
-6 |
8 |
-4 |
-7 |
2 |
-5 |
303 |
18 |
Q. NYC airport management claim that the average departure delay times for flights that departed from major NYC airports in 2013 is less than 15 minutes. Test the claim at the 1% level of significance using the critical value approach. Show all working. (Hint: you need to obtain the sample statistics required from the data and state all values to two decimal places)
(a) We now wish to test if more than 30% of flights that departed from the NYC airports in 2013 are delayed. Use a p-value approach at the 10% level of significance. Show all working. (Hints: you need to obtain the sample statistic using the data and keep the value to three decimal places)
(b) Define a Type I error and explain it in the context of the hypothesis test in (a).
Solution: We need to test the average departure delay times for flights that departed from major NYC airports in 2013 is less than 15 minutes. Here we need to test for mean where population standard deviation is unknown. So we need to perform a one-sample t test.
i.e we need to test the null hypothesis H0:µ=15 vs the alternative H1:µ<15 ( claim that average less than 15)
where µ is the population mean of departure delay times
The test statistic is
t =√n* (Xbar-µ0)/s,
where, n is the sample size.
Xbar is the sample mean
μ0 is the hypothesized mean
s is the sample standard deviation
Here, n=72
Xbar=Mean=Σxi/n=13.33 (Using calculator)
s=SD=√{Σ(xi-xbar)^2/(n-1)}=46.54(Using calculator)
μ0=15
So The test statistic is:
t =√n* (Xbar-µ0)/s=√72*(13.33-15)/46.54= -0.30
The above test statistic follows a t distriution with (n-1) degrees of freedom i.e (72-1)=71 degrees of freedom.
Critical value:
The critical value of t for the left-tailed test =- t(0.01, df=71) = -2.38
Decision: Since,for the left-tailed test, t observed = -0.30 is > t critical = -2.38, we will fail to reject the null hypothesis at 1% level of significance.
Conclusion: There is not enough evidence to support the claim that the average departure delay times for flights that departed from major NYC airports in 2013 is less than 15 minutes.
(a) To test if more than 30% of flights i.e proportion=0.30 that departed from the NYC airports in 2013 are delayed we need to perform a proportion test for a single sample.
The hypotheses are :
H0: p=0.30 vs H1:p >0.30 (claim that more than 30% flights are delayed)
The test statistic is:
Z= (p^-p0)/√(p0(1-p0)/n)
where,
p^= sample proportion
p0 is the hypothesized proportion.
n is the sample size
Now, p^ is the proportion of delayed time flights i.e it is= The total numbers which are positive and greater than 0/ 72=27/72=0.375 (+ve no indicates the time delayed)
p0=0.30
n=72
The test statistic is:
Z= (p^-p0)/√(p0(1-p0)/n)
=(0.375-0.30)/√(0.30(1-0.30)/72)
=0.075/0.054
=1.389
P-Value:
For the right-tailed test p-value for Z=1.389 is:
P(Z>1.389)=1-0.9177=0.0823=0.082[From normal table]
The p-value=0.082 is < alpha=0.10
Decision: Reject the nul hypothesis at 10% level of significance.
Conclusion:There is enough evidence to support the claim that more than 30% of flights that departed from the NYC airports in 2013 are delayed.
(b) Type I error is the error that occurs when we reject the null hypothesis when it is actually true.
Probability of Type I error is alpha level.
So in (a) we have rejected the null hypothesis since p-value was less than the 10% level of significance. So for the above, the Probability of Type I error is 0.10.