1.8 Smoking habits of UK residents.

  1. Each row represent one respondents’ answer of the survey.
  2. 1691 participants
  3. sex,categorical,not ordinal
    age,numerical,continuous
    marital,categorical,not ordinal
    grossincome,categorical,ordinal
    smoke,ctegorical,ordinal
    amt weekends,numerical,continous
    amt weekdays,numerical,contiuous

1.10 Cheaters, scope of inference.

a.The population of interest is 5- 15 yr old children. The sample is 160 children.
b.The results cannot be generalized to the population for two reasons:
1. The sample size is too small.
2. the age is not relevent to this casual relationship.

1.28 Reading the paper

  1. We cannot conclude that smoking causes dementia later in life becasue this is not a randomized controlled experiment.
    b.This statement is not justified. This is not a randomized controlled experiment, so we can not conclude the casual relationship.

1.36 Exercise and mental health.

a.Randomized controlled study
b.treatment group are those exercise twice a week. control groups are not exercise.
c.Yes, the blocking variable is the age.
d.no
e.no, we can not conclude a casual relationship since blining was not used.
f.yes, need to know more about the sample size.

1.48 Stats scores.

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

1.50 Mix-and-match.

  1. to 2, is normal distribution
  2. to 3, is uniform distribution
  3. to 1, is right skewed distribution

1.56 Distributions and appropriate statistics, Part II .

  1. this is right skewed, better use median since is not a normal distribustion.Better use IQR since SD only for mean.
  2. this is symmetric distribution, we use median since is normal distribustion and use standard deviation.
  3. this is right skewed,median and IQR
  4. this is right skewed,median and IQR.

1.70 Heart transplants

a.not independent, since there is a correlationship between transplant and survival time.
b.it shows the tranplant help to extend survial time.
c.

# install.packages("openintro")
library(openintro)
## Please visit openintro.org for free statistics materials
## 
## Attaching package: 'openintro'
## The following objects are masked from 'package:datasets':
## 
##     cars, trees
treatmentgroup <- subset(heartTr, transplant == 'treatment')
controlgroup <- subset(heartTr, transplant == 'control')
prop.table(table(treatmentgroup$survived))
## 
##     alive      dead 
## 0.3478261 0.6521739
prop.table(table(controlgroup$survived))  
## 
##     alive      dead 
## 0.1176471 0.8823529
  1. 1.heart tranplant helps increase suvival times.
  1. 28, 75, 69,34,0
    3.can conclude it is effective.