Chapter 1 - Introduction to Data
??? Practice: 1.7 (available in R using the data(iris) command), 1.9, 1.23, 1.33, 1.55, 1.69 ??? Graded: 1.8, 1.10, 1.28, 1.36, 1.48, 1.50, 1.56, 1.70 (use the library(openintro); data(heartTr) to load the data)
1.8: Smoking habits of UK residents
A survey was conducted to study the smoking habits of UK residents. Below is a data matrix displaying a portion of the data collected in this survey.
a. What does each row in the data matrix represent?
Each row in the data matrix represents an individual case of the study .
b. How many participants were included in the survey?
Answer: 1691
c. Indicate whether each variable in the study is numerical or categorical. If numerical, identify as continuous or discrete. If categorical, iindicate if the variable is ordinal.
Answer: (1) Sex : categorical, not ordinal (2) age: numerical, discrete (3)marital: categorical, not ordinal (4) gross income: numeric discrete (5)smoke: categorical, not ordinal (6) amtWeekends: numerical, discrete (7) amtWeekdays: numerical, discrete
1.10: Cheaters, scope of inference.
Exercise 1.5 introduces a study where researchers studying the relationship between honesty, age, and self-control conducted an experiment on 160 children between the ages of 5 and 15. The researches asked each child to toss a fair coin in private and to record the outcome (white or black) on a paper sheet, and said they would only reward children who report white. Half the students were explicitly told not to cheat and the others were not given any explicit instructions. Di???erences were observed in the cheating rates in the instruction and no instructions groups, as well as some di???erences across children’s characteristics within each group.
a. Identify the population of interest and the sample in this study
Answer:all children between the ages of 5 and 15.
b. Comment on whether or not the results of the study can be generalized to the population, and if the ???ndings of the study can be used to establish causal relationships.
Answer: It is di???cult to generalize the results, because to generalize the results, the sample must be randomized. There isn’t su???cient information to validate if the sample was unbiassed. We cannot establish the causal relationships by the ???ndings.
1.28: Reading the paper
Below are exerpts from two articles published in the NY Times:
(a) An article titled Risks: Smokers Found More Prone to Dementia states the following: “Researchers analyzed data from 23,123 health plan members who participated in a voluntary exam and health behavior survey from 1978 to 1985, when they were 50-60 years old. 23 years later, about 25% of the group had dementia, including 1,136 with Alzheimer’s disease and 416 with vascular dementia. After adjusting for other factors, the researchers concluded that pack-a- day smokers were 37% more likely than nonsmokers to develop dementia, and the risks went up with increased smoking; 44% for one to two packs a day; and twice the risk for more than two packs.” Based on this study, can we conclude that smoking causes dementia later in life? Explain your reasoning.
answer:Actually, no. This study is not an experimental study and smoking has no causal relationships with dementia later in life. It’s observational and limited to health plan membership holders which excludes non-membership holders who can be smokers with dementia.
(b) Another article titled The School Bully Is Sleepy states the following: “The University of Michigan study, collected survey data from parents on each child’s sleep habits and asked both parents and teachers to assess behavioral concerns. About a third of the students studied were identi???ed by parents or teachers as having problems with disruptive behavior or bullying. The researchers found that children who had behavioral issues and those who were identi???ed as bullies were twice as likely to have shown symptoms of sleep disorders.” A friend of yours who read the article says, “The study shows that sleep disorders lead to bullying in school children.” Is this statement justi???ed? If not, how best can you describe the conclusion that can be drawn from this study?
answer: The statement is not justi???ed. It just shows an association between sleep disorders and bullying in school. There may be other factors involved in bullying however we cannot establish a causal relationship between the two.
1.36: Exercise and mental health.
A researcher is interested in the e???ects of exercise on mental health and he proposes the following study: Use strati???ed random sampling to ensure representative proporations of 18-30, 31-40, and 41-55 year olds from the population. Next, randomly assign half the subjects from each age group to exercise twice a week, and instruct the rest not to exercise. Conduct a mental health exam at the beginning and at the end of the study, and compare the results.
a. What type of study is this?
answer:a randomized experiment study
b. What are the experimental and control treatments in this study?
answer: Treatment group: group asked to exercise control group: group asked not to exercise
c. Does this study make use of blocking? If so, what is the blocking variable?
answer: Yes this study makes use of blocking. Age is the blocking variable.
d. Has blinding been used in this study?
answer: The question has no clear indication about this.
e. Comment on whether or not the results of the study can be used to establish a causal relationship between exercise and mental health, and indicate whether or not the conclusions can be generalized to the population at large.
answer:Yes, it can be generalized since it’s an randomized experimental study with clear causal relationship between exercising and mental health.
f. Suppose you are given the task of determining if this proposed study should get funding. Would you have any reservations about the study proposal?
answer: I would favor funding for the proposed study.
1.48: Stats scores
below are the ???nal exam scores of twenty introductory statistics students:
scores <- c(57, 66, 69, 71, 72, 73, 74, 77, 78, 79, 79, 81, 81, 82, 83, 83, 88, 89, 94)
summary(scores)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 57.00 72.50 79.00 77.68 82.50 94.00
Create a box plot of the distribution of these scores. The ???ve number summary provided below may be useful:
boxplot(scores)

