PCED study materials
PCED study resources

PCED flashcards

PCED · Build recall with a focused review session.

33 cards. Read the term and the definition here. The deck at the top of this page is optional.

Population vs sample
The population is every unit you want to conclude about; the sample is the subset actually measured. Statistics computed on the sample estimate population parameters.
Simple random sampling
Every unit in the population has an equal and independent chance of selection, typically via random number generation. It removes selection bias but may under-represent small subgroups.
Stratified sampling
The population is split into homogeneous strata (e.g., region, age band) and random samples are drawn within each stratum. Guarantees representation of every stratum and usually reduces variance.
Selection bias
A distortion where the units included in the data differ systematically from the population of interest in a way tied to the outcome being measured.
Nominal vs ordinal data
Nominal categories are unordered labels such as color or country. Ordinal categories have a meaningful order but unequal or unknown spacing, such as satisfaction ratings.
Tidy data layout
One row per observation, one column per variable, one value per cell. This layout lets libraries operate column-wise and makes grouping, joining, and plotting straightforward.
Type coercion with errors
Converting strings to numbers where invalid entries become missing instead of raising an exception, e.g. pandas to_numeric with errors set to coerce.
IQR outlier rule
Compute Q1 and Q3; the interquartile range is Q3 minus Q1. Values below Q1 minus 1.5 IQR or above Q3 plus 1.5 IQR are flagged as potential outliers.
Missing data mechanisms
MCAR means missingness is unrelated to any value; MAR means it is explained by observed variables; MNAR means it depends on the unobserved value itself and is hardest to correct.
Duplicate key removal
Identify rows sharing identical values on chosen key columns, then keep one record per key. Always specify the key subset; default full-row comparison misses near-duplicates.
Post-cleaning validation checks
Compare row counts before and after cleaning, count nulls per column, verify numeric min and max ranges, and confirm the intended primary key is unique.
Sample vs population standard deviation
Sample standard deviation divides by n minus one (ddof equals one); population standard deviation divides by n. NumPy defaults to population, so pass ddof equals one for samples.
NumPy axis argument
In reductions like sum or mean, axis zero collapses rows and returns one value per column; axis one collapses columns and returns one value per row.
Boolean mask filtering
A boolean array of the same shape selects elements where true. Combine conditions with ampersand, pipe, and tilde inside parentheses; Python and/or do not work elementwise.
collections.Counter
A dict subclass that counts hashable items from an iterable. most_common(k) returns the k highest-count pairs, useful for frequency summaries of categorical fields.
csv.DictReader usage
Reads a CSV file treating the first row as headers, yielding each record as a dict keyed by column name. Values arrive as strings and need explicit conversion.
datetime timedelta arithmetic
Subtracting two date or datetime objects yields a timedelta. Access days directly, use total_seconds for finer resolution, and format output with strftime.
groupby with agg
Splitting rows by key, applying reductions per group, and returning one row per key. transform instead broadcasts group results back to the original row count.
np.where vectorized conditional
Returns elements chosen from two arrays based on a boolean condition, equivalent to an elementwise if/else without a Python loop.
Inverted pyramid summary
Report the conclusion first, then the supporting metric, then method and caveats. Readers who stop after one sentence still get the actionable finding.
Numerator and denominator reporting
State counts with their base, such as 38 of 200 orders, 19 percent. This bounds the claim, makes it checkable, and prevents overstating small absolute counts.
Chart type selection rule
Bar for category comparison, line for trends over time, histogram for a single distribution, scatter for two-variable relationships, pie only for few parts of a whole.
Zero baseline for bars
Bar length encodes magnitude, so the axis must start at zero. Truncating it exaggerates differences and misleads readers about relative size.
Confidence interval reporting
An estimate paired with a range reflecting sampling uncertainty. A mean reported without spread or sample size cannot be judged for reliability.
Correlation versus causation
Two variables moving together does not establish that one causes the other. Confounders, reverse causation, and coincidence are alternative explanations to rule out.
Purpose limitation principle
Personal data collected for a stated purpose should not be reused for unrelated purposes without a new lawful basis. It constrains secondary analysis of existing datasets.
Quasi-identifiers and re-identification
Fields like age, postal code, and date are not direct identifiers but combine to single out individuals. Removing names alone does not anonymize a dataset.
k-anonymity
Every record is indistinguishable from at least k minus one others on the quasi-identifier columns. Higher k means stronger privacy but greater information loss.
Small-cell suppression
Withholding or aggregating table cells with counts below a threshold, commonly five, so published statistics cannot be traced back to specific individuals.
Sequential versus diverging scales
Sequential data, ordered low to high, needs a single-hue ramp. Diverging data needs two hues meeting at a meaningful midpoint such as zero or an average.
Data-ink ratio
The proportion of chart ink that encodes data rather than decoration. Removing gridlines, 3-D effects, and redundant labels raises the ratio and improves readability.
Mutable default argument trap
Default argument values are evaluated once when the function is defined. A list default is shared across calls, so use None and create a new list inside.
Context manager for files
The with open statement guarantees the file is closed even if an exception occurs inside the block, preventing leaked handles and unflushed writes.