Data types
- A team monitoring stream health at 40 sites records: dissolved oxygen (mg/L), substrate type (sand, gravel, cobble, or bedrock), overall water quality rating (poor/fair/good/excellent), whether each site is impaired or not impaired, and stream flow rate (m³/s). Identify the type of each variable.
- Dissolved oxygen: quantitative, continuous
- Substrate type: qualitative, nominal
- Water quality rating: qualitative, ordinal
- Impaired / not impaired: qualitative, binary
- Flow rate: quantitative, continuous
- A camera-trap survey records, for each detection event: species observed (deer, coyote, bobcat, …), body weight (kg), sex (male/female), and number of individuals in the detection. Identify the type of each variable.
- Species observed: qualitative, nominal
- Body weight: quantitative, continuous
- Sex: qualitative, binary
- Number of individuals: quantitative, discrete
Histogram and Quartiles
- Twelve months had these total rainfall amounts, in mm: 5, 12, 18, 22, 25, 30, 35, 38, 42, 55, 60, 68. Using bins of width 20 mm (starting at 0), tally the counts for a histogram.
| Bin (mm) | Count |
|---|---|
| [0, 20) | 3 |
| [20, 40) | 5 |
| [40, 60) | 2 |
| [60, 80) | 2 |
- A boxplot of fish length (cm) for a sample of trout shows: whiskers spanning 22 to 52, a box from \(Q_1=28\) to \(Q_3=41\), and one point plotted individually at 65. Find the \(IQR\), and confirm using the \(1.5\times IQR\) rule whether the point at 65 should be plotted as an outlier.
\[IQR = Q_3-Q_1 = 41-28 = 13\] \[Q_3+1.5\times IQR = 41+19.5 = 60.5\] Since \(65 > 60.5\), the point is correctly plotted as an outlier — that’s also why the upper whisker stops at 52 (the largest observation still within \(1.5\times IQR\) of the box).
- Soil nitrate readings (mg/kg) at 7 plots: 3, 7, 8, 12, 15, 20, 24. Find \(Q_1\), \(Q_2\), and \(Q_3\).
Median (\(Q_2\)) = 12 (the 4th of 7 ordered values).
Lower half: 3, 7, 8 \(\rightarrow Q_1 = 7\)
Upper half: 15, 20, 24 \(\rightarrow Q_3 = 20\)
- Using the soil nitrate quartiles above (\(Q_1=7\), \(Q_3=20\)), is a new reading of 42 mg/kg an outlier?
\[IQR = Q_3-Q_1 = 20-7 = 13\] \[Q_3+1.5\times IQR = 20+19.5 = 39.5\] Since \(42 > 39.5\), yes — a reading of 42 mg/kg would be flagged as an outlier.
Mean, Median, Mode
- A rural county has these home sale prices, in $1,000s: 170, 180, 195, 205, 210, 220, 230, 850. Find the median sale price.
The data are already ordered (8 values), so with an even number of data points the median is the average of the 4th and 5th values: \[ median = \frac{205+210}{2} = 207.5 \] $207,500.
- Find the mean sale price for the same data.
\[ mean = \frac{170+180+195+205+210+220+230+850}{8} = \frac{2260}{8} = 282.5 \] $282,500.
- Which measure — the mean or the median — better represents a “typical” home price in this county, and why?
The median ($207,500) is more representative. The single $850,000 sale is an outlier that pulls the mean up to $282,500, well above where most of the prices actually fall. Because the median is based on rank rather than magnitude, it isn’t distorted by that outlier.
- A camera-trap survey records the habitat type at 15 detection points: forest, forest, grassland, wetland, forest, shrubland, grassland, forest, wetland, forest, grassland, shrubland, forest, wetland, forest. What is the mode?
Counting occurrences: forest = 7, grassland = 3, wetland = 3, shrubland = 2. The mode is forest (7 of 15 detections).
Variance and standard deviation
- Weekly flow rate (m³/s) was recorded at two stream gauges over 5 weeks:
- Gauge A: 10, 10, 11, 9, 10
- Gauge B: 4, 10, 18, 6, 12
Both have the same mean. Find the variance of each, and explain what that tells you about the two gauges.
Both datasets have mean \(= 10\).
Gauge A: deviations \(0, 0, 1, -1, 0\); squared \(0, 0, 1, 1, 0\); sum \(=2\) \[S^2_A = \frac{2}{5-1} = 0.5\]
Gauge B: deviations \(-6, 0, 8, -4, 2\); squared \(36, 0, 64, 16, 4\); sum \(=120\) \[S^2_B = \frac{120}{5-1} = 30\]
Despite having identical means, Gauge B’s flow is far more variable (variance 30 vs. 0.5) — Gauge A is comparatively stable week to week, while Gauge B fluctuates a lot.
- Mean summer stream temperature at a site was reported as \(18.2\pm1.4\,°C\) (mean \(\pm\) standard deviation, \(n=30\)). Using the standard deviation, what range of temperatures would you expect most observations to fall within?
\[mean \pm 1\ SD = 18.2 \pm 1.4 = [16.8, 19.6]\,°C\] Because the standard deviation is expressed in the same units as the data (°C), most of the 30 observed temperatures fall roughly within 16.8–19.6°C of the mean.
Confidence intervals
- Mean mercury concentration in lake trout is reported as \(0.38\pm0.05\) ppm, with a 95% confidence interval of \([0.34, 0.42]\) ppm (\(n=22\)). Which of these statements is the correct interpretation?
There is a 95% chance the true mean mercury concentration is between 0.34 and 0.42 ppm.
If we repeatedly sampled 22 trout and calculated a CI each time, about 95% of those intervals would contain the true mean mercury concentration.
Statement (b) is correct. The true mean mercury concentration is a fixed value — it either falls inside this particular interval or it doesn’t, so there’s no probability attached to this one interval. The 95% describes how often the procedure would capture the true mean over many repeated samples.
- Based on the trout example above, if 100 independent samples of 22 trout were each used to calculate a 95% confidence interval, about how many of those 100 intervals would you expect to contain the true population mean mercury concentration?
About 95 of the 100 intervals — that’s what “95% confidence” means: over many repeated samples, roughly 95% of the calculated intervals will contain the true population parameter.