
BIOS 600 - Spring 2026
R experience: About half are beginners, one-quarter never used, one-quarter intermediate.
What supports learning: step-by-step examples + independent practice, hands-on coding, visuals, group work + discussion, clear instructions
Many shared being nervous about coding and learning statistics in general. That’s okay - we are here to support you!
Remember you can post a question at any time on Ed Discussion. You can even post anonymously. The teaching team is here to help.
There are tutors available through Gillings–I will share more info on Canvas soon.
If you can’t make normal office hours, we can definitely schedule other times to meet!
Populations and samples
Consider the following research questions:
In small groups, identify the target population and what represents an individual case for each of the questions above.
“The simple graph has brought more information to the data analyst’s mind than any other device.” - John Tukey


A statistical graphic is
Nominal data
Ordinal data
Count or rank data
Continuous data
In small groups, discuss the following:
According to the table on the previous slide, what kind of data types are the following variables?
Use the convention “Numerical; continuous” or “Categorical; Ordinal”, etc.
In designing a study, what variable should we use for smoking exposure?
In the real world, decisions are made based on sample size, statistical power, likelihood of measurement error, or simply convenience (this happens a lot!)
Let’s take a look at some basic visualizations using state-level data collected by the Center for Disease Control (CDC). We’ll examine the following variables:




Question
Is this plot useful?

Shows relationship between multiple continuous measurements
You can add color, shape, transparency, etc to further differentiate by category
Population and research question: Is the PCV13 vaccine effective against community acquired pneumonia in adults aged 65 or older?
Sample: 84,496 adults 65 years of age or older recruited in a trial between September 2008 and January 2010 and 101 sites throughout the Netherlands.
Parameters
Statistics
Population parameter of interest: vaccine efficacy among all adults aged 65 or older
Sample statistic collected: proportion of vaccinated adults in the trial who became ill with community-acquired pneumonia

\[\bar{x} = \frac{1}{n}(x_1 + \ldots + x_n) = \frac{1}{n} \sum_{i=1}^n x_i\]
Population mean \(\mu\) is calculated the same way, but would involve sum over every observation in the population (rarely possible!)
The sample mean is a point estimate of the population mean
Not the exact population mean (unless lucky), but for a representative sample, it’s a pretty good guess
As the sample size gets larger, on average \(\bar{x}\) gets closer and closer to \(\mu\)
Sample median: the \(50^{th}\) percentile
Middle number of observations after being ranked in numerical order
For odd number observations, it is the exact middle value; otherwise, it is the arithmetic average of the middle two.
Example: What is the median of \(\{3, 4, 5, 5, 7, 8, 9, 9\}\) ?
More robust to extreme values or outliers when compared to the mean.

Skewed distributions are not symmetric
They can be right or left skewed depending on which side the “tail” is on.
Sample minimum and maximum: the smallest and largest observations in the dataset
Sample range: the difference between the sample maximum and the sample minimum
Cutpoints dividing the data into equal-sized groups (tertiles, quartiles, quintiles, percentiles, etc.)
First quartile (Q1) and third quartile (Q3) cut off the bottom and top 25%, respectively
Interquartile range (IQR): Q3-Q1; shows the width of the middle 50% of the data
The sample minimum, Q1, Q2 (median), Q3, and maximum are sometimes called the five number summary
Observations numerically distant from others (definitions vary)
Statistical methods robust to outliers (e.g. the median) can be used if outliers are problematic
For example: the mean of 1, 2, 3, 4, 5, 10 is 4.1667, while the median of the same set of numbers is 3.5.
Should be noted and handled carefully! (e.g. maternal ages of 11 vs 111 in a dataset)
\[s = \sqrt{\frac{1}{n-1} \sum_{i=1}^n (x_i - \bar{x})^2}\]
Population SD \(\sigma\) is calculated the same way, but requires sum over everyone in the population (with \(\bar{x}\) replaced by \(\mu\))
Same units as original dataset for easier interpretation
Often used to express confidence (e.g. a margin of error for a poll being around \(\pm\) 2 SD of the mean)
Squared deviations weight larger deviations more heavily,
and so also positive and negative deviations do not cancel out
\[s^2 = \frac{1}{n-1} \sum_{i=1}^n(x_i - \bar{x})^2\]
Chebyshev’s inequality
| Range | Proportion |
|---|---|
| Average \(\pm\) 2 SDs | at least \(1-\frac{1}{4}\) = 75% |
| Average \(\pm\) 3 SDs | at least \(1-\frac{1}{9}\) = 89% |
| Average \(\pm\) 4 SDs | at least \(1-\frac{1}{16}\) = 94% |
| Average \(\pm\) 5 SDs | at least \(1-\frac{1}{25}\) = 96% |
If we know the exact distribution (coming soon), we can often calculate better bounds
However, these bounds hold for any distribution (that has a well-defined mean and variance)
You may have heard of the “68-95-99.7” rule. (68% of your data are within 1 SD, 95% are within 2 SD, 99.7% are within 3 SD).
However, this only works for bell-shaped (normal distribution) data.
Chebyshev holds for all distributions - no matter how skewed or irregular!


These two distributions have the same mean and standard deviation, but are clearly very different!
Go to this paper: https://pmc.ncbi.nlm.nih.gov/articles/PMC8851219/pdf/sur.2020.429.pdf (Also linked on course website)
Based on the table (pg. 593), what are the mean and median of the Total charges for emergency general surgery (EGS)? What might this mean about outliers?
Based on the histogram (pg. 595), does the data follow a normal distribution? How do you know?
What do the histogram and boxplot reveal that summary statistics alone might miss?
Which measure of center and spread are more appropriate here and why?
tidyverse package. Do so with the following in your Console: