Cambridge/Humboldt
Dataset 1: Descriptive Statistics and Visualization
Setup
Run the standard setup from the Student Overview before starting
this assignment. This assignment uses cam_1v1w, the
1v1-women subset.
Research Goal
Before we test any hypothesis about hormones and competition, we need
to understand the dataset.
What does baseline testosterone look like in this sample, and what
patterns should we notice before running inferential statistics?
Variables
| Variable |
Meaning |
Type |
t1 |
Testosterone before the contest (baseline) |
Quantitative |
c1 |
Cortisol before the contest (baseline) |
Quantitative |
group |
Man, NC Woman, or OC Woman (this assignment only has NC Woman and OC
Woman, since it’s the women-only subset) |
Categorical |
Decision
Point 1: What Kind of Variable Is Baseline Testosterone?
- Is
t1 quantitative or categorical?
- What kind of graph is appropriate for one quantitative
variable?
- What descriptive statistics should we report for
t1?
- Why would the mean alone not be enough?
Part 1: Describe Baseline
Testosterone
hist(cam_1v1w$t1,
main = "Distribution of Baseline Testosterone",
xlab = "Testosterone (transformed)")
mean(cam_1v1w$t1, na.rm = TRUE)
sd(cam_1v1w$t1, na.rm = TRUE)
median(cam_1v1w$t1, na.rm = TRUE)
range(cam_1v1w$t1, na.rm = TRUE)
Questions
- What is the average baseline testosterone in this sample?
- Is the distribution roughly symmetric, skewed, or unusual?
- Are there possible outliers?
- Would you describe baseline testosterone as highly variable or
fairly consistent? Explain.
Part
2: Visualize Baseline Hormones by Contraceptive Group
boxplot(t1 ~ group, data = cam_1v1w,
ylab = "Testosterone (transformed)",
main = "Baseline Testosterone by Contraceptive Group")
aggregate(t1 ~ group, data = cam_1v1w, FUN = mean, na.rm = TRUE)
aggregate(t1 ~ group, data = cam_1v1w, FUN = sd, na.rm = TRUE)
Decision Point 2: What
Are We Comparing?
- What is the outcome variable?
- What is the grouping variable?
- Is the grouping variable categorical or quantitative?
- How many groups are being compared?
- What statistical test might eventually fit this question?
Questions
- Which group appears to have the higher average baseline
testosterone?
- Do the groups look clearly different, slightly different, or very
similar?
- Is there overlap between the groups?
- Why is overlap important when interpreting group differences?
Part
3: Visualize the Relationship Between Two Baseline Hormones
plot(cam_1v1w$t1, cam_1v1w$c1,
xlab = "Testosterone (transformed)",
ylab = "Cortisol (transformed)",
main = "Baseline Testosterone and Cortisol",
pch = 16)
# Hormone data has some missing values, so keep only complete pairs for the trend line
ok <- complete.cases(cam_1v1w$t1, cam_1v1w$c1)
lines(lowess(cam_1v1w$t1[ok], cam_1v1w$c1[ok]), lwd = 2)
Decision
Point 3: What Kind of Relationship Is This?
- Are both variables quantitative?
- Does the plot suggest a positive, negative, or weak
relationship?
- Would a correlation be appropriate later? Why or why not?
- Would a t-test be appropriate for this question? Why or why
not?
First Scientific Summary
Write a short paragraph that includes:
- typical baseline testosterone (mean and SD),
- whether baseline testosterone appears to vary by contraceptive
group,
- whether baseline testosterone and cortisol appear related,
- one caution about what we cannot conclude yet,
- one potential confounding variable that could explain a pattern you
observed.