Interpret tests comparing one sample to hypothesized value
Relatehypothesis testing to confidence intervals
Recognize when to use a nonparametric test
2 Data
Pulse dataset from the Stat2Data package
A dataset with n = 232 observations on the following 7 variables.
Active: Pulse rate (beats per minute) after exercise
Rest: Resting pulse rate (beats per minute)
Smoke: 1=smoker or 0=nonsmoker
Sex: 1=female or 0=male
Exercise: Typical hours of exercise (per week)
Hgt: Height (in inches)
Wgt: Weight (in pounds)
Convert the factor variables to factor variables, as in the lecture
as.factor() function
3 Tasks
Make plots of variables as needed
3.1 Gender split
Is the gender split in this sample the same as in the total population (i.e., 50/50)?
What kind of variable is this?
What test should you do?
Directional or non-directional?
Present the results of the test
Write your conclusions: Is the gender split in this sample comparable to that in the total population?
3.2 Smoking rate
Is the smoking rate in this sample the same as the 11.5% rate in the US? (CDC info on smoking here
What kind of variable is this?
What test should you do?
Directional or non-directional?
Present the results of the test
Write your conclusions: Is the smoking rate in this sample comparable to the 11.5% rate in the US?
3.3 Elevated pulse rate
Is the active pulse rate higher than the high end of resting pulse rate of 100 bpm?
What kind of variable is this?
What test should you do?
Directional or non-directional?
Present the results of the test
Write your conclusions: Is the active pulse rate different from the high end of resting pulse rate of 100 bpm?
3.4 Height among men
Is the height of men in this sample different from the US average of 5 feet 9 inches?
What kind of variable is this?
What test should you do?
Directional or non-directional?
Present the results of the test
Write your conclusions: Is the height of men in this sample different from the US average of 5 feet 9 inches?
Source Code
---title: "BTS 510 Lab 8"format: html: embed-resources: true self-contained-math: true html-math-method: katex number-sections: true toc: true code-tools: true code-block-bg: true code-block-border-left: "#31BAE9"---```{r}#| label: setuplibrary(tidyverse)set.seed(12345)theme_set(theme_classic(base_size =16))```## Learning objectives* *Describe* the logic of **hypothesis testing*** *Interpret* tests comparing **one sample** to hypothesized value* *Relate* **hypothesis testing** to **confidence intervals*** *Recognize* when to use a **nonparametric test**## Data * `Pulse` dataset from the **Stat2Data** package * A dataset with $n$ = 232 observations on the following 7 variables. * `Active`: Pulse rate (beats per minute) after exercise * `Rest`: Resting pulse rate (beats per minute) * `Smoke`: 1=smoker or 0=nonsmoker * `Sex`: 1=female or 0=male * `Exercise`: Typical hours of exercise (per week) * `Hgt`: Height (in inches) * `Wgt`: Weight (in pounds)* Convert the factor variables to factor variables, as in the lecture * `as.factor()` function## Tasks* Make plots of variables as needed### Gender split* Is the gender split in this sample the same as in the total population (i.e., 50/50)? * What kind of variable is this? * What test should you do? * Directional or non-directional? * Present the results of the test * Write your conclusions: Is the gender split in this sample comparable to that in the total population?### Smoking rate* Is the smoking rate in this sample the same as the 11.5% rate in the US? (CDC info on smoking [here](https://www.cdc.gov/tobacco/campaign/tips/resources/data/cigarette-smoking-in-united-states.html) * What kind of variable is this? * What test should you do? * Directional or non-directional? * Present the results of the test * Write your conclusions: Is the smoking rate in this sample comparable to the 11.5% rate in the US?### Elevated pulse rate* Is the **active** pulse rate **higher** than the **high end of resting pulse rate** of 100 bpm? * What kind of variable is this? * What test should you do? * Directional or non-directional? * Present the results of the test * Write your conclusions: Is the active pulse rate different from the high end of resting pulse rate of 100 bpm?### Height among men* Is the height of **men** in this sample **different** from the US average of 5 feet 9 inches? * What kind of variable is this? * What test should you do? * Directional or non-directional? * Present the results of the test * Write your conclusions: Is the height of men in this sample different from the US average of 5 feet 9 inches?