Hypothesis testing uses sample data to decide between two competing claims about a population. This chapter explains how to state null and alternative hypotheses, the difference between Type I and Type II errors, and how to carry out and interpret a test for a single population mean or proportion using a p-value.
Null and Alternative Hypotheses
A hypothesis test begins with two opposing statements about a population. The null hypothesis is the claim of no effect or no difference, taken as true unless the evidence contradicts it. The alternative hypothesis is what the researcher suspects may be true instead, and it may be one-sided or two-sided depending on the question. The test uses sample data to decide whether there is enough evidence to reject the null hypothesis in favour of the alternative.
Type I and Type II Errors
Because a decision is made from a sample, it can be wrong in two ways. A Type I error occurs when a true null hypothesis is rejected, and its probability is the significance level chosen for the test. A Type II error occurs when a false null hypothesis is not rejected. Lowering the chance of one type of error tends to raise the other, so the significance level is set in advance to balance the risks according to the consequences of each mistake.
Carrying Out the Test
To test a claim about a single population mean or proportion, the appropriate distribution is chosen: the normal distribution when the population standard deviation is known, and the Student t distribution when it is estimated from the sample. A test statistic is calculated and converted into a p-value, the probability of results at least as extreme as those observed if the null hypothesis were true. If the p-value is smaller than the significance level, the null hypothesis is rejected.
One-way analysis of variance, or ANOVA, tests whether the means of several groups differ. This chapter introduces the F distribution and the F-ratio on which the test is based, explains how one-way ANOVA compares variation between groups with variation within groups, and describes the main properties of the F distribution.
The F Distribution and the F-Ratio
The F distribution is a family of curves used when comparing variances or the means of several groups. It is right-skewed, never negative, and its exact shape depends on two separate degrees-of-freedom values. The test statistic in these procedures is the F-ratio, formed by dividing one estimate of variance by another. When the F-ratio is close to one the estimates agree, and a large F-ratio signals that the quantities being compared differ more than chance alone would explain.
One-Way ANOVA
One-way ANOVA tests whether three or more group means are equal, using a single factor to define the groups. The null hypothesis is that all the population means are the same, while the alternative is that at least one differs. The method compares the variation between the group means with the variation within the groups: if the between-group variation is large relative to the within-group variation, the F-ratio is large and the null hypothesis of equal means is rejected. Several conditions, including roughly equal variances, are assumed.
Facts About the F Distribution
The F distribution has several defining features. Its values are always positive because it is built from ratios of variances, and the curve is skewed to the right rather than symmetric. Its shape is governed by the degrees of freedom of the numerator and the denominator, and as both grow the distribution becomes more symmetric. Besides one-way ANOVA, the F distribution is also used to test whether two populations have equal variances, its second common application in this chapter.
Probability measures how likely an event is to occur. This chapter introduces the terminology of probability, explains what it means for events to be independent or mutually exclusive, presents the addition and multiplication rules for combining probabilities, and shows how contingency tables, Venn diagrams, and tree diagrams organise and display them.
Terminology of Probability
Probability is a number between zero and one that measures how likely an event is to happen, where zero means impossible and one means certain. An experiment is a process with an uncertain result, the sample space is the set of all possible outcomes, and an event is any collection of outcomes. The probability of an event is the proportion of outcomes that make it up when outcomes are equally likely, and the probabilities of all outcomes in the sample space add to one.
Independent and Mutually Exclusive Events
Two events are independent if the occurrence of one does not change the probability of the other, such as separate coin tosses. Two events are mutually exclusive if they cannot both happen at the same time, so they share no outcomes. These are different ideas: mutually exclusive events are strongly related, because one occurring rules the other out, whereas independent events have no influence on each other at all. Deciding which relationship holds determines how their probabilities combine.
Rules and Diagrams
The addition rule finds the probability that one event or another occurs, subtracting the overlap so it is not counted twice. The multiplication rule finds the probability that two events both occur, using conditional probability when the events are dependent. Contingency tables organise counts across two variables, Venn diagrams show how events overlap, and tree diagrams lay out sequences of outcomes with their probabilities, each making it easier to apply the rules correctly.
A confidence interval gives a range of plausible values for an unknown population value, built from sample data. This chapter shows how to construct confidence intervals for a population mean using the normal and the Student t distributions, and for a population proportion, and how the confidence level and sample size affect the interval.
What a Confidence Interval Is
A confidence interval is a range of values, calculated from a sample, that is likely to contain an unknown population value such as a mean or a proportion. It is built as a point estimate plus and minus a margin of error. The confidence level, often ninety-five percent, describes how often intervals built this way would contain the true value if sampling were repeated many times. A wider interval gives more confidence, while a narrower one is more precise.
Intervals for a Mean
When the population standard deviation is known, or the sample is large, a confidence interval for the mean uses the normal distribution, with the margin of error equal to a z-value times the standard error. When the population standard deviation is unknown and estimated from the sample, the Student t distribution is used instead. The t distribution is wider than the normal for small samples and approaches the normal as the sample size grows, which accounts for the extra uncertainty of estimating the standard deviation.
Intervals for a Proportion and Sample Size
A confidence interval for a population proportion is built from the sample proportion plus and minus a margin of error based on the normal distribution. The margin of error depends on the confidence level, the variability in the data, and the sample size. Because a larger sample reduces the margin of error, the required sample size can be calculated in advance from a chosen confidence level and a desired margin of error, letting a study be planned to reach a target precision.
The central limit theorem is one of the most powerful ideas in statistics. This chapter explains that when samples are large enough, the distribution of sample means, and of sample sums, is approximately normal regardless of the shape of the original population, and shows how this result is used to calculate probabilities.
The Central Limit Theorem for Means
The central limit theorem states that if you draw large enough random samples from any population and calculate each sample’s mean, the distribution of those sample means is approximately normal, whatever the shape of the original population. The mean of this sampling distribution equals the population mean, and its standard deviation, called the standard error, equals the population standard deviation divided by the square root of the sample size. Larger samples give a tighter distribution of means.
The Central Limit Theorem for Sums
The theorem applies to sample sums as well as means. If large samples are drawn from a population, the distribution of the sample sums is also approximately normal. The mean of the sum distribution is the sample size times the population mean, and its standard deviation is the square root of the sample size times the population standard deviation. This lets questions about totals, not just averages, be answered using the normal distribution.
Using the Central Limit Theorem
The theorem matters because it allows normal-distribution methods to be used even when the underlying population is not normal, provided the sample is large enough, commonly taken as at least thirty. To find the probability that a sample mean or sum falls in a given range, the value is converted to a z-score using the standard error, and the area under the standard normal curve is read. This underpins much of the inference that follows, including confidence intervals and hypothesis tests.