1. Smoking habits of UK residents

  1. What does each row of the data matrix represent?
    • Each row represents a unique case: The smoking habit of each UK resident.
  2. How many participants were included in the survey?
    • There are 1691 participants
  3. 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.
Categorical Numerical
Sex Age (Continuous)
Marital AmtWeekends (discrete)
Smoke AmtWeekdays (discrete)
grossIncome (ordinal)

2. Cheaters, scope of inference.

  1. Identify the population of interest and the sample in this study.
    • Population of interest is all children. Sample is 160 children between ages 5 and
  2. 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.
    • If this is a randomized experiment then the results can be generalized to the population. The findings can be used to establish a causal relationship since there are both explanatory and response variables. Instruction may affect the outcome of whether or not the kids cheat (response).

3. Reading the paper. Below are excerpts from two articles published in the NY Times:

  1. An article titled Risks: Smokers Found More Prone to Dementia states the following:61 “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-aday 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.
  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 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?

4. Exercise and mental health.

  1. What type of study is this?
    • Experiment
  2. What are the treatment and control groups in this study?
    • Treatment: Instructions to exercise 2 times a week
    • Control: No instruction to exercise
  3. Does this study make use of blocking? If so, what is the blocking variable?
    • Yes: Age (18 - 30, 31 - 40 and 41 - 55)
  4. Does this study make use of blinding?
    • No. The groups were told explicitly whether or not they should exercise
  5. 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.
    • Yes, a causal relationship can be established and can be generalized to the population.
  6. Suppose you are given the task of determining if this proposed study should get funding. Would you have any reservations about the study proposal?
    • No. Might not get the best results because if persons assigned to the control group like to exercise, they may not like that idea.

5. Stats scores. Create a box plot of the distribution of these scores.

Min Q1 Q2(Median) Q3 Max
57 72.5 78.5 82.5 94
scores <- c(57, 66, 69, 71, 72, 73, 74, 77, 78, 78, 79, 79, 81, 81, 82, 83, 83, 88, 89, 94)

boxplot(scores, xlab = "", ylab = "Scores", main = "Final Scores of 20 Students", col = "blue")

6. Mix-and-match

  1. Symmetric matches with boxplot 2
  2. Symmetric matches with boxplot 3
  3. Skewed to the right matches with bxplot 1

7. Distributions and appropriate statistics, Part II.

  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.
    • Distribution: Right Skewed
    • Median would be best used to represent this data along with the IQR for variability.
  2. 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.
    • Distribution: Symmetric
    • Mean (average of 300) would be best used to represent this data along with the standard deviation for variability.
  3. 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.
    • Distribution: Left Skewed
    • Median would be best used to represent this data along with the IQR for variability.
  4. 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.
    • Distribution: Right Skewed
    • Median would be best used to represent this data along with the IQR for variability.

8.

  1. Based on the mosaic plot, is survival independent of whether or not the patient got a transplant? Explain your reasoning.
    • No.There is a causal connection between the two variables. Transplants does affect the patient’s survival outcome.
  1. What do the box plots below suggest about the ecacy (effectiveness) of the heart transplant treatment.
    • Patients who recieved heart transplants are more likely to survive or live longer than those who did not recieve ant transplant.
  2. What proportion of patients in the treatment group and what proportion of patients in the control group died?
library(openintro)
data(heartTr)


#Table created to show relationship count between survived and transplant
x <- (table(heartTr$transplant == "treatment", heartTr$survived == "dead"))
colnames(x) <- c("alive", "dead")
rownames(x) <- c("control", "treatment")
x <- rbind(x, colSums(x)) #adds total for each row
x <- cbind(x, rowSums(x)) #adds total for each column
x #displays the table
##           alive dead    
## control       4   30  34
## treatment    24   45  69
##              28   75 103
#proportion of patients in treatment group who died
td <- 45 / 69
td
## [1] 0.6521739
#proportion of patients in control group who died
cd <- 30 / 34
cd
## [1] 0.8823529
#simulated differences in proportions
cd - td
## [1] 0.230179
  1. One approach for investigating whether or not the treatment is effective is to use a randomization technique.

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 34 size 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 (23.02%). 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?
    • The transparent and survival variables are not independent and so the independence model(H0) is rejected in favor of the alternative(HA).It appears that a difference of at least 23% due to chance alone would only happen about 2% of the time which is rare.