Let us worry about your assignment instead!

We Helped With This R Language Programming Assignment: Have A Similar One?

SOLVED
CategoryProgramming
SubjectR | R Studio
DifficultyCollege
StatusSolved
More InfoStatistics Homework Help Online
85081

Short Assignment Requirements

Please follow what is in the file. Do not write a paragraph for answering the question. just short answers along with coding.

Assignment Description

 

IE 200: Engineering Statistics

Computing Assignment 3

 

1.  Recall the following question from our lecture:

A laboratory blood test is 95% effective in detecting a certain disease when it is, in fact, present. However, the test also yields a “false positive” result for 1% of the healthy people tested. (That is, if a healthy person is tested, then, with probability 0.01, the test will imply he or she has the disease.) If 0.5% of the population actually has the disease, what is the probability a person has the disease given that the test result is positive?

a)      Write a function that gives the probability of interest for the given rates of false positive, effectiveness and disease prevalence. Test your function to make sure that you get the correct probability as we calculated in class, i.e., 0.32.

myprob<-function(a,b,c) # This is the function that will calculate the probability of interest

{

  (a*b)/((a*b)+(c*(1-b)))   

}

answer1 <-myprob(a=0.95,b=0.005,c=0.01) # We use the function to find the answer

 

b)      Use the function in part (a) to plot the probability of interest for prevalence levels 0—0.5, with the granularity (i.e., step size) of 0.001. Use the command plot and draw a line by setting type="l".

What can you say about the probability of interest at different prevalence levels? Comment on your observation.

c)       Additional to the plot from part (b), add two lines of two different colors corresponding to the probability of interest when:

1.       The effectiveness is 97.5% (i.e., its original 5% error rate is reduced by 50%).

2.       The false positive rate is reduced by 50% to 0.5%.

You can use the command lines. Color line (1) in red and color line (2) in blue.

Which approach is more effective in improving the probability of interest for a low prevalence disease, (1) or (2) in part c above?

 

2. Consider problem 5 from HW 5.

A shipment of 7 television sets contains 2 defective sets. A hotel makes a random purchase of 3 of the sets. If X is the number of defective sets purchased by the hotel, find the probability distribution of X.

a) Write a generic function in R that can calculate the probability of interest for different values of X, for any number of good television sets, n, any number of defective television sets, m, and any number of sets that the hotel purchases, k. (For instance, in problem 5 from HW 5, n = 5, m = 2, k = 2 and hence for X = 1, the function needs to return 4/7.)

b) Use this function to find the expected value of random variable X, if n = 8, m = 6, k = 3.

Frequently Asked Questions

Is it free to get my assignment evaluated?

Yes. No hidden fees. You pay for the solution only, and all the explanations about how to run it are included in the price. It takes up to 24 hours to get a quote from an expert. In some cases, we can help you faster if an expert is available, but you should always order in advance to avoid the risks. You can place a new order here.

How much does it cost?

The cost depends on many factors: how far away the deadline is, how hard/big the task is, if it is code only or a report, etc. We try to give rough estimates here, but it is just for orientation (in USD):

Regular homework$20 - $150
Advanced homework$100 - $300
Group project or a report$200 - $500
Mid-term or final project$200 - $800
Live exam help$100 - $300
Full thesis$1000 - $3000

How do I pay?

Credit card or PayPal. You don't need to create/have a Payal account in order to pay by a credit card. Paypal offers you "buyer's protection" in case of any issues.

Why do I need to pay in advance?

We have no way to request money after we send you the solution. PayPal works as a middleman, which protects you in case of any disputes, so you should feel safe paying using PayPal.

Do you do essays?

No, unless it is a data analysis essay or report. This is because essays are very personal and it is easy to see when they are written by another person. This is not the case with math and programming.

Why there are no discounts?

It is because we don't want to lie - in such services no discount can be set in advance because we set the price knowing that there is a discount. For example, if we wanted to ask for $100, we could tell that the price is $200 and because you are special, we can do a 50% discount. It is the way all scam websites operate. We set honest prices instead, so there is no need for fake discounts.

Do you do live tutoring?

No, it is simply not how we operate. How often do you meet a great programmer who is also a great speaker? Rarely. It is why we encourage our experts to write down explanations instead of having a live call. It is often enough to get you started - analyzing and running the solutions is a big part of learning.

What happens if I am not satisfied with the solution?

Another expert will review the task, and if your claim is reasonable - we refund the payment and often block the freelancer from our platform. Because we are so harsh with our experts - the ones working with us are very trustworthy to deliver high-quality assignment solutions on time.

Customer Feedback

"Thanks for explanations after the assignment was already completed... Emily is such a nice tutor! "

Order #13073

Find Us On

soc fb soc insta


Paypal supported