Lab Homework1
联系我们: 手动添加方式: 微信>添加朋友>企业微信联系人>13262280223 或者 QQ: 1483266981
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)


发表回复