Question: 4 Problem In this problem we will plot the ROC curve for the example that we did class. We had defined the following two random

 4 Problem In this problem we will plot the ROC curve

4 Problem In this problem we will plot the ROC curve for the example that we did class. We had defined the following two random variables 1 if sample is infected 0 if sample is not infected 1 test is positive 0 test is negative The ROC curve plots the True Positive Rate (which is also the sensitivity ?) against the False Positive Rate (which is also 1-? where theta is the specificity). Recall that n - Sensitivity or also referred to as True Positive Rate P(D = 1) True Positives Prevalance Specificity or also referred to as True Negative Rate True Negatives 1- Prevalance We assume that X|(D = 0) ~ Norm(50, 10) and X)(D = 1) ~ Norm(70, 15). In R there are functions to obtain both the probability density function (pdf) and the cumulative distribution function (cdf) of a random variable that has a Normal distribution. These functions are dnorm and pnorm. Review the help files to see the parameters of these functions. For example, the following R code > x plot(x, dnorm(x, 50, 10) provides the following familiar output. In this problem you are required to do the following I. Plot the pdf and the cdf of X(D 1) ~ Norm(70, 15) for values 20 to 120 2. Let r* denote the cutoff value such that if X > r* then the test is positive test otherwise it is considered be negative. Plot the ROC curve for values of x* ranging from 52

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!