title: “Chapter 2 - Summarizing Data” author: "" output: pdf_document: extra_dependencies: [“geometry”, “multicol”, “multirow”] editor_options: chunk_output_type: console —

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)

df<-as.data.frame(scores)

boxplot(df)


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

ANSWER:

Histogram (a) is symmetric and is matched with boxplot (2). Note the tails on the histogram and the outlier points on the boxplot.

Histogram (b) is close to uniform and is matched with boxplot (3). No outliers in either depiction.

Histogram (c) is right skewed and is matched with boxplot (1). Notice the right tail in the histogram and the outliers on the top of the boxplot.


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.

ANSWER TO A):

This would be represented by a right skewed distribution. The jump up at the 75% and meaningful number more than 6,000,000 indicates a right skewed. The median would best represent an observation and the IQR would best represent variability.

  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.

ANSWER to B: This is best represented by a symmetric distribution using mean and standard deviation. The equidistance between 300000, 600000 and 600000 and 900000 with very few exceeding 1200000 indicates symmetry. ____________________________________

  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.

ANSWER TO C:

This distribution is right skewed. Many at 0, some in the middle, and few excess. Use the median, and IQR. Also, considered a mixed distribution, with a large concentration at 0 due to the age restriction. _____________________________________

  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.

ANSWER TO D:

This is a right skewed distribution, because the few that earn a much higher is much much higher leading to a right tail and outlier values. Use the median and IQR.


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.

ANSWER TO A:

The mosaic plot shows there may be an association between survival and treatment. In other words, there are a larger proportion of those who survive that received treatement than those who did not receive treatment. Likewise, there is a larger proportion of those that died that did not receive treatment.

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

ANSWER to B:

The boxplots suggest a longer survival time for those that receive treatment as compared to those that do not. The mean, median and boxplot all indicate a longer survival time for tranplant patients.

  1. What proportion of patients in the treatment group and what proportion of patients in the control group died?

So 30/34=.88 of the control group died. And 45/69=.65 of the treatment 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?

H0: There is no difference between control and treatment group with respect to survival.

  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 ____29______ 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 _+/-.166______. 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?

\begin{center} \end{center}

The number of simulations that are < |.16| difference of proportions is 7

So 7/100 =.07

At Alpha=.05, we do not reject null.

We conclude Treatment has no effect on survival, we just observed observed a difference that would occur rarely.