Title: CUNY SPS MDS Data606_HW1"

Author: Charles Ugiagbe

Date: “9/4/2021”

Chapter 1: Introduction to Data

This assignment demonstrates how to indentify Different types of data and sampling.

Read file

Read the Smoking habit Data into R

data(smoking, package='openintro')

Question 1:

Smoking habits of UK residents. (1.10, p. 20) 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? (b) How many participants were included in the survey? (c) 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

data(smoking, package='openintro')
head(smoking)
##   gender age marital_status highest_qualification nationality ethnicity
## 1   Male  38       Divorced      No Qualification     British     White
## 2 Female  42         Single      No Qualification     British     White
## 3   Male  40        Married                Degree     English     White
## 4 Female  40        Married                Degree     English     White
## 5 Female  39        Married          GCSE/O Level     British     White
## 6 Female  37        Married          GCSE/O Level     British     White
##       gross_income    region smoke amt_weekends amt_weekdays    type
## 1   2,600 to 5,200 The North    No           NA           NA        
## 2      Under 2,600 The North   Yes           12           12 Packets
## 3 28,600 to 36,400 The North    No           NA           NA        
## 4 10,400 to 15,600 The North    No           NA           NA        
## 5   2,600 to 5,200 The North    No           NA           NA        
## 6 15,600 to 20,800 The North    No           NA           NA
str(smoking)
## Classes 'tbl_df', 'tbl' and 'data.frame':    1691 obs. of  12 variables:
##  $ gender               : Factor w/ 2 levels "Female","Male": 2 1 2 1 1 1 2 2 2 1 ...
##  $ age                  : int  38 42 40 40 39 37 53 44 40 41 ...
##  $ marital_status       : Factor w/ 5 levels "Divorced","Married",..: 1 4 2 2 2 2 2 4 4 2 ...
##  $ highest_qualification: Factor w/ 8 levels "A Levels","Degree",..: 6 6 2 2 4 4 2 2 3 6 ...
##  $ nationality          : Factor w/ 8 levels "British","English",..: 1 1 2 2 1 1 1 2 2 2 ...
##  $ ethnicity            : Factor w/ 7 levels "Asian","Black",..: 7 7 7 7 7 7 7 7 7 7 ...
##  $ gross_income         : Factor w/ 10 levels "10,400 to 15,600",..: 3 9 5 1 3 2 7 1 3 6 ...
##  $ region               : Factor w/ 7 levels "London","Midlands & East Anglia",..: 6 6 6 6 6 6 6 6 6 6 ...
##  $ smoke                : Factor w/ 2 levels "No","Yes": 1 2 1 1 1 1 2 1 2 2 ...
##  $ amt_weekends         : int  NA 12 NA NA NA NA 6 NA 8 15 ...
##  $ amt_weekdays         : int  NA 12 NA NA NA NA 6 NA 8 12 ...
##  $ type                 : Factor w/ 5 levels "","Both/Mainly Hand-Rolled",..: 1 5 1 1 1 1 5 1 4 5 ...

solutions 1

  1. Each role represent a single observation of UK resident

  2. There are 1691 Participant (Observation) in the Survey.

  3. Gender is Nominal Categoriacal

    Age is Discrete numerical

    MaritalStatus is Norminal Categorical

    HighestQualification ordinal Categorical

    Nationality is nominal Categorical

    Ethnicity is norminal Categorical

    GrossIncome is ordinal Categorical

    Region is nominal Categorical

    Smoke is Categorical

    AmtWeekends is Discrete numerical

    AmtWeekdays is Discrete numerical

    Type is nominal Categorical

Question 2

Cheaters, scope of inference. (1.14, p. 29) 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. (b) 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.

Solutions 2

(a)i The population of interest in this study is the children between the ages of 5 to 15.

ii The sample used in this study are the 160 children between the ages of 5 to 15.

  1. The results of this study cannot be generalized to the population because the sample taken only considered age group 5 - 15 years while other strata of age group where excluded. Also, the region where the sample where drawn was not defined; and the sample is relatively too small compared to the whole population.

Yes, the findings from this study can be used to establish causal relationship since a change in one variable as a result of the other.

Question 3

Reading the paper. (1.28, p. 31) 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.

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

Solutions 3

  1. Sample popuation = 23123 25% - Dementia (includes 1136 - Alzheimer, 416 - Vascular dementia) = 5781 members There is no enough information from the experiament to show that smoking can causes dementia later in life. This is an observational study. There was no treatment and control group. We cannot derive causal relationship on observational study. Also we don’t know what the “other factor” are

  2. The statement is not Justified because the researcher found out that student with behavioural issue are twice likely to have sleep disorder but it didn’t infer that sleep disorder leads to bullying. No enough information to draw conclusion from the observational studies.

Question 4

Exercise and mental health. (1.34, p. 35) A researcher is interested in the effects of exercise on mental health and he proposes the following study: Use stratified random sampling to ensure rep- 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?
  2. What are the treatment and control groups in this study?
  3. Does this study make use of blocking? If so, what is the blocking variable?
  4. Does this study make use of blinding?
  5. Comment on whether or not the results of the study can be used to establish a causal rela- tionship between exercise and mental health, and indicate whether or not the conclusions can be generalized to the population at large.
  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?

Solution 4

  1. This is an experimental study (Stratified Ramdom sampling)

  2. The treatment are helf the sample from each age group 18-30, 31-40, 41-55. The control group are the other half sample from each age group 18 -30, 31-40, 41-55.

  3. Yes. The blocking variable is the age.

  4. No. There is no Binding variable

  5. This study is a stratified ramdom sampling that included all age group of the population; so, it can be use to establish a casual relationship between exercise and mental Health.

  6. I will fully recommend it for funding since it is an experimental study with control groups.