联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Algorithm 算法作业Algorithm 算法作业

日期:2019-01-14 10:19

STA 138 Winter 2019

Homework 01 - Due Friday, January 18th

Book Portion (does not require R)

Note: This may be hand written or typed. Answers

should be clearly marked. Please put your name in

the upper right corner.

1. Each of 40 multiple choice questions on an exam has five

possible answers, where only one is correct. A particular

student chooses the strategy of selecting an answer

randomly.

(a) What is the distribution of total correct answers?

Specify the parameters of the distribution.

(b) What is the expected number of correct answers, and

the standard deviation of the number of correct answers?

(c) Calculate the interval that represents two standard

deviations from the mean.

(d) Would it be unusual for this student to score 50% or

more on the exam? Explain.

2. Continue with problem 1.

(a) Specify the distribution of ni

, where ni = the number

of times the student picked answer i, i = 1, 2, 3, 4, 5.

(b) Find the expected value and variance of ni

.

(c) What is the probability that the student picks each

choice exactly 8 times (8 (a)’s, 8 (b)’s, 8 (c)’s etc..).

(d) What is the correlation between n1 and n2?

3. Suppose that the probability of getting an A in a particular

course is 0.08, and assume that the all student grades

are independent. If you randomly sample 20 students

taking the course;

(a) Find the expected number of students that will get an

A, and the standard deviation of number of students

that will get an A.

(b) Find the probability that no student gets an A.

(c) Find the probability that at most 2 students get an

A.

(d) Find the probability that between 2 and 4 students

get an A (inclusive).

(e) If (in a different course), the probability that no students

out of 20 got an A was 0.1000, what was the

probability of a success? You may assume that all

students were independent, and the probability of

an A does not change.

4. In his autobiography A Sort of Life, British author Graham

Greene described a period of of severe mental depression

during which he played “Russian Roulette”.

This “game” consists of putting a bullet in one of six

chambers of a pistol, spinning the chambers to select one

at random, and then firing the bullet one at one’s head.

(a) Green played the game six times (resetting the chamber

every time) and none of them resulted in the bullet

firing. What was the probability of this outcome?

(b) What is the probability that, without resetting,

one could fire the gun 4 times in a row without the

bullet firing?

5. The scheduling manager for a certain hydro-power utility

company knows that there are an average of 12 emergency

calls regarding power failures per month. Assume

that a month consists of 30 days.

(a) Find the probability that the company will receive

exactly 10 emergency calls during a specified month.

(b) Find the probability that the company will receive

at least 1 emergency call in a given day.

(c) Suppose the utility company can handle a maximum

of 2 emergency calls per day. What is the probability

that there will be more emergency calls than the

company can handle on a given day?

(d) Find the expected number of calls per year, and the

standard deviation.

6. The marketing manager of a company has noted that she

usually receives 10 complaint calls from customers during

a week (assume a week has 7 days), and that the calls

are independent.

(a) Find the probability that she receives exactly 5 complaint

calls in one week.

(b) Find the probability that she receives at least 2 complaint

calls in one day.

(c) Find the expected number of complaint calls in one

month (assume a month has 30 days).

(d) If the rate of calls increases, would the probability in

(a) decrease or increase? Explain.

7. Suppose that a person invests in 6 stocks, each of which

has a 40% of having no return, a 40% chance of having

a positive return, and a 20% chance of having a negative

return. You may assume the stocks are independent, and

the probabilities do not change.

(a) Find the probability that 2 stocks have no return, 2

have a negative return, and 2 have a positive return.

(b) Find the probability that at least one stock has a

positive return.

(c) Find the expected value for each outcome, and the

standard deviation.

(d) What are the pairwise correlations between the different

counts (ni

’s)?

1

R Portion (requires some use of R)

Note: You do not have to use R Markdown to turn

in the homework, but the homework must be turned

in in a reasonable format. The answers to the questions

should be in the body of the homework, and

the code used to obtain those answers should be in

an appendix. There should be no code in the body of

the homework. You can accomplish this in R, Word,

LaTex, Google Docs, etc.

I. Online you will find the file “PHD.csv”. The csv file has

the following columns:

Column 1. Year: How many years it took the candidate

to graduate with a Ph.D

Column 2. Uni: Which university the subject studied at

(Berkeley, Columbia, Princeton).

Column 3. Res: Residency of subject (permanent,temporary)

Use this dataset in problems I, II, III.

Source: Espenshade, T.J. and Rodr′?guez, G. (1997).

Completing the Ph.D.: Comparative Performances of

U.S. and Foreign Students. Social Science Quarterly,

78:593-605.

(a) Find the average years to graduation for the three

schools. Which school had the highest average?

(b) Find the standard deviation of years to graduation

for the three schools. Which school had the lowest

deviation from the mean?

(c) Did temporary or permanent residents take longer

to graduate on average? Justify your answer.

(d) Find the five number summary of the number of

years it took to graduate. Do you believe the minimum

is an outlier? Justify your answer.

II. Continue with the “PHD.csv” dataset.

(a) Create a boxplot of years it took for the subjects

to graduate by residency. Do you believe there is a

significant difference between the groups? Explain.

(b) Create a histogram of years to graduate by school.

Which year had the most subjects in it for Princeton?

(c) Create a mosaic plot of residency and school.

Grouping by school, who had the highest proportion

of temporary residents?

(d) Create a mosaic plot of residency and school.

Grouping by residency, who had the highest probability

of going to Berkeley?

III. Continue with the “PHD.csv” dataset. For the following

problems, you must show results from either a plot, a table,

or an aggregate command to back up your answers.

(a) How may subjects were there attending Columbia?

(b) How different was each schools average time to graduate

compared to the overall average?

(c) Were there more people who attended Berkeley

and were temporary residents, or who attended

Columbia and were temporary residents (looking at

the absolute magnitude).

(d) If you were told a subject came from Princeton and

was a temporary resident, what would you estimate

their years to graduate to be (based on only summary

statistics and plots)? Note, if you want to

subset the data in some way but do not know how,

ask on Piazza.


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp