Western Michigan University Healthcare Data Analytics Questions

Problem 1.  Use plot(density()) to examine the smooth estimated density function (PDF) for variable hp (horsepower) in data frame mtcars.

–Use attach(mtcars) so you can refer to hp

How many peaks (0, 1, 2, 3, or more) does the estimated PDF for hp have?

(Answer in the numerical form e.g., 4)

Group of answer choices

1

Question 2

Problem 2. Create a stem-and-leaf diagram for variable mpg in data frame mtcars, and use it to answer the following question:

How many stems (rows) are there?  

How many cars belong to the second stem?  

–Example:  for stem(eruptions), there are 18 stems (rows). 

–5 eruptions belong to the 5th stem:  24 | 00228

–The corresponding data values are: 2.400 2.400 2.417 2.417 2.483

Can view these values using sort(eruptions)

Question 3

Problem 3. Fit a normal distribution to the variable hp in mtcars (i.e., estimate the parameters of the normal distribution by MLE).

–Use fitdist() in package fitdistrplus

What is the estimated standard deviation of the best-fitting (MLE) normal distribution?

–For mpg, it was sd* = 5.93203

(Answer up to 5 decimal places)

Question 4

Problem 4. Fit an exponential distribution to mtcars$hp by MLE using fitdist() in package fitdistrplus.

–First, use attach(mtcars) or data(mtcars) 

–Then use library(fitdistrplus)

  • First install fitdistrplus package with install.packages("fitdistrplus")

–Use the fitdist() function, with "exp" (with the quotes) as an argument, to tell fitdistrplus to fit an exponential distribution

–Name the result so you can plot it with denscomp()

Plot fitted distribution using denscomp()

The exponential distribution has a single parameter (“rate”).  What is the MLE estimate of rate for variable hp?

–Use print(fit_name) to see, where fit_name is whatever you named your fitsdist() result

–Ignore the standard error

(Answer up to 4 decimal places)

Question 5

Problem 5. Use kstest() to decide whether the null hypothesis that variable hp in the mtcars data frame has an exponential distribution can be rejected with 95% confidence. 

–Remember to attach(mtcars)

–Remember to use set.seed(1)

–Then use ks.test(hp, rexp(100, rate = )) as a template for your test of whether hp and the best-fitting exponential distributions have significantly different CDFs

–Plug the MLE value for rate (from your previous results from fitdist() for hp) into the above template

  • What is the p-value for this hypothesis test?
  • What should we conclude? 

(Please input the p-value in the answer tab up to 5 decimal places)

Question 6

Problem 6. Use shapiro.test() to decide whether we can reject with 95% confidence (a = 5% significance level) the null hypothesis that variable hp in the mtcars data frame has a normal distribution.

  • What is the p-value for this hypothesis test?

–For mpg, it is 0.1229.  What is it for hp? 

–Remember that we reject a null hypothesis at significance level a (confidence level 1- a) if the p-value (tail area) of the test < a.

(Answer up to 4 decimal places)

Question 7

Problem 7.  Using plot(density()), do you think the Age variable in the survey data set in package MASS is left-skewed, right-skewed, or neither?

(Please input left-skewed, right-skewed, or neither in the answer tab)

Question 8

Problem 8. Using boxplot(), how many outliers do you see for variable Pulse in the survey data set in package MASS?

–Remember to load MASS using library(MASS) before using attach(survey) or survey$Pulse

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more