联系方式

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

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

日期:2019-08-20 10:35

AUT: STAT600 Probability S2, 2019 Assignment 2

STAT600 Probability

Semester 2, 2019

Assignment 2

Instructions

Due date: Submit to Blackboard by Friday 23rd August 2019, 11pm

This assignment is worth 10% of your final grade and will be marked out of 100 marks.

Submission requirements

– Your submission should contain relevant explanations, mathematical notation, workings,

and R code/output. Answers which do not include appropriate notation and/or workings,

or conversely include too many irrelevant details will be penalised. Units of measurement

should be included with your answers where relevant (e.g. $, kg).

– Assignments should be submitted as a single PDF or HTML file.

– Your assignment file should include the Individual Assignment Coversheet:

Blackboard/ Assessment Policies, Regulations, Guides and Forms/ Forms and Coversheets/

Individual Assignment Coversheet

– Use of RMarkdown is recommended for this assignment as it allows you to incorporate R

code and mathematical symbols in the same document. If you use RMarkdown, compile to

either PDF or HMTL and submit this file as well as the Rmd file. The Rmd file will not be

marked but should be included in your submission for completeness.

– If you are using Word or a similar software to complete this assignment, code should be in a

fixed-width font such as Courier New. If you use Word, save your file as a PDF file and

submit the PDF file to Blackboard.

– Where you need use R, the code and output should be provided in the file submitted. Note,

the code should not be included as an image or screenshot.

– Handwritten answers may be appropriate for some questions. These should be scanned and

included in the Word or Rmd file. Ensure that the scanned images are of sufficiently high

quality that they can be easily read when printed.

Questions marked “bonus” are optional and may require additional self-study. The maximum

mark awarded for this assignment will be 100%.

Late Assignments: Failure to submit the assignment on time will result in a penalty in accordance

with the policy outlined in the STAT600 Study Guide. Note that late assignments will only be

accepted until the 11pm on Monday 26th August so that solutions can be released prior to the

mid-semester test. Assignments submitted after this time will receive a mark of 0 unless a special

consideration application is approved.

Special Consideration: If extenuating circumstances (e.g. illness) prevent the timely submission

of your assignment you can apply for special consideration. You may also apply for special consideration

if such circumstances result in your submission being incomplete. Applications for special consideration

should be submitted via Blackboard.

Originality: This assignment is an individual piece of work. You are encouraged to discuss the

assignment with your lecturers and classmates, however, the work you submit must be your own.

Assignments that show similarities to work submitted by other students will be investigated for

plagiarism and treated very seriously. Plagiarism software, such as TurnItIn, may be used to electronically

compare submissions to those of other students and to documents on the internet.

Question: 1 2 3 4 Total

Marks: 20 20 28 32 100

Score:

Page 1 of 3 V: 9th August 2019

AUT: STAT600 Probability S2, 2019 Assignment 2

1. Jade is renovating his bathroom and as part of the renovations a plumber is required to install a new

shower. The budget for this part of the renovations is $1000. An industry expert has told Jade that

the probability that a randomly selected plumber in Auckland will be able to do the job for $1000 or

less is 0.55, and that a list of plumbers located in Auckland is available from the Plumbers, Gasfitters

and Drainlayers Board website. There are a very large number of plumbers in Auckland.

Total for Question 1: 20 marks

(a) Suppose that Jade randomly selects 10 plumbers from the list of Auckland plumbers. What is (4 marks)

the probability that exactly 2 plumbers will be able to install the new shower for $1000 or less?

Answer this question using the appropriate mathematical formula. Do not use an R probability

function.

(b) What is the probability that Jade will have to call at least 4 plumbers to find one that can do the (4 marks)

job for $1000 or less?

Answer this question using the appropriate mathematical formula. Do not use an R probability

function.

(c) What is the expected number of calls that Jade will have to make to find a plumber who can do (4 marks)

the job for $1000 or less? What is the variance of the number of calls?

(d) Of the plumbers that will install the shower for $1000 or less, the cost of the job (in dollars) has (4 marks)

a uniform distribution on the interval (450, 1000). What is the expected value and variance for

the cost of installing the shower?

(e) Suppose that Jade wants to select a plumber close to where he lives. Within his suburb there are (4 marks)

