STAT 200 Week 1 Homework Problems Solution
STAT 200 Week 1 Homework Solutions
Problem Set 1: Basic Terminology
Problem 1 (1.1.4)
Individual: Connecticut households
Variable: Heating source type
Population: The set of heating source types of all Connecticut
households
Sample: The set of heating source types of 1000 Connecticut
households
Parameter: The percentage of all Connecticut households using
fuel oil as a heating source
Statistic: The percentage of 1000 Connecticut households using
fuel oil as a heating source
Problem 2 (1.1.8)
Individual: Countries
Variable: Density of people per square kilometer
Population: The set of densities of people per square kilometer
of all countries
Sample: The set of densities of people per square kilometer of
56 countries
, Parameter: The mean density of people per square kilometer of
all countries
Statistic: The mean density of people per square kilometer of 56
countries
Problem Set 2: Epidemiology Calculations
Problem: A study on relapse frequency among people treated for
opiate addiction in Vermont followed 20 subjects over 24 months.
1. Total person-time at risk:
Calculate by summing all person-months for each subject
Answer: 170 person-months total
2. Incidence Density:
Formula: (new cases) ÷ (person-years)
Answer: 7.1 per 100 person-months
3. Cumulative Incidence:
Formula: (new cases) ÷ (total patients)
Answer: 6 per 10 people
Problem Set 3: R Programming Exercises
Problem 1: Fitbit step data analysis
r
steps = c(5892, 8977, 6804, 7345, 10112)
sort(steps) # [1] 5892 6804 7345 8977 10112
sort(steps, decreasing = TRUE) # [1] 10112 8977 7345 6804 5892
length(steps) # [1] 5
STAT 200 Week 1 Homework Solutions
Problem Set 1: Basic Terminology
Problem 1 (1.1.4)
Individual: Connecticut households
Variable: Heating source type
Population: The set of heating source types of all Connecticut
households
Sample: The set of heating source types of 1000 Connecticut
households
Parameter: The percentage of all Connecticut households using
fuel oil as a heating source
Statistic: The percentage of 1000 Connecticut households using
fuel oil as a heating source
Problem 2 (1.1.8)
Individual: Countries
Variable: Density of people per square kilometer
Population: The set of densities of people per square kilometer
of all countries
Sample: The set of densities of people per square kilometer of
56 countries
, Parameter: The mean density of people per square kilometer of
all countries
Statistic: The mean density of people per square kilometer of 56
countries
Problem Set 2: Epidemiology Calculations
Problem: A study on relapse frequency among people treated for
opiate addiction in Vermont followed 20 subjects over 24 months.
1. Total person-time at risk:
Calculate by summing all person-months for each subject
Answer: 170 person-months total
2. Incidence Density:
Formula: (new cases) ÷ (person-years)
Answer: 7.1 per 100 person-months
3. Cumulative Incidence:
Formula: (new cases) ÷ (total patients)
Answer: 6 per 10 people
Problem Set 3: R Programming Exercises
Problem 1: Fitbit step data analysis
r
steps = c(5892, 8977, 6804, 7345, 10112)
sort(steps) # [1] 5892 6804 7345 8977 10112
sort(steps, decreasing = TRUE) # [1] 10112 8977 7345 6804 5892
length(steps) # [1] 5