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.
Ans:
This (a) Histogram is Gaussian (Normal) distribution and corresponds to (2) Boxplot with a mean of 60
This (b) Histogram is a uniform distribution and correponds to (3) Boxplot. There are no outliers and values are distributed evenly throughout the range from 0 to 100.
Histogram (c) is a skewed right and it corresponds to boxplot (1). The majority of values fall in the lower end of the range between about 0.8 and 2 with a lot of outliers beyond the upper Q3. Also it is lower bounded by 0
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.
Ans:
Q1 = 350K
Q2 = 450K (Median)
Q3 = 1M
IQR = 650K
Upper fence= Q3+1.5IQR = 1.975M
Lower fence= Q1-1.5IQR = (625K) which is NOT possible as home prices cannot fall below zero
Problem states -> Meaningful no. of homes greater than 6M
This disrtribution set is Right Skewed and lower-bounded by zero; plenty of outliers above upper fence
USe the Median
Should use IQR as there are plenty of outliers (this should prevent more distortion)
Ans:
Q1 = 300K
Q2 = 600K (Median)
Q3 = 900k
IQR = 600K
Upper Fence= Q3+1.5IQR = 1.8M
Lower Fence= Q1-1.5IQR = (600K) which is NOT possible as home prices cannot fall below zero
Problem states -> very few home prices above 1.2M
This disrtribution set is symmetric and lower-bounded by zero; No of outliers above upper fence
USe the Mean
Should use Standard Deviation
The distribution of college drinkers is right skewed since most students don’t drink and underage and only a few drink excessively, so the majority of values are at the lower end of the range.
A typical distribution should be described by the median and the variability would best be described by the IQR since they are not too affected by outliers
The distribution of typical salaries is mostly normal (symmetric) since most employees’ salaries are bunch up together quite closely with only a few high-end executives earning outrages amounts; CEO, COO, CFO. All the ones with 3-letter acronyms attached to their titles
The graph would showed quite a symmetric distribution set but to describe salaries:
This is not easy, if you use mean and standard deviation, the average salaries is skewed toward the high end because its pulled by the high salaried executives and is misleading. So its better to use median and IQR to represent salaries as its less susceptible to outlier events.
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.
Yes, looks like more survived than died when provided Treatment
It showed that 50% of the patients who received treatment had longer survival time, alluding to the fact that treated patients (heart transplants) survived longer
alive dead
0.3478261 0.6521739
Dead = 65% in the treatment group
alive dead
0.1176471 0.8823529
Dead = 88% in Control Group
## id acceptyear age survived survtime prior transplant wait
## 8 38 70 41 dead 5 no treatment 5
## 16 95 73 40 dead 16 no treatment 2
## 18 3 68 54 dead 16 no treatment 1
## 19 74 72 29 dead 17 no treatment 5
## 23 20 69 55 dead 28 no treatment 1
## 24 70 72 52 dead 30 no treatment 5
##
## alive dead
## 24 45
##
## alive dead
## 0.3478261 0.6521739
## id acceptyear age survived survtime prior transplant wait
## 1 15 68 53 dead 1 no control NA
## 2 43 70 43 dead 2 no control NA
## 3 61 71 52 dead 2 no control NA
## 4 75 72 52 dead 2 no control NA
## 5 6 68 54 dead 3 no control NA
## 6 42 70 36 dead 3 no control NA
##
## alive dead
## 4 30
##
## alive dead
## 0.1176471 0.8823529
That the treatment and the outcomes are independent of each other or Not indepent
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.03______. 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.
\begin{center}
\end{center}
RPubs Link: http://rpubs.com/ssufian/525919