Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Applied Statistics Expert

1. This question concerns the use of R to address mathematical questions. For each problem below include your code in the report as well as answering the questions posed.

(a) The following R code generates a function which checks whether a positive integer under 500 000 000 is a cube number (i.e. a number for which the cube root is also an integer).

cubetest<-function(x){
b<-round(x^(1/3),digits=6)
if(b 1==0){return("Cube number")
} else {
return("Not a cube number")
}
}

(i) Why might the function round be necessary? (HINT: different versions of R operate differently, as you saw in Practical 1.)

(ii) Write a function which has as its input a vector where each element is a positive integer below 500 000 000, and which returns each element of the input vector which is a cube number.

Fermat's last theorem suggests, in part, that there are no positive integer solutions to the equation X3 + Y 3 = Z3. In other words, if
X, Y, Z ∈ Z+, X3 + Y 3 = Z3 is never true.

(iii) Write a function with two inputs X and Y that can tell you whether the sum of X3 and Y 3 is a cube number so long as that sum is under 500 000 000.

(iv) By using the functions you have already written, or otherwise, write code that proves that if X ∈ {1, . . . , 100} and Y ∈ {1, . . . , 100}, there is no Z ∈ Z for which X3 + Y 3 = Z3.

(b) Constructive criticism is possible even here. Identify up to three weaknesses in the code you have wrtitten for part (a), and suggest a possible improvement. You do not need to explain exactly how such a solution would be coded. Consider, for instance, efficiency (could the same information be obtained with less computation) and robustness (could things go wrong, and how might these difficulties be avoided?)

2. Carl the clinician acquires data on the number of people who suffered se- vere trauma in forest fires in the West Midlands in the years 1995 and 2015. This data is available in the file AP1Data.csv which can be down- loaded at the ST104 webpage. Download this data and enter it into R. There are 52 data points for each year, each data point gives the number of people who suffered severe trauma due to a forest fire in the West Mid- lands during that week. The first week is 1st-7th January, the 52nd week is 24th-30th December, with figures for the 31st December not recorded.

(a) Calculate a location statistic and a scale statistic for the 1995 data and the 2015 data, justifying your choice of location statistic and scale statistic in each case.

(b) Represent this data with a graph or graphs, justifying your choice of graph type.

(c) A newspaper article based on the data Carl collected makes the fol- lowing two claims:

(i) The number of cases of severe trauma due to forest fires in the West Midlands has increased between 1995 and 2015.

(ii) This increase is due to global warming making forests warmer and more dry, and so more suspectible to catching fire.
Comment critically on whether either of these statements is sup- ported by the data, giving reasons.

(d) A statistician studying the data suggests the 1995 data and the 2015 data might be distributed according to an unusual distribution. This distribution is a combination of a Bernoulli distribution, X ∼ Ber(p) and a normal distribution, Y ∼ N (µ, σ2). The random variable Z
for the combined distribution behaves as follows:

(X = 1) ⇒ Z ∼ Y
(X = 0) ⇒ Z = 0

In other words Z is normally distributed each time X = 1, and Z = 0 each time X = 0. The statistician suggests the values of p, µ and σ for the year 1995 might be different to the equivalent values for the year 2015.

(i) Estimate the value of p for 1995, and for 2015.

(ii) Comment critically on whether the data for either year has the shape you would expect for data drawn from this distribution.

3. A regular user of the phone banking facilities at Freedonia National Bank sends in a complaint to say that this phone banking facility has become much worse in recent weeks compared to how it used to be. To support his objection the customer attaches data he has compiled regarding how long it took the bank to answer his calls in January 2016 compared to how long it took them to answer his calls during 2015.

Each data point represents a single phone call, and gives the time it took for the customer to speak to a customer service operator. The data can be found in the PhoneBanking.xlsx file at the ST104 website. Enter this data into R.

(a) Produce a figure containing two boxplots which allows you to com- pare the distribution of marks within each group.

(b) Comment on any features of the distributions which you can see from your plot or from any appropriate statistics you decide to calculate. Provide possible explanations for any interesting features.

(c) Based upon this preliminary analysis, to what extent do you think the data supports the customer's view?

(d) Comment critically upon all parts of this analysis. You may wish to consider the following points (among others):

• Are there any potential issues with the data itself?
• How appropriate are the plots used here?
• What weaknesses does what has been done here suffer from?
• What would you do differently if given the opportunity to answer this question using more/different data?

Applied Statistics, Statistics

  • Category:- Applied Statistics
  • Reference No.:- M91709646
  • Price:- $45

Guranteed 36 Hours Delivery, In Price:- $45

Have any Question?


Related Questions in Applied Statistics

Question onea a factory manager claims that workers at

QUESTION ONE (a) A factory manager claims that workers at plant A are faster than those at plant B. To test the claim, a random sample of times (in minutes) taken to complete a given task was taken from each of the plant ...

Assignment -in this assignment ms excel must be used to

Assignment - In this assignment MS Excel must be used to perform any calculations/graphical presentations as required in this assignment. Question 1 - Below you are given the examination scores of 20 students (data set a ...

Assessment task -you become interested in the non-skeletal

Assessment Task - You become interested in the non-skeletal effects of vitamin D and review the literature. On the basis of your reading you find that there is some evidence to suggest that vitamin D deficiency is linked ...

Business data analysis facts from figures assignment

BUSINESS DATA ANALYSIS: FACTS FROM FIGURES Assignment - Question 1 - Private capital expenditure for 12 successive quarters are presented in the following table: Quarter Millions     1 31,920 2 25,120 3 30,350 4 24,650 5 ...

Applied statistics homework project -download the data

Applied Statistics Homework Project - Download the data twoGenes.sav from the Week Four content area of brightspace. Each row represents data from a different sample of yeast RNA expression. The data represent the log2 f ...

Question 1 for the prostate data set fit a model with lpsa

Question 1. For the prostate data set, fit a model with lpsa as the response, and the other variables as predictors. (a) Suppose a new patient with the following values arrives: lcavol = 1.45000, lweight = 3.59801, age = ...

Business analytics and statistics research report

Business Analytics and Statistics Research Report Assignment - This assignment is based on fictional data - do not contact the company listed below. You are creating a business report for the CEO of a retail company call ...

Assignment -for each of the prompts below report the

Assignment - For each of the prompts below, report the appropriate degrees of freedom, t statistic, p-value and plot using the statistical software platform of your choice (R/STATA) 1) A sample of 12 men and 14 women hav ...

Assignment -in this assignment ms excel must be used to

Assignment - In this assignment MS Excel must be used to perform any calculations/graphical presentations as required in this assignment. Question 1 - Below you are given the examination scores of 20 students (data set a ...

Go to the website of ahrqs website titled advances in

Go to the website of AHRQ's website titled Advances in Patient Safety: From Research to Implementation located in the Webliography and select a specific research article. Bring back to the class, at minimum, the followin ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As