Homework#1

Elina Azrilyan

05 September 2018

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. Note that “£” stands for British Pounds Sterling, “cig” stands for cigarettes, and “N/A” refers to a missing component of the data. (a) What does each row of the data matrix represent?

\(\color{red}{\text{Answer:}}\) Each row represents a case.

  1. How many participants were included in the survey?

\(\color{red}{\text{Answer:}}\) $1,691 participants

  1. Indicate whether each variable in the study is numerical or categorical. If numerical, identify as continuous or discrete. If categorical, indicate if the variable is ordinal.

\(\color{red}{\text{Answer:}}\)

  • Sex - Categorical - Nominal
  • Age - Numerical - Discrete
  • Marital - Catigorical - Nominal
  • GrossIncome - Categorical - Ordinal
  • Smoke - Categorical - Nominal
  • AmtWeekends - Numerical - Discrete
  • 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 researchers 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. Differences were observed in the cheating rates in the instruction and no instruction groups, as well as some differences across children’s characteristics within each group. (a) Identify the population of interest and the sample in this study.

\(\color{red}{\text{Answer:}}\) Population of interest: children between the ages of 5 and 15 Sample: 160 children between the ages of 5 and 15

  1. Comment on whether or not the results of the study can be generalized to the population, and if the findings of the study can be used to establish causal relationships.

\(\color{red}{\text{Answer:}}\) We don’t know if children were randomly selected for the study - so we can’t establish whether the sample is representative of the population. We can’t establish causal relationship - we can only establish association.

1.28. Reading the paper. Below are excerpts 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.

\(\color{red}{\text{Answer:}}\) Association does not imply causation. We cannot infer a causal relationship based on an observational study.

  1. Another article titled The School Bully Is Sleepy states the following:62 “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 identified 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 identified 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 justified? If not, how best can you describe the conclusion that can be drawn from this study?

\(\color{red}{\text{Answer:}}\)

This statement is not justified - just because there is association between the 2 variable doesn’t mean that one is causing the other. It is possible that the relationship is the opposite - maybe being a bully is interfering with a child’s sleep. The more accurate conclusion is that there is association between the 2 variables.

1.36 Exercise and mental health. A researcher is interested in the effects of exercise on mental health and he proposes the following study: Use stratified random sampling to ensure resentative proportions 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.

  1. What type of study is this?

\(\color{red}{\text{Answer:}}\) This is an experiment

  1. What are the treatment and control groups in this study?

\(\color{red}{\text{Answer:}}\) “Treatment group” is the part of the group that exercises and “control group” is the people who are told not to exercise.

  1. Does this study make use of blocking? If so, what is the blocking variable?

\(\color{red}{\text{Answer:}}\) Yes, the blocking variable is age groups.

  1. Does this study make use of blinding?

\(\color{red}{\text{Answer:}}\) No, there is no way to use a placebo in this study - we can’t make the control group believe they are exercising as well.

  1. 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.

\(\color{red}{\text{Answer:}}\) Yes, this is an experiment and it can be used to establish a causal relationship and can be used to generalize populaton at large since a stratified random sample was used.

  1. Suppose you are given the task of determining if this proposed study should get funding. Would you have any reservations about the study proposal?

\(\color{red}{\text{Answer:}}\) The study seems to be reasonable, I might question the age groups used for the stratified sample. Why was that particular breakdown used? Is that the best way to break down subjects into groups?

1.48 Stats scores. 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.

\(\color{red}{\text{Answer:}}\)

scores <- c(57, 66, 69, 71, 72, 73, 74, 77, 78, 78, 79, 79, 81, 81, 82, 83, 83, 88, 89, 94)
boxplot(scores, col='red')

1.50 Mix-and-match. Describe the distribution in the histograms below and match them to the box plots.

\(\color{red}{\text{Answer:}}\)

  1. Symmetric distribution, matches boxplot (2)

  2. Uniform distribution, matches boxplot (3)

  3. Right skewed distribution, matches boxplot (1)

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 in 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.

\(\color{red}{\text{Answer:}}\) Right Skewed, median would best represent a typical observation, variability would be best described by IQR.

  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.

\(\color{red}{\text{Answer:}}\) Symmertic, mean would be best representation of typical observation, standard deviaiton would be best for variability.

  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.

\(\color{red}{\text{Answer:}}\) Left skewed, median would best represent a typical observation, variability would be best described by IQR.

  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.

\(\color{red}{\text{Answer:}}\) Right Skewed, median would best represent a typical observation, variability would be best described by IQR.

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

library(openintro)
## Please visit openintro.org for free statistics materials
## 
## Attaching package: 'openintro'
## The following objects are masked from 'package:datasets':
## 
##     cars, trees
data(heartTr)
  1. Based on the mosaic plot, is survival independent of whether or not the patient got a transplant? Explain your reasoning.

\(\color{red}{\text{Answer:}}\)

Mosaic plot suggeste there is a dependency between survival rate and whether the patient got the transplant. The proportion of survivers who got the transplant treatment appears to be significantly higher on the plot.

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

\(\color{red}{\text{Answer:}}\)

The boxplots also suggest that heart transplant treatment is effective. All the date assiciated with survival time of patients with heart transplant shows that it is meaningfully longer than the the control group.

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

\(\color{red}{\text{Answer:}}\)

mytable <- as.data.frame(table(heartTr$survived, heartTr$transplant))
MyTableControl <- mytable[which(mytable$Var2=='control'),] 
MyTableTreatment <- mytable[which(mytable$Var2=='treatment'),]
MyTableTreatment$Percentage<-MyTableTreatment$Freq/sum(MyTableTreatment$Freq)*100
MyTableTreatment
##    Var1      Var2 Freq Percentage
## 3 alive treatment   24   34.78261
## 4  dead treatment   45   65.21739
MyTableControl$Percentage<-MyTableControl$Freq/sum(MyTableControl$Freq)*100
MyTableControl
##    Var1    Var2 Freq Percentage
## 1 alive control    4   11.76471
## 2  dead control   30   88.23529

\(\color{red}{\text{Answer:}}\)

88.2% of patients in control group have died

65.2% of patients in the treatment group have died

  1. One approach for investigating whether or not the treatment is effctive is to use a randomization technique.
  1. What are the claims being tested?

\(\color{red}{\text{Answer:}}\)

H0: The transplants and survival rates are independent. They have no relationship, and the difference in survival rates between the treatment and control groups is due to chance. HA: The transplants and survival rates are not independent. The difference in the survival rates between the treatment and control groups is not due to chance and heart transplant is associated with an increased chance of 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.

\(\color{red}{\text{Answer:}}\) 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 diffrence 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 INDEPENDENT. 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?

\(\color{red}{\text{Answer:}}\)

It is unlikely that the outcomes we observed were by chance. The transplant treatmnet was effective in increasing survival rate of patients.