关键词 > R代写

Lab Homework1

发布时间:2022-04-16

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


Lab  Homework1

Requirement:

1. Please upload the homework to iLearn, with your names, SID numbers and Session numbers.

 

2. You should submit a R file  and make sure the code runs well.

 

3. You may want to use the template to save some time. For Question 1, you need to replace  “##” with your own codes.

 

Note: You are very welcome to use R Markdown, but not required.

 

Q1:  There are 47 flights daily from Pittsburgh via US Airways into the Bradford Regional Airport in PA.

Suppose the probability that any flight arrives late is 0.5.

a) What is the probability that none/ 1 /2...47 of the flights will be  late today? Generate a list to store you answer and print the list. (2 point)

b) draw the probability distribution for the number of late flights (either scatter plot or bar graph is fine) (1 point)

c) what if there are 131 flights today and the probability that any flight arrives late is 0.15, generate a list of  probability distribution for all the possible outcomes and draw a graph. (2 points)