Homework 1

  • Problem 1: Use the World Country Ranking dataset and SOCR Charts to generate a scatter plot, a line plot, a dot plot, a boxplot, a histogram plot and a pie chart for some of the variables (ED, Edu, HI, QOL, PE, OA, Relig).
  • Problem 2: Using R and SOCR, generate 100 random observations from uniform(-1,1), normal(0,1) and exponential(1) distributions. Then Use the SOCR QQ Data-Data Plot to compare the paired samples, i.e., for each distribution, plot the quantiles of the R-generated sample against the SOCR generated sample. What do you expect and what do you see? Explain.
  • Problem 3: Below is the data of 400 Melanoma (skin cancer) Patients by Type and Site.
    Type Site Totals
    Head and Neck Trunk Extremities
    Hutchinson's melanomic freckle 22 2 10 34
    Superficial 16 54 115 185
    Nodular 19 33 73 125
    Indeterminant 11 17 28 56
    Column Totals 68 106 226 400
    • If we select one out of the 400 patients in the study, what is the probability that the cancer is on the extremities given that it is a type of nodular: P = P(Extremities | Nodular)?
    • What is the probability that for a randomly chosen patient the cancer type is Superficial given that it appears on the Trunk?
  • Problem 4: Using the smoking and heart attack contingency table below, compute the odds ratio (OR) of heart attack relative to smoking, and compute the CI of the OR.

    Heart Attack (HA) Total
    Yes No
    Smoking (S) Yes 33 18 51
    No 167 182 349
    Total 200 200 400

SOCR Resource Visitor number Dinov Email