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.
Mix-and-match. (2.10, p. 57) Describe the distribution in the histograms below and match them to the box plots.
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.
Right Skewed since there are a meaningful number of houses that cost more than $6,000,000. Median and IQR would be the best mesurements.
Symmetric and uniformly distributed since very few houses that cost more than $1,200,000 will not skew. Mean and Standard deviation would be the best mesurements.
Right Skewed since there isn’t a significant number of excessive drinkers. Median and IQR would be the best mesurements.
Left Skewed. Mean and IQR would be the best measurements.
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.
survival is dependent upon whether or not patient got a transplant because in the mosaic plot its clearly visible that the survival of patients who got treatment is more then who didnt get.
boxplot shows that the patients who received the treatment has more survival time (days).
head(heartTr)
trtmnt_patient <- nrow(subset(heartTr, transplant == "treatment"))
trtmnt_patient_dead <- nrow(subset(heartTr, transplant == "treatment" & survived =="dead"))
ctrl_patient <- nrow(subset(heartTr, transplant == "control"))
ctrl_patient_dead <- nrow(subset(heartTr, transplant == "control" & survived =="dead"))
trtmnt_patient_dead/trtmnt_patient
## [1] 0.6521739
65.22% patients in treatment group died.
ctrl_patient_dead/ctrl_patient
## [1] 0.8823529
88.24% patients in control group died.
The claim being tested is whether or not a heart transplant increases the lifespan of patients.
nrow(subset(heartTr, survived == "alive"))
## [1] 28
nrow(subset(heartTr, survived == "dead"))
## [1] 75
trtmnt_patient
## [1] 69
ctrl_patient
## [1] 34
0.8823529 - 0.6521739
## [1] 0.230179
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.
simulation results suggest that transplant program is effective since the difference is centered around 0 and data shows strong evidence of higher survival with treatment. Thus I reject the null hypothesis.
\begin{center} \end{center}