Question

In: Math

The table below shows performance data for 100 flights between cities A - G for some...

The table below shows performance data for 100 flights between cities A - G for some airline, including: date, flight #, origin, destination, # passengers flown (load), and tardiness (late, in hours).

write a VBA code (N=10000) to simulate the following:

1. (I7): number of flights which were late for at least 0.75 hrs.

2. (I10) average load of flights originated from C with load exceeding 250.

3. (I13): smallest tardiness of flights from B to E between 9/1/18 and 9/3/18.

4. (I16): total load of flights flown from A to C, D, and E on 9/4/18.

5. (I19): the flight # of the flight with the maximal load among all flights from A to G with tardiness less than 0.6 hrs.

Date Flight # From To Load Late
09/01/18 7136 C A 258 0.33
09/01/18 2770 G E 179 0.50
09/01/18 2368 A B 203 0.82
09/01/18 6690 G F 189 0.96
09/01/18 7553 A E 219 0.31
09/01/18 8323 G A 246 0.80
09/01/18 7381 D C 205 0.95
09/01/18 9008 B C 281 0.52
09/01/18 8664 A G 214 0.48
09/01/18 2826 G E 171 0.62
09/01/18 6641 C E 245 0.62
09/01/18 5402 A F 194 0.06
09/01/18 3184 A G 234 0.58
09/01/18 6806 B A 257 0.46
09/01/18 9117 D C 295 0.15
09/01/18 1259 E G 283 0.54
09/01/18 5543 B E 305 0.92
09/02/18 8008 A D 319 0.39
09/02/18 8556 A B 214 0.67
09/02/18 7559 D F 285 0.08
09/02/18 8068 C B 245 0.67
09/02/18 4717 E C 286 0.71
09/02/18 6325 F B 190 0.77
09/02/18 7037 A F 259 0.73
09/02/18 5623 D C 268 0.10
09/02/18 5431 F C 302 0.90
09/02/18 3347 C G 220 0.46
09/02/18 6860 F E 224 0.96
09/02/18 1640 C D 221 0.57
09/02/18 4486 D G 206 0.06
09/02/18 9696 A G 314 0.12
09/02/18 8081 G E 270 0.46
09/02/18 9974 G E 219 0.44
09/02/18 9724 B C 245 0.20
09/02/18 3443 B E 174 0.66
09/02/18 7582 B E 218 0.27
09/03/18 2634 G E 246 0.17
09/03/18 2617 B D 172 0.08
09/03/18 7589 E D 231 0.74
09/03/18 7545 D B 226 0.72
09/03/18 8667 E B 256 0.34
09/03/18 6576 B F 199 0.07
09/03/18 8485 C E 242 0.19
09/03/18 4958 D F 281 0.17
09/03/18 8681 F G 263 0.19
09/03/18 6224 C F 281 0.97
09/03/18 6110 B D 178 0.52
09/03/18 5971 D A 188 0.11
09/03/18 5822 B A 184 0.54
09/03/18 2075 D A 242 0.62
09/03/18 9603 A E 255 0.84
09/03/18 4909 D G 252 0.51
09/03/18 4495 A G 308 0.05
09/03/18 2861 D A 316 0.20
09/03/18 8728 A F 177 0.74
09/03/18 1327 B G 216 0.76
09/04/18 9191 A D 235 0.30
09/04/18 9239 E C 235 0.72
09/04/18 5160 E F 294 0.23
09/04/18 6930 E D 227 0.52
09/04/18 9500 F E 228 0.47
09/04/18 9861 D B 248 0.92
09/04/18 5956 D A 183 0.36
09/04/18 9071 A D 267 0.53
09/04/18 7290 E G 197 0.69
09/04/18 9086 A C 310 0.08
09/04/18 5870 D B 285 0.99
09/04/18 9595 B A 231 0.56
09/04/18 9609 D C 308 0.54
09/04/18 3446 C B 288 0.27
09/04/18 9011 G B 228 0.80
09/04/18 8651 G D 225 0.87
09/04/18 2771 F G 177 0.39
09/04/18 1360 B A 231 0.33
09/04/18 7293 G F 214 0.11
09/04/18 1412 G C 256 0.62
09/04/18 2659 A B 233 0.59
09/04/18 2847 E F 182 0.47
09/04/18 4691 D E 211 0.23
09/04/18 3392 E A 232 0.48
09/04/18 3245 C A 213 0.97
09/04/18 2691 E A 248 0.07
09/04/18 9582 G B 227 0.89
09/04/18 1591 G B 280 0.25
09/05/18 5674 B G 313 0.81
09/05/18 8560 E G 288 0.09
09/05/18 1428 D F 264 0.64
09/05/18 4483 C E 221 0.73
09/05/18 3652 G A 201 0.46
09/05/18 3474 A C 206 0.92
09/05/18 8309 F C 227 0.74
09/05/18 8774 B A 209 0.65
09/05/18 2887 A D 267 0.02
09/05/18 3499 D E 183 0.33
09/05/18 8134 C A 264 1.00
09/05/18 8516 E D 315 0.83
09/05/18 7388 C B 251 0.92
09/05/18 9037 E C 319 0.45
09/05/18 1120 E C 274 0.40
09/05/18 5919 B F 254 0.65

