Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Statistics 2120: Introduction to Statistical Analysis

Homework 1

Instructions:

  Be sure to provide your full name and computing ID at the top of your work.

  Write out the Honor Pledge under your name and computing ID:  “On my honor, I did not give nor receive aid on this assignment beyond the listed collaboration.”

  List the names of students with whom you collaborated under the Honor Pledge.   If you  did not collaborate, write ‘None’ .

  Respond to each problem below thoroughly, showing all relevant work.

  Use Python for all calculations. Include a screen shot showing relevant code and output for each part using Python.

  Save your completed work as a PDF and upload it to Gradescope.  Be sure to select the appropriate page(s) for each answer. Unselected work will not be graded.

Problems:

1.  The U.S. Department of Transportation’s (DOT) Bureau of Transportation Statistics (BTS) tracks the on-time performance of domestic flights operated by large air carriers.   Download the  le De- layedFlights IAD.csv  from Collab, which contains information about flights operated by domestic air carriers that originate from Washington Dulles International Airport (IAD) during January to June of 2008. The data include the following variables:

  Month:  1 to 6.

  DayofMonth:  1 to 31.

  DayOfWeek:  1 to 7 (Monday to Sunday).

  DepTime: actual departure time (local).

  CRSDepTime: scheduled departure time (local).

  ArrTime: actual arrival time (local).

  CRSArrTime: scheduled arrival time (local).

  Airline: airline company.

  AirTime: time flight in air (in mins).

  ArrDelay: arrival delay (in mins).

  DepDelay: departure delay (in mins).

  Dest: destination airport code.    Distance: distance in miles.

  TaxiIn: taxi in time (in mins).

  TaxiOut: taxi out time (in mins).

As air-travelers are mostly concerned with whether their flights arrive on time, the analysis will focus on arrival delay.

NOTE: These responses will be used for future assignments, so it is in your best interest to save your work.

1. Who or what are the cases or observations in this dataset?

2. Which of these variables is of interest? Is it categorical or quantitative?

3. What are the minimum and maximum values for the variable describing arrival delay? What do you think a negative number represents in this context? How do you think arrival delay was calculated?

4. What is the minimum value for the variable describing departure delay? What do you think aneg- ative number represents in this context? What does the minimum value imply about departures from IAD?

5. Without creating any graphical or numerical summaries, do you expect the variable describing arrival delay to be symmetric, right-skewed, or left-skewed? Briefly explain.

6. Do you expect the variable describing departure delay to have a similar or di↵erent shape? Briefly explain.

7. Obtain the following numerical summaries (rounded to 2 decimal places) for arrival delay: sample mean, sample standard deviation, and the 5 number summary.

Note: As this is a fairly large dataset, use Python to determine the five number summary values. 8. Do the mean and median of arrival delays support the shape of distribution that you specified in

part 5.? Briefly explain.

9. Create the boxplot for arrival delay.

10. Based solely on the boxplot created in part 9. and the five number summary created in part 7., determine whether each of the following statements is true or false. If false, briefly explain why.

i. There are several flights that have very long delays.

ii. More than 25% of flights are either exactly on time or arrive early.

iii. About 50% of flights are delayed between 13 and 35 minutes.

iv. About 25% of flights are delayed by more than 78 minutes.

11. Is the mean or median a better measure of center for arrival delays? Briefly explain.

12. The side-by-side boxplots for arrival delay to compare the various airlines are displayed below. If you are a prospective air-traveler and are deciding which airline to use based on arrival delays, is there a clear choice based solely on this set of boxplots? Briefly explain.

 

2.  Below is a set of share prices (in dollars) for a particular stock at the end of each week, based on the past number of weeks:

184, 224, 207, 193, 224, 213, 181, 193, 190, 219, 209, 185, 193, 209, 205, 223, 181, 194

1.  Using the by-hand approach, derive the five number summary for these values.

