library(palmerpenguins)
library(tidyverse)
penguins |>
drop_na(bill_length_mm) |>
summarise(
M = mean(bill_length_mm),
Var = var(bill_length_mm),
SD = sd(bill_length_mm)
)2 Central Tendency and Normalizing Data
2.1 Key Concepts
- Mean, Median, Mode
- Sample Size
- Variance, Standard Deviation
- Z Scores
2.2 Key Formulas
\[\bar{X} = \frac{\sum X}{N}\]
\[s^2 = \frac{\sum (X - \bar{X})^2}{N-1}\]
\[s = \sqrt{\frac{\sum (X - \bar{X})^2}{N-1}}\]
\[z = \frac{X - \bar{X}}{s}\]
2.3 Code Examples
penguins |>
drop_na(bill_length_mm) |>
mutate(z_bill = (bill_length_mm - mean(bill_length_mm)) / sd(bill_length_mm)) |>
select(species, bill_length_mm, z_bill) |>
head(8)2.4 Exercises
2.4.1 Study Context
A researcher measured how high basketball players can jump (vertical leap), recorded in inches. Before testing, players were randomly assigned to drink either 12 oz of water or 12 oz of “Launch Sauce” (a new beverage aimed at enhancing athletic performance).
Water Group (n = 10)
| Participant | Vertical (in.) |
|---|---|
| 1 | 24 |
| 2 | 25 |
| 3 | 25 |
| 4 | 30 |
| 5 | 33 |
| 6 | 22 |
| 7 | 36 |
| 8 | 40 |
| 9 | 27 |
| 10 | 32 |
Launch Sauce Group (n = 12)
| Participant | Vertical (in.) |
|---|---|
| 1 | 20 |
| 2 | 33 |
| 3 | 38 |
| 4 | 29 |
| 5 | 34 |
| 6 | 28 |
| 7 | 26 |
| 8 | 37 |
| 9 | 41 |
| 10 | 30 |
| 11 | 25 |
| 12 | 41 |
water_group <- c(24, 25, 25, 30, 33, 22, 36, 40, 27, 32)
launch_sauce_group <- c(20, 33, 38, 29, 34, 28, 26, 37, 41, 30, 25, 41)2.4.2 Conceptual Questions
The formula for the mean of a sample is:
A. \(\bar{X} = \dfrac{\sum X^2}{N}\)
B. \(\bar{X} = \dfrac{\sum X}{N}\)
C. \(\bar{X} = \dfrac{\sum X}{N-1}\)
D. \(\bar{X} = \dfrac{\sum (X - \bar{X})}{N}\)
The formula for the variance of a sample is:
A. \(s^2 = \dfrac{\sum (X - \bar{X})}{N-1}\)
B. \(s^2 = \dfrac{\sum (X - \bar{X})^2}{N}\)
C. \(s^2 = \dfrac{\sum (X - \bar{X})^2}{N-1}\)
D. \(s^2 = \sqrt{\dfrac{\sum (X - \bar{X})^2}{N-1}}\)
The formula for the standard deviation of a sample is:
A. \(s = \dfrac{\sum (X - \bar{X})^2}{N-1}\)
B. \(s = \sqrt{\dfrac{\sum (X - \bar{X})^2}{N}}\)
C. \(s = \sqrt{\dfrac{\sum (X - \bar{X})^2}{N-1}}\)
D. \(s = \dfrac{\sum (X - \bar{X})^2}{N}\)
The formula for computing a z-score from a raw score is:
A. \(z = \dfrac{\bar{X} - X}{s}\)
B. \(z = \dfrac{X - \bar{X}}{s^2}\)
C. \(z = \dfrac{X - \bar{X}}{s}\)
D. \(z = X \cdot s + \bar{X}\)
The formula for computing a raw score from a z-score is:
A. \(X = \dfrac{z}{s} + \bar{X}\)
B. \(X = z \cdot s - \bar{X}\)
C. \(X = z \cdot s + \bar{X}\)
D. \(X = \dfrac{z - \bar{X}}{s}\)
Which of the following best describes what a z-score represents?
A. The raw score minus the median, expressed in units of variance
B. The number of standard deviations a score is above or below the mean
C. The probability that a score occurs in a normal distribution
D. The percentile rank of a score within a sample
If a value is exactly equal to the mean, its corresponding z-score will always be:
A. 1
B. Undefined
C. 0
D. Equal to the standard deviation
If a value is exactly one standard deviation above the mean, its z-score will always be:
A. 0
B. −1
C. 1
D. It depends on the sample size
TRUE or FALSE: If value “A” is 3.5 standard deviations above the mean, it is guaranteed that any randomly selected data point will be less than “A,” because z-scores max out at ±3.5.
A. True
B. False
TRUE or FALSE: Computing z-scores allows us to “normalize” data with respect to the mean, making it possible to compare performance across different outcomes (e.g., comparing a height score to a memory score).
A. True
B. False
2.4.3 Computational Questions
Use the study data above. Show all work.
Problem 1
Compute the variance and standard deviation for the Launch Sauce Group.
| Statistic | Value |
|---|---|
| Sum = | |
| N = | |
| Mean = | |
| SS = | |
| Variance = | |
| Standard Deviation = |
Problem 2
Compute the z-score for a vertical of 30 inches in the Water Group. Show the mean, SD, and all computational steps.
Problem 3
Compute the z-score for a vertical of 37 inches in the Launch Sauce Group. Show all steps.
Problem 4
A z-score of 1.25 in the Launch Sauce Group corresponds to what raw score (round to the nearest inch)? Show all steps.
Problem 5
Answer the following probability questions. Assume a normal distribution.
- What is the probability that a randomly selected score will be less than z = 0.0?
- What is the probability that a randomly selected score will fall between z = −1 and z = +1?
- What is the probability that a score in the Launch Sauce Group will be less than 21 inches? Show all steps.
Problem 6
Draw the approximately normal distribution implied by the Launch Sauce Group. On the x-axis, include two scales (raw scores and z-scores), with vertical lines at the mean and at ±1 and ±2 standard deviations. Label all key values.