1.50: Mix-and-match.
Describe the distribution in the histograms below, and match them to the box plots.
answer: a matches with 2, b matches with 3, and c matches with 1.
a is unimodal, b is multimodal, and c is unimodal but skewed to the right.
1.56: Distributions and appropriate statistics, part II
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 of the data, and whether the variability of observations would be best represented using the standard deviation or IQR. Explain your reasoning.
a. 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: this data is skewed to the right. Because of the outlier houses, it’s probably better to use the median when looking for a typical observation above the mean (which whould be skewed by the outliers) and better to use the IQR for the same reason.
b. 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:this data seems very evenly distributed, mean and median should be roughly the same, and the SD or IQR can both be used to accurately describe the data.
c. 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: Because of the outliers, once again IQR and median should be used over the Standard Deviation and the mean. The data is going to be skewed to the right because of a conditional variable which is 21 and older drink.
d. Annual salaries of the employees at a Fortune 500 company where only a few high level executives earn much higher salaries than all the other employees.
answer: similar to the above, this data is skewed to the right. IQR and median measures should be used over the standard deviation and mean to describe the data.
1.70: Heart transplants.
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 o???cial heart transplant candidate, meaning that he was gravely ill and would most likely bene???t 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 teh control group did not. Another variable called survived was used to indicate whether or not the patient was alive at the end of the study.Of the 34 patients in the control group, 30 died. Of the 69 people in the treatment group, 45 died.
a. Based on the mosaic plot, is survival independent of whether or not the patient got a transplant? Explain your reasoning.
answer: Based on Mosaic chart, it seems survival is not independent of whether or not the patient got a transplant. Those who received a transplant had greater chance of surviving thus suggesting that the two variables aren’t independent.
b. What do the box plots below suggest about the e???cacy of th heart transplant treatment?
Answer: the survival time of the treatment group is signi???cantly increased.
c. What proporation of patients in the treatment group and what proporation of patients in the control group died?
answer: Proportion(Treatment): 45/69 or 0.652 Proportion(Control): 30/34 or 0.882
d. One approach for investigating whether or not th treatment is e???ective is to use a randomization technique.
i. What are the claims being tested?
answer: i. Whether the transplant has any effect on longevity of survival time or not.
ii. The paragraph below describes the set up for such approach, if we were to do it without using statistical software.
answer: Fill in the blanks with a number or phrase, whichever is appropriate.
We write alive on 28 ( 24+4) cards representing patients who were alive at the end of the study, and dead on 75(30+45) cards representing patients who were not. Then, we shu???e these cards and split them into two groups: one group of size 69 (24+45)representing treatment, and another group of size 34 ($+30) representing control. We calculate the di???erence 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 zero. Lastly, we calculate the fraction of simulations where the simulated di???erences in proportions are greater than 24/69-4/34 = 0.23 . 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.
iii. What do the simulation results shown below suggest about the e???ectiveness of the transplant program?
answer: the di???erence in proportions is 24/69 - 4/34 = 0.23, (23%). we can conclude that simulated differences in proportions are observed and show the effectiveness of the transplant treatment..