AP Statistics
Describing data, collecting it well, probability and its distributions, inference for proportions and means, and regression, unit by unit in the order of the AP Statistics course and exam description: every idea taught on a real data set, with conclusions in context. Independent prep, not affiliated with or endorsed by the College Board.
Lessons
- What a statistical study is: A study answers a question about a whole population from data on a sample, because measuring everyone is rarely possible; a statistic computed from the sample is our estimate of the population's parameter, and it usually misses by a little.
- Categorical variables, tables and bar charts: A categorical variable sorts units into groups, so it is summarized by counting each group; turning counts into proportions lets groups of different sizes be compared, in a table, a bar chart or a pie chart.
- Dotplots, stemplots and histograms: A quantitative variable is graphed along its number scale, one dot or leaf per value or one bar per bin, so the graph keeps the values in order; changing a histogram's bin width can change what its shape seems to say.
- Describing a distribution: A description of a quantitative distribution names its shape, center and variability and any outliers, gaps or clusters, all in the context of the data; a skew is named for its long tail.
- Mean and median: The mean balances the values and the median splits them in half, so a long tail or an outlier pulls the mean toward it while the median barely moves; in a right-skewed distribution the mean sits above the median.
- Quartiles and percentiles: The quartiles are the medians of the lower and upper halves, so they fence off the middle 50% of the values; a value's percentile is the share of the data at or below it.
- Range, IQR and standard deviation: Variability is measured by the range, the interquartile range or the standard deviation, which is roughly the typical distance of a value from the mean; adding a constant leaves all three alone while multiplying by one scales them.
- Outliers and boxplots: A value more than 1.5 IQR beyond a quartile, or more than two standard deviations from the mean, is flagged as an outlier; a boxplot draws the five-number summary with outliers marked, and resistant measures like the median and IQR are the ones to trust when they are there.
- Comparing distributions: Two groups are compared on the same scale by their centers, variabilities, shapes and unusual features, each comparison stated with numbers and in context, because one summary alone can hide how the groups differ.
- z-scores: A z-score counts how many standard deviations a value sits above or below its mean, which puts values from different distributions on one scale so they can be compared.
- Experiments, observational studies and the question: An experiment imposes treatments while an observational study only records, so only an experiment with random assignment can show cause and effect; a confounding variable linked to both variables offers another explanation, and only a random sample lets us generalize to the population.
- Random sampling methods: A simple random sample gives every group of n the same chance; stratified, cluster and systematic samples bring chance in other ways, and each suits a different population and question.
- Bias in sampling: Bias is a systematic error that pushes a statistic the same way every time, from volunteers, undercoverage, nonresponse or leading questions, and a bigger sample doesn't fix it.
- A well-designed experiment: A good experiment compares treatments, assigns them at random, replicates on enough units and controls other sources of variation, with placebos and blinding where expectations could move the response; random assignment is what makes cause and effect a fair conclusion.
- Blocks and matched pairs: Grouping similar units into blocks and randomizing within each block takes the blocking variable's variation out of the comparison, and a matched pairs design is the case with two treatments.
- Two-way tables: A two-way table counts units by two categorical variables at once, and a segmented or side-by-side bar chart of its rows shows whether the distribution of one variable changes across the groups of the other.
- Joint, marginal and conditional relative frequencies: Dividing a cell by the whole table gives a joint relative frequency, a total by the table a marginal one, and a cell by its row or column total a conditional one; two variables are associated when the conditional distributions differ.
- Estimating probabilities by simulation: A chance process too awkward to work out can be imitated many times with random numbers, and the share of runs in which the event happens estimates its probability, better the more runs there are.
- Probability, sample spaces and complements: A probability is the long-run share of times an event happens; with equally likely outcomes it is the favourable outcomes over all of them, and the chance something does not happen is one minus the chance it does.
- Mutually exclusive events and the addition rule: Two events are mutually exclusive when their joint probability is zero; the chance of A or B is the chance of A plus the chance of B minus the chance of both, which is just the sum for mutually exclusive events.
- Conditional probability: The chance of A given B is the share of B's probability where A also happens, P(A and B) over P(B), because knowing B has happened shrinks the sample space to B.
- Independent events: Events are independent when knowing one has happened doesn't change the chance of the other, P(A given B) equals P(A), and only then is the chance of both the product of their chances.
- Random variables and their distributions: A random variable gives a number to each outcome of a chance process, and its probability distribution lists every value with its probability, the probabilities adding to one.
- Expected value and standard deviation of a random variable: The expected value is the probability-weighted average of the values, the long-run mean outcome, and the standard deviation is the typical distance of an outcome from it over the long run.
- The binomial distribution: Counting successes in a fixed number of independent trials, each with the same chance of success, gives a binomial random variable, whose probabilities come from counting the arrangements of successes and failures.
- Binomial mean and standard deviation: A binomial count has mean np and standard deviation the square root of np(1 - p), so its spread grows with n while the share of successes settles near p.
- The normal distribution and the empirical rule: A normal distribution is a symmetric bell set by its mean and standard deviation, and about 68%, 95% and 99.7% of its values lie within one, two and three standard deviations of the mean.
- Areas under a normal curve: Any normal probability is an area under the curve, found by turning the boundaries into z-scores or with technology; working backwards from an area gives the value at a given percentile.
- Sampling distributions: A statistic varies from sample to sample, and the distribution of its values over all possible samples, which a simulation approximates, is its sampling distribution; reshuffling responses between groups gives a randomization distribution the same way.
- The central limit theorem: Whatever the population's shape, the sampling distribution of a sample mean gets closer to normal as the sample size grows, which is why normal calculations work for means of large samples.
- Good estimators: A statistic is an unbiased estimator when its sampling distribution is centered on the parameter, and a better one when that distribution is also narrow, which a larger sample brings.
- The sampling distribution of a sample proportion: A sample proportion has mean p and standard deviation the square root of p(1 - p) over n, and its distribution is close to normal when the sample holds at least ten expected successes and ten expected failures.
- A confidence interval for a proportion: A confidence interval is the estimate plus or minus a margin of error, a critical value times the standard error, and the interval catches the true proportion in the stated share of samples when the conditions hold.
- What a confidence interval says: We are 95% confident because the method captures the parameter in 95% of samples, not because the parameter has a 95% chance of being in this one interval; a claimed value outside the interval is not plausible.
- Setting up a test for a proportion: A test starts from a null hypothesis of no change and an alternative the study hopes to show, both about the population proportion, and checks that the sample is random and large enough before testing.
- p-values: A p-value is the chance, if the null hypothesis were true, of a sample result at least as extreme as the one observed, so a small p-value is evidence against the null.
- Carrying out a test for a proportion: The test statistic counts how many standard errors the sample proportion lies from the null value; its p-value is compared with the significance level and the decision is stated about the alternative, in context.
- Type I and Type II errors: Rejecting a true null hypothesis is a Type I error, with probability alpha, and failing to reject a false one is a Type II error; which is worse depends on the consequences in context.
- The power of a test: Power is the chance a test rejects a false null, one minus the chance of a Type II error, and it grows with the sample size, the significance level and the distance between the truth and the null value.
- The sampling distribution of a difference of proportions: For two independent samples the difference of sample proportions is centered on the true difference, and its variance is the sum of the two variances, so the standard deviations add in squares.
- A confidence interval for a difference of proportions: The difference of sample proportions plus or minus a critical value times its standard error estimates the true difference, and an interval that contains zero leaves no difference plausible.
- Testing a difference of proportions: Under the null hypothesis of equal proportions the two samples are pooled to estimate the common proportion, and the z statistic counts standard errors between the observed difference and zero.
- Setting up a chi-square test: A chi-square test for homogeneity compares one variable across several populations and one for independence asks whether two variables are associated in one population; both compare observed counts with the counts expected if the null hypothesis were true.
- Carrying out a chi-square test: The chi-square statistic adds up each cell's squared gap between observed and expected counts over the expected count, and large values, far out in a chi-square distribution with (rows - 1)(columns - 1) degrees of freedom, are evidence against the null.
- The sampling distribution of a sample mean: A sample mean has mean mu and standard deviation sigma over the square root of n, and it is close to normal when the population is normal or the sample is large, so means of bigger samples vary less.
- A confidence interval for a mean: With sigma unknown we use s and a t critical value with n - 1 degrees of freedom, which is wider than z to pay for the extra uncertainty; for paired data the same interval is built on the differences.
- Claims from an interval for a mean: An interval for a mean gives the plausible values of the population mean, so a claimed value inside it is consistent with the data and one outside it is not; a larger sample or lower confidence makes the interval narrower.
- Setting up a test for a mean: A test for a mean, or for the mean difference of paired data, states its hypotheses about mu and checks for a random sample and a normal enough sampling distribution before it uses t.
- Carrying out a t test: The t statistic counts standard errors between the sample mean and the null value, and its p-value comes from a t distribution with n - 1 degrees of freedom, read against the significance level in context.
- The sampling distribution of a difference of means: For two independent samples the difference of sample means is centered on the difference of population means, with variance the sum of each mean's variance.
- A confidence interval for a difference of means: The difference of sample means plus or minus a t critical value times the combined standard error estimates the difference of population means, and whether zero is inside decides whether a difference is plausible.
- Testing a difference of means: A two-sample t test asks whether two population means differ, using the gap between sample means in standard errors, and it applies to independent groups, never to paired data.
- Scatterplots: A scatterplot puts the explanatory variable across and the response up, and its pattern is described by direction, form, strength and unusual features, in context.
- Correlation: The correlation r measures the direction and strength of a linear association on a scale from -1 to 1 with no units, and it says nothing about curves or about cause.
- Linear regression models: A line fitted to the data predicts the response from the explanatory variable, a prediction within the range of the data is an interpolation, and one far outside it is an extrapolation that can't be trusted.
- Residuals and residual plots: A residual is the observed response minus the predicted one, positive when the line underpredicts, and a residual plot with no pattern says a line is an appropriate model.
- The least-squares regression line: The least-squares line makes the sum of squared residuals as small as possible, its slope is r times the ratio of the standard deviations, and it passes through the point of means.
- Interpreting slope, intercept and r squared: The slope is the predicted change in the response for each one-unit increase in the explanatory variable, the intercept is the prediction at zero, and r squared is the share of the response's variation the line accounts for.