Solutions

Expert Solution

please find the answer using ms-excel sort tools in Data Tab,

1. (I7): number of flights which were late for at least 0.75 hrs.

answer: 21

s.n. Date Flight # From To Load Late
1 9/3/2018 1327 B G 216 0.76
2 9/2/2018 6325 F B 190 0.77
3 9/1/2018 8323 G A 246 0.8
4 9/4/2018 9011 G B 228 0.8
5 9/5/2018 5674 B G 313 0.81
6 9/1/2018 2368 A B 203 0.82
7 9/5/2018 8516 E D 315 0.83
8 9/3/2018 9603 A E 255 0.84
9 9/4/2018 8651 G D 225 0.87
10 9/4/2018 9582 G B 227 0.89
11 9/2/2018 5431 F C 302 0.9
12 9/5/2018 3474 A C 206 0.92
13 9/1/2018 5543 B E 305 0.92
14 9/5/2018 7388 C B 251 0.92
15 9/4/2018 9861 D B 248 0.92
16 9/1/2018 7381 D C 205 0.95
17 9/2/2018 6860 F E 224 0.96
18 9/1/2018 6690 G F 189 0.96
19 9/3/2018 6224 C F 281 0.97
20 9/4/2018 3245 C A 213 0.97
21 9/4/2018 5870 D B 285 0.99

2. (I10) average load of flights originated from C with load exceeding 250.

answer:5

From To Load
C A 213
C G 220
C D 221
C E 221
C E 242
C E 245
C B 245
C B 251
C A 258
C A 264
C F 281
C B 288

3. (I13): smallest tardiness of flights from B to E between 9/1/18 and 9/3/18.

answer: 0.27

Date Flight # From To Load Late
9/1/2018 6806 B A 257 0.46
9/3/2018 5822 B A 184 0.54
9/1/2018 9008 B C 281 0.52
9/2/2018 9724 B C 245 0.2
9/3/2018 2617 B D 172 0.08
9/3/2018 6110 B D 178 0.52
9/1/2018 5543 B E 305 0.92
9/2/2018 7582 B E 218 0.27
9/2/2018 3443 B E 174 0.66
9/3/2018 6576 B F 199 0.07
9/3/2018 1327 B G 216 0.76

4. (I16): total load of flights flown from A to C, D, and E on 9/4/18.

Answer=310+235+267=812

Date Flight # From To Load Late
9/4/2018 9086 A C 310 0.08
9/4/2018 9191 A D 235 0.3
9/4/2018 9071 A D 267 0.53

5. (I19): the flight # of the flight with the maximal load among all flights from A to G with tardiness less than 0.6 hrs.

answer:314

Date Flight # From To Load Late
9/1/2018 8664 A G 214 0.48
9/1/2018 3184 A G 234 0.58
9/2/2018 9696 A G 314 0.12
9/3/2018 4495 A G 308 0.05

Related Solutions

