Parameters, Sampling, and Selection Bias

Problem Context

Below is a preview showing a sample of 8 rows from the spotify dataset. The spotify dataset contains comprehensive audio metrics for all 12,500 tracks released on global weekly charts between 2021 and 2025, and is arranged alphabetically by track title. We want to estimate the average danceability score of songs released on the global charts from 2021 to 2025, but we are limited to analyzing a sample of 8 rows at a time.

Track ID Title Genre BPM Danceability
1 About Damn Time Pop 109 0.84
2 As It Was Indie Pop 174 0.52
3 Bad Habits Dance Pop 126 0.81
4 Blinding Lights Synthwave 171 0.51
5 Cold Heart Remix 116 0.80
6 Flowers Pop 118 0.71
7 Heat Waves Indie Rock 81 0.76
8 Stay Synth-Pop 170 0.59

Practice Questions

Part 1: Population Parameter

Choose the answer that correctly completes the following sentence: The population parameter we want to estimate is…

Correct Answer: The mean danceability score among all 12,500 tracks

A population parameter is a numerical value that describes a characteristic of the entire group of interest ((N = 12,500)). Because our stated objective is to investigate the average danceability across the complete catalog, the parameter represents the true mean score of all 12,500 items.

  • The average score among the 8 previewed items is a sample statistic \(\bar{x}\)
  • BPM and Genre represent different variables from the one under investigation.
Part 2: Sample Size Notation

Choose the statement that correctly represents the sample size notation for our investigation:

Correct Answer: (n = 8)

By standard statistical convention:

  • Lowercase (n) signifies the sample size, which is the number of observations gathered and analyzed ((n = 8)).
  • Uppercase (N) signifies the population size, which represents the size of the entire collection ((N = 12,500)).
Part 3: Identifying Selection Bias

Which of the following sampling strategies from the spotify dataset suffer from selection bias? Select all that apply.

Correct Statements:

  • Selecting the first eight rows of the dataset (pictured in the preview above).
  • spotify %>% filter(genre == "Pop") %>% slice_sample(n = 8, replace = FALSE)
  • spotify %>% filter(bpm > 120) %>% slice_sample(n = 8, replace = FALSE)

Explanation:
The dataset is sorted alphabetically by track title. Selecting the first 8 rows means you only look at songs starting with “A” or “B”, which creates selection bias if song titles correlate with release timing or artist naming trends. Filtering by specific criteria like genre == "Pop" or bpm > 120 explicitly cuts out parts of the population pool, making the sample unrepresentative of the overall 12,500 charts. Only an unfiltered slice_sample functions as a true Simple Random Sample (SRS).