10 plumbers available and of these, 6 would do the job for $1000 or less. What is the probability

that Jade will have to call exactly 4 plumbers before finding one who will do the job for $1000 or

less? (i.e. the 4th plumber called will do the job).

2. Consider a continuous random variable X with probability density function given by:

where a ∈ R is a constant.

Total for Question 2: 20 marks

(a) For which values of a will f (x) be a valid probability density function? (4 marks)

(b) Determine E[X]. (4 marks)

(c) Determine VAR[X]. (4 marks)

(d) The median m of a continuous random variable X with cumulative distribution function F(x) (4 marks)

is that value of m such that F(m) = P(X ≤ m) = 0.5. Find the median of the random variable X.

(e) Suppose a = 0. Verify your answers to parts (b)-(d) using simulation. Provide a brief explanation (4 marks)

comparing your simulated answers with your theoretical ones.

Hint: Use the inverse transformation method.

(f ) Write some R code to verify your answers to parts (b)-(d) using simulation for any value of a in (4 (bonus))

the interval obtained in part (a). Demonstrate your code using 2 different non-zero values of a.

Page 2 of 3 V: 9th August 2019

AUT: STAT600 Probability S2, 2019 Assignment 2

3. New Zealand experiences a large number of earthquakes every year, however only those which

are shallow and/or of a high magnitude are felt by the general public. A scientist is interested in

the number of earthquakes which occur in New Zealand which have a depth of less than 50km

and a magnitude of more than 4 on the Richter scale.1 The findings have shown that this type

of earthquake occurs at a rate of approximately 1.19 per day, and that the number of earthquakes

occurring per day is well-modelled by a Poisson random variable.

Total for Question 3: 28 marks

(a) Use R to plot the cumulative distribution function of the number of earthquakes of this type (4 marks)

which occur in New Zealand on a given day.

Your plot should be labelled, cover an appropriate range of values and use a step-function.

(b) What is the probability that exactly 1 earthquake of this type will occur in New Zealand on a (4 marks)

given day?

Compute the probability in two ways, using:

the relevant mathematical formula and

an R probability function.

(c) What is the probability that exactly 400 earthquakes of this type will occur in New Zealand in a (4 marks)

given year (365 days)?

Compute the probability in two ways, using:

the relevant mathematical formula and

an R probability function.

(d) What is the expected number of earthquakes of this type that occur in New Zealand in a given (4 marks)

year?

(e) What is the probability that between 400 and 500 (inclusive) (4 marks)

2

earthquakes of this type occur in

New Zealand in a given year?

Compute using R and include appropriate mathematical notation as part of your answer.

(f ) Verify your answers to parts (b) – (e) using simulation with rpois. Use at least 1×10 (8 marks)

5

simulations.

Provide a brief explanation comparing your simulated answers with your theoretical ones.

(g) Verify your answer to part (a) using the data simulated in part (f ). (4 (bonus))

Hint: you will need to find an appropriate plot to represent the CDF of your empirical data.

4. The life time X of a component, costing $1000, is modelled using an exponential distribution with

a mean of 5 years. If the component fails during the first year, the manufacturer agrees to give a full

refund. If the component fails during the second year, the manufacturer agrees to give a 50% refund.

If the component fails after the second year, but before the fifth year the manufacturer agrees to give

a 10% refund.

Total for Question 4: 32 marks

(a) What is the probability that the component lasts more than 1 year? (4 marks)

(b) What is the probability that the component lasts between 2 years and 5 years? (4 marks)

(c) A particular component has already lasted 1 year. What is the probability that it will last at least (4 marks)

5 years, given it has already lasted 1 year?

(d) Use R to plot the probability density function of X over the range of 0 to 50 years. (4 marks)

(e) If the manufacturer sells one component, what should they expect to pay in refunds? (4 marks)

(f ) If the manufacturer sells 1000 components, what should they expect to pay in refunds? (2 marks)

(g) Verify your answers to parts (a)-(e) using simulation with rexp. Use at least 1×10 (10 marks)

5

simulations.

Provide a brief explanation comparing your simulated answers with your theoretical ones.

1Data obtained from https://quakesearch.geonet.org.nz/

2This means 400, 401, 402,..., 499, 500

Page 3 of 3 V: 9th August 2019


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

python代写
微信客服:codinghelp