Note: You may want to use Python to sort the data and identify the relevant locations. 2.  Based on the 1.5 x IQR rule, are there any outliers in this set of data?

3.  The length of human pregnancies from conception to birth varies according to a distribution that is approximately Normal with mean 266 days and standard deviation 16 days.

Note:   Leave  responses  that  are  proportions  as  decimals  rounded  to  4  places.   Do  not  state  as  a percentage. Round days to whole numbers.

1. What proportion of pregnancies do not last to term (249 days - about 8 months)?

2. What proportion of pregnancies end between term and full term (249 and 280 days - about 8 and 9 months)?

3.  How many days do the shortest 20% of pregnancies last?

4.  How many days do the longest 2% of pregnancies last?

5. What range contains the:

i.  middle 68% of pregnancy lengths?

ii.  middle 95% of pregnancy lengths?

iii.  middle 99.7% of pregnancy lengths?

HW1

Jessica Xiong (pqf6rd)

“On my honor, I did not give nor receive aid on this assignment beyond the listed collaboration.”

Problem 1:

1. Air-travelers are the cases and arrival delays are the observations of the dataset.

2. The variables that are of interest are TaxiIn and TaxiOut. They are quantitative variables.

3. The maximum value is 855 and minimum value is -55 for the variable arrival delay. A negative value means that the flight was not delayed. In this case, a value of -55 means the flight arrived 55 minutes early. Arrival delay is calculated by actual arrival time (local) - scheduled arrival time (local).

 

4.  The minimum value of departure delay is 6. In this case, a negative value represents the flight departed earlier than expected. This minimum value implys that flights from IAD would delay at least 6 minutes. More often, the flights are going to delay more than 6 minutes.

 

5. I will expect the variable describing arrival delay to be right-skewed. This is because cases of long delays are not as frequent, and most delays are located at the left part of the graph.

6. I expect the departure delay variable has a similar shape as cases of long delays are not as frequent. Same as the previous question, most delays are located at the left part of the graph.

7. Median = 35.0, Standard Deviation = 64.55, Max = 855, Min = -55, Mean = 55.92, Q1 = 13.0, Q3 = 78.0, IQR = 65.0

 

8. The mean and the median support the right skewed shape of distribution as  I specified in question 5. This is because for a right skewed density curve, the mean is larger than the median.

9.

 

10.

(i) True

(ii) False. Since the lower quantile is 13, this means 75% of the flights are more than 13 minutes late.

(iii) True

(iv) True

11. The median is a better measure compared to the mean. For data from skewed distributions, the median is better than the mean because it isn't influenced by extremely large values.

12. There is no clear choice based solely on this set of boxplots. The lowest median and IQR are presented in delta airline, however, delta still has cases that flights being delayed for a very long time.

Problem 2:

1. Min = 181, Max = 224, Standard deviation = 14.71, Mean = 201.5, Median = 199.5, Q1 = 190.75, Q3 = 212.0, IQR=21.25

 

2. By computing the 1.5 IQR rule, we can get a lower bond of 158.875 and a higher bond of 180.125. Since there are no numbers below 158.875 in this series, those numbers that are higher than 180.125 are considered as outliers.

Problem 3:

1. About 14.4 percent of pregnancies do not last to 249 days.

 

2. About 66.52 pregnancies end between term and full term.

 

3. The shortest 20% of pregnancies last for 253 days.

 

4. The longest 2% of pregnancies last for 299 days.

 

5. Since mean = 266, SD = 16, by using the 68-95-99.7 rule,

1)The middle 68% of a normal distribution lies within one standard deviation on each side of the mean. The middle 68% of pregnancy lengths is between 250 and 282 days.

2)The middle 95% of a normal distribution lies within approximately two standard deviations on each side of the mean. The middle 95% of pregnancy lengths is between 234 and 298 days.

3)The middle 99.7% of a normal distribution lies within approximately three standard deviations on each side of the mean. The middle 99.7% of pregnancy lengths is between 218 and 314 days.