Stats scores. (2.33, p. 78) Below are the final exam scores of twenty introductory statistics students.

57, 66, 69, 71, 72, 73, 74, 77, 78, 78, 79, 79, 81, 81, 82, 83, 83, 88, 89, 94

Create a box plot of the distribution of these scores. The five number summary provided below may be useful.

scores <- c(57, 66, 69, 71, 72, 73, 74, 77, 78, 78, 79, 79, 81, 81, 82, 83, 83, 88, 89, 94)
boxplot(scores)

Mix-and-match. (2.10, p. 57) Describe the distribution in the histograms below and match them to the box plots. Histogram (a) have a normal distribution. Histogram (b) have a plateau distribution. Histogram (c) have a left skewed distribution. Histogram (a) matches with boxplot (b). Histogram (b) matches with boxplot (c). Histogram (c) matches with boxplot (a).

Distributions and appropriate statistics, Part II. (2.16, p. 59) For each of the following, state whether you expect the distribution to be symmetric, right skewed, or left skewed. Also specify whether the mean or median would best represent a typical observation in the data, and whether the variability of observations would be best represented using the standard deviation or IQR. Explain your reasoning.

  1. Housing prices in a country where 25% of the houses cost below $350,000, 50% of the houses cost below $450,000, 75% of the houses cost below $1,000,000 and there are a meaningful number of houses that cost more than $6,000,000.

right skewed distribution, the meaningful number of houses will skew the numbers to the right. The median would be best to represent the observations because of the right skew affecting the average. The IQR is best used for the variability of observations .

  1. Housing prices in a country where 25% of the houses cost below $300,000, 50% of the houses cost below $600,000, 75% of the houses cost below $900,000 and very few houses that cost more than $1,200,000.

symmetrical distribution. The mean would be best represent the observations. The standard deviation is best used for the variability of observations .

  1. Number of alcoholic drinks consumed by college students in a given week. Assume that most of these students don’t drink since they are under 21 years old, and only a few drink excessively.

left skewed as most of the students under 21 don’t drink. The median would be best to represent the observations because of the left skew affecting the average. The IQR is best used for the variability of observations .

  1. Annual salaries of the employees at a Fortune 500 company where only a few high level executives earn much higher salaries than the all other employees.

right skewed. The median would be best to represent the observations because of the right skew affecting the average. The IQR is best used for the variability of observations .

Heart transplants. (2.26, p. 76) The Stanford University Heart Transplant Study was conducted to determine whether an experimental heart transplant program increased lifespan. Each patient entering the program was designated an official heart transplant candidate, meaning that he was gravely ill and would most likely benefit from a new heart. Some patients got a transplant and some did not. The variable transplant indicates which group the patients were in; patients in the treatment group got a transplant and those in the control group did not. Of the 34 patients in the control group, 30 died. Of the 69 people in the treatment group, 45 died. Another variable called survived was used to indicate whether or not the patient was alive at the end of the study.

library(openintro)
data(heartTr)
# mosaic plot -------------------------------------------------------
par(mar = c(0, 0, 0, 0), las = 1, mgp = c(2.7, 0.9, 0))
mosaicplot(transplant ~ survived, data = heartTr, 
           main = "", xlab = "", ylab = "", color = COL[1],
           cex.axis = 1.5)

# box plot ----------------------------------------------------------
par(mar = c(2, 4.8, 0, 0), las = 1, mgp = c(3.5, 0.7, 0), 
    cex.lab = 1.5, cex.axis = 1.5)
boxPlot(heartTr$survtime, fact = heartTr$transplant, 
        ylab = "Survival Time (days)", col = COL[1,2])

  1. Based on the mosaic plot, is survival independent of whether or not the patient got a transplant? Explain your reasoning.

Based on the mosaic plot, survival is not independent on whether or not the patient got the transplant. The patients that got the transplant have the longer lifespan.

  1. What do the box plots below suggest about the efficacy (effectiveness) of the heart transplant treatment.

The box plots show that patients that got the heart transplant treatment have increased lifespan compared to the ones that didnt received the treatment.

  1. What proportion of patients in the treatment group and what proportion of patients in the control group died?
#proportion of patients in the treatment group that died
T_prop<-subset(heartTr, heartTr$transplant=="treatment", select=c("survived"))
summary(T_prop)
##   survived 
##  alive:24  
##  dead :45

45/69

45/69
## [1] 0.6521739

65% of patients died in the treatment group.

#proportion of patients in the control group that died
C_prop<-subset(heartTr, heartTr$transplant=="control", select=c("survived"))
summary(C_prop)
##   survived 
##  alive: 4  
##  dead :30

30/34

30/34
## [1] 0.8823529

88% of the patients in the control group died.

  1. One approach for investigating whether or not the treatment is effective is to use a randomization technique.
  1. What are the claims being tested?

The claims being tested are whether patients receiving transplants will have a better survival rates and increased lifespan than patients that did not.

  1. The paragraph below describes the set up for such approach, if we were to do it without using statistical software. Fill in the blanks with a number or phrase, whichever is appropriate.

We write alive on 28____ cards representing patients who were alive at the end of the study, and dead on 75_ cards representing patients who were not. Then, we shuffle these cards and split them into two groups: one group of size 69__ representing treatment, and another group of size 34__ representing control. We calculate the difference between the proportion of dead cards in the treatment and control groups (treatment - control) and record this value. We repeat this 100 times to build a distribution centered at 0_. Lastly, we calculate the fraction of simulations where the simulated differences in proportions are 0.2302_____. If this fraction is low, we conclude that it is unlikely to have observed such an outcome by chance and that the null hypothesis should be rejected in favor of the alternative.

  1. What do the simulation results shown below suggest about the effectiveness of the transplant program? The results show a difference of 0.2302 which is unlikely to happen, so the initial hypothesis should be rejected.