Listed below are costs​ (in dollars) of roundtrip flights between two cities. All flights involve one...
Listed below are costs​ (in dollars) of roundtrip flights between two cities. All flights involve one stop and a​ two-week stay. Find the coefficient of variation for each of the two sets of​ data, then compare the variation 30 days in advance: 246 247 317 263 269 275 297 1 day in advance: 455 627 554 991 627 1015 566 1. The coefficient of variation for the prices of tickets purchased 30 days in advance is __% (round to one...
Listed below are costs​ (in dollars) of roundtrip flights between two cities. All flights involve one...
Listed below are costs​ (in dollars) of roundtrip flights between two cities. All flights involve one stop and a​ two-week stay. Find the coefficient of variation for each of the two sets of​ data, then compare the variation. 30 days in advance: 266 292 273 252 278 291 314 One day in advance: 455 615 555 964 615 1050 540 1. The coefficient of variation for the prices of tickets purchased 30 days in advance is % 2. The coefficient...
The table below shows a measure of the “liberalness” of various American cities and a measure...
The table below shows a measure of the “liberalness” of various American cities and a measure of the corresponding asking price per square foot for housing. Liberalness 1 0 6 7 10 15 16 19 22 25 26 30 Price 2 3 2 2 0 7 6 8 7 8 4 16 Enter the slope and y-intercept of the regression line, using liberalness as the independent variable. Round your answers to two decimal places. Slope:         Intercept: Enter the correlation coefficient and...
The data in the table below shows the ages of a group of people in a...
The data in the table below shows the ages of a group of people in a certain community. 47 31 42 33 58 51 25 28 62 29 65 46 51 30 43 72 73 37 29 39 53 61 52 35 a. Construct an ordered stem-and-leaf diagram to represent the above data set. b. Find the mean of the bonuses. c. Find the median of the bonuses. d. Find the mean absolute deviation. e. Find the variance and standard...
1. The table shows the performance of a selection of 100 stocks after one year. (Take...
1. The table shows the performance of a selection of 100 stocks after one year. (Take S to be the set of all stocks represented in the table. If a stock stayed within 20% of its original value, it is classified as "unchanged".) Companies Total Pharmaceutical P Electronic E Internet I Increased V 10 3 6 19 Unchanged N 9 12 12 33 Decreased D 10 3 7 20 Total 29 18 25 72 Use symbols to describe the event...
Consider the following reaction A(g) + B(g) --> AB(l) The table shows the data for [A]...
Consider the following reaction A(g) + B(g) --> AB(l) The table shows the data for [A] vs time. Tell me the order of the reaction with respect to A. Provide a plot(graph) that supports your answer. Give me the value of the rate constant with the appropriate units. time (sec) [A], M 0 100 10 82 20 68 30 55 40 43 50 35 60 27
The data table below shows the number of computers sold at the Bronco Store in a...
The data table below shows the number of computers sold at the Bronco Store in a week, based on online advertising. Online Ads              Computers Sold 2                             25       1                             10 4                             30 1                             10 Sx = 10 2                             25 Sy = 100 a. Calculate the means for both Ads and Computers Sold. b. Calculate the slope for the estimated regression equation. The (x-x)(y-y) = 40, just need to calculate denominator.    c. Calculate the y-intercept for the estimated regression equation.   ...
The table below shows data on population and expenditures in five countries, as well as the...
The table below shows data on population and expenditures in five countries, as well as the value of home production, the underground economy, and environmental externalities in each. Note all figures are expressed in millions of dollars.     a. Calculate GDP and GDP per capita in each country.     b. Calculate the size of home production, the underground economy, and environmental externalities in each country as a percentage of GDP.     c. Calculate total and per capita “GDP plus” in each country by...
CH4(g) + Cl2(g)  CH2Cl2(g) + 2 HCl(g) Use the data in the table below to...
CH4(g) + Cl2(g)  CH2Cl2(g) + 2 HCl(g) Use the data in the table below to calculate the standard enthalpy, ∆H˚, for the reaction above. Substance CH4(g) CH2Cl2(g) HCl(g) ∆Hf˚, kJ•mol-1 –74.6 –95.4 –92.3
The table given below shows four aspects of product performance that customers seek in commercial scanners....
The table given below shows four aspects of product performance that customers seek in commercial scanners. The product performance ratings are shown for PrintWorth Inc., an American firm that manufactures commercial scanners, and three of its competitors, A, B & C. Product Performance Attributes Relative Importance of PrintWorth Inc. Business Rating Competitor A Competitor B Competitor C Machine Uptime 20 7 2 4 3 Print Speed 30 9 5 5 8 Image Quality 40 6 6 5 6 Ease of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT