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.

boxplot(scores)

fivenum(scores)
## [1] 57.0 72.5 78.5 82.5 94.0

Mix-and-match. (2.10, p. 57) Describe the distribution in the histograms below and match them to the box plots.

var(sym)
## [1] 8.332754
var(uni)
## [1] 837.5455
var(rs)
## [1] 0.8587554
mean(sym)
## [1] 59.88987
mean(uni)
## [1] 49.9199
median(rs)
## [1] 1.282097

a: symmetric distribution, the center (as mean) is 59.89, the variance is 8.33 (#2)

b: uniform distribution, the center (as mean) is 49.92, the variance is 837.55(#3)

c: right-skewed distribution, the center (as median) is 1.28, the variance is 0.86 (#1)


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.

This is right skewed as most observations occur to the left and tail off to the right. Median would better represent a typical observation as it would lessen the impact of super expensive houses. IQR would be better as it would more represent the typical observations (the expensive houses being otuside the range).

  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.

This is a symmetric distribution as the observatons will mostly evenly distribute between both sides of the center. Mean and standard deviation would be fair measures of typical observations as there shouldn’t extreme prices compared to the mean.

  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.

depends how you read the description, but if most dont drink, and those who do drink don’t always specifically drink excessively, then this would be right skewed. Median would better represent a typical observation as it would lessen the impact of excessive drinkers. IQR would be better as it would more represent the typical 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.

This is mostly a symmetric distribution, with the majority of salaries occuring symetrically. However, there will be some very high salaries from the exectuives. Median would better represent a typical observation as it would lessen the impact of executive salaries. IQR would be better as it would more represent typical salaries


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.

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

survival is not independent of whether or not they got a transplant as the outcome tends to correlate to whether or not they got the transplant.

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

It says that those who do not get the transplant tend to die relatively quickly with a median survival time of 21 days, while those who get it tend to live longer with a median survival of 207 days. There is also a much large range of survival times among those who got the transplant, presumably becuase they would have died quickly like those in the control group had they not recieved the transplant.

median(heartTr$survtime[heartTr$transplant == "control"])
## [1] 21
median(heartTr$survtime[heartTr$transplant == "treatment"])
## [1] 207
  1. What proportion of patients in the treatment group and what proportion of patients in the control group died?
#Treatment Group 
sum(heartTr$survived == "dead" & heartTr$transplant == "treatment")/69
## [1] 0.6521739
#Control Group
sum(heartTr$survived == "dead" & heartTr$transplant == "control")/34
## [1] 0.8823529
  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?

Whether survival is independent of whether or not a patient got a transplant

  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.
sum(heartTr$survived == "alive")
## [1] 28
sum(heartTr$survived == "dead")
## [1] 75
sum(heartTr$transplant == "treatment")
## [1] 69
sum(heartTr$transplant == "control")
## [1] 34

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 proportional to the differences observed in the actual study. 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 outcomes are unlikely to be independent of the treatment, or be due to chance.

\begin{center} \end{center}