HW07.pdf - Homework 7 Palash Kanwar palash Due at 10pm...

This preview shows page 1 - 3 out of 9 pages.

Homework 7Palash Kanwar, palashDue March 15, 2019 at 10pmGetting StartedThis assignment requires two associated files:cancer_cell_biopsy.csvnejm1997.pdfWhen working on your assignment, make sure thatcancer_cell_biopsy.csvis in the same directory asthis file and set the working directory to the file’s location (in the Session menu.)Question 1 (5 pts)The following data come from a study of breast cancer biopsies.cancer <-read.csv("cancer_cell_biopsy.csv",header =FALSE)col_base <-c("radius","texture","perimeter","area","smoothness","compactness","concavity","concave_points","symmetry","fractal_dimension")cols <-c(paste0(col_base,"_mean"),paste0(col_base,"_sd"),paste0(col_base,"_worst"))colnames(cancer) <-c("ID","Diagnosis", cols)## The current diagnosis is either "B" or "M". We ll turn this into a logical/boolean so it is a littlecancer$benign <- cancer$Diagnosis=="B"Part (a) (2 pts)Let’s begin our investigation by investigating whether benign (not harmful) and malignant (harmful) tumorsdiffer in size (radius). We can see that benign tumors tend to be smaller than malignant tumors:d1 <-density(cancer$radius_mean[cancer$benign])d2 <-density(cancer$radius_mean[!cancer$benign])plot(d1,xlim =range(c(d1$x, d2$x)),ylim =range(c(d1$y, d2$y)))lines(d2,col ="red")1
510152025300.000.050.100.150.20density.default(x = cancer$radius_mean[cancer$benign])N = 357 Bandwidth = 0.4747DensityUse a stratified bootstrap to generate a 95% confidence interval for the difference of means for the benignand malignant radius measurements. Interpret what this confidence interval tells us about the distributionsof benign and malignant tumors? Particularly, does this interval include zero? What would including zeroindicate?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture