Lecture 7 Notes

📚 Lecture 7 Notes (1).pdf

Brief overview

This document introduces the fundamental principles of statistical inference, exploring the relationship between population parameters and sample estimates. It is essential for understanding how to draw conclusions about populations from sample data.

Key points

  • Overview of statistical inference and its core components
  • How sample statistics relate to population parameters
  • Understanding sampling distributions and the Central Limit Theorem
  • Principles of hypothesis testing, including null and alternative hypotheses
  • Calculating and interpreting Z-tests and p-values for hypothesis decisions

1. Introduction to statistical inference (part 1)

1.1 The goal of statistical inference

Statistical inference is the process of drawing conclusions about a larger group using data from a smaller one. We use information from a sample to understand a population.

A parameter describes the whole population. A statistic describes the sample.

🔑 Important: We aim to make educated guesses about population parameters using sample statistics 12.

1.2 Understanding probability distributions

Probability distributions show how likely different outcomes are. A probability density curve illustrates these probabilities.

The area under the curve represents the probability of values falling within a certain range.

For example, the shaded area under a curve between values 3 and 4 shows the probability of observing a value in that interval 5.

A probability density curve showing the proportion of the population with values between 3 and 4.

The area under any probability density curve always equals 1. This total area represents 100% of the possible outcomes.

Shading a region between two values on the curve shows the probability of a result falling within that specific range 7.

A probability density curve showing the distribution of a population, with the area between 4 and 6 shaded to represent a probability of 0.16.

As values increase, the probability density can decrease. An area of 0.63 under the curve from 0 to 1 suggests a high probability for values in this range.

The area between 1 and 2 is smaller (0.23), indicating a lower probability for values in that range 9.

A probability density curve with shaded areas representing probabilities between intervals.

1.3 The Normal Distribution

The Normal Distribution is a very common bell-shaped curve used in statistics. It is defined by its mean (μ\mu) and standard deviation (σ\sigma).

The mean is the center of the distribution, and the standard deviation measures the spread of the data.

Different means shift the curve left or right. A higher standard deviation makes the curve wider and flatter, while a lower standard deviation makes it narrower and taller 13.

Two normal distribution curves are shown, one with mean 0 and standard deviation 1, and another with mean 5 and standard deviation 1.

The Empirical Rule (or 68-95-99.7 rule) is a key characteristic of normal distributions. It states:

  • Approximately 68% of the data falls within one standard deviation of the mean (μ±1σ\mu \pm 1\sigma).
  • Approximately 95% of the data falls within two standard deviations of the mean (μ±2σ\mu \pm 2\sigma).
  • Approximately 99.7% of the data falls within three standard deviations of the mean (μ±3σ\mu \pm 3\sigma).

A normal curve illustrating the empirical rule, showing percentages of data within standard deviations of the mean.

🔑 Important: The Empirical Rule applies to bell-shaped distributions that are approximately normal 17.

1.4 Standardizing data with z-scores

A z-score measures how many standard deviations a data point is away from the mean. It allows us to compare values from different distributions.

The formula for a z-score is:

z=x−μσz = \frac{x - \mu}{\sigma}

Where:

  • xx is the individual data point.
  • μ\mu is the population mean.
  • σ\sigma is the population standard deviation.

A standard normal distribution curve with the area to the left of a negative z-score shaded.

A positive z-score means the data point is above the mean. A negative z-score means the data point is below the mean.

A z-score of 0 means the data point is exactly at the mean.

📝 Example: If a student scores 85 on a test with a mean of 70 and a standard deviation of 10, their z-score is z=(85−70)/10=1.5z = (85 - 70) / 10 = 1.5. This means they scored 1.5 standard deviations above the mean.

🔑 Important: The standard normal distribution has a mean of 0 and a standard deviation of 1.


🔑 Important: Statistical inference uses sample data to understand broader population characteristics, with probability distributions and z-scores being fundamental tools for this process 19.

2. Introduction to statistical inference (part 2)

2.1 Understanding probability and the normal distribution

Statistical inference uses sample data to draw conclusions about a population. Key to this process is understanding probability.

The normal distribution, also known as the bell curve, is a fundamental concept in probability and statistics. It describes many natural phenomena and is central to statistical inference.

The standard normal distribution has a mean of 0 and a standard deviation of 1. This specific distribution is often used as a reference.

We can find the probability of different outcomes by looking at the area under its curve.

The area under the normal distribution curve represents probability. A shaded region indicates the probability of a random variable falling within a specific range.

A z-score tells us how many standard deviations a data point is from the mean.

A diagram illustrating the cumulative normal distribution with a shaded area representing probability.

We can use tables to find these probabilities. These tables show the cumulative probability for various z-scores.

The cumulative probability is the area to the left of a given z-score.

A table showing cumulative probabilities for a standard normal distribution based on z-scores.

2.1.1 Calculating areas under the normal curve

To find probabilities for a standard normal distribution, we follow a systematic process. First, we sketch the normal curve.

Then, we label the z-scores on the horizontal axis.

Next, we look up the areas in a standard normal distribution table (often called Table A.2). This table typically provides the area to the left of a given z-score.

Finally, we calculate the specific areas needed. This involves finding areas to the left, right, or between z-scores.

This diagram outlines the steps for finding an area under a standard normal curve.

  • Area to the left of a z-score: This is directly found in the standard normal table.
  • Area to the right of a z-score: Subtract the area to the left from 1. The total area under the curve is always 1.
  • Area between two z-scores: Find the area to the left of the higher z-score. Subtract the area to the left of the lower z-score.

Consider finding the probability that a z-score is less than -0.64. You would look up -0.64 in the standard normal table.

This value represents the shaded area to the left of -0.64 on the curve.

A normal distribution curve with the area to the left of z = -0.64 shaded, representing a probability of 0.26.

The area under the curve, representing the probability, can also be visualized directly. A shaded region visually confirms the calculated probability.

A normal curve is shown with the shaded area representing an area of 0.26.

🔑 Important: The total area under any normal curve is always equal to 1, representing 100% probability35.

🔑 Important: Z-scores standardize values, allowing us to compare data from different normal distributions.

📝 Example: If the area to the left of a z-score is 0.70, the area to the right is 1−0.70=0.301 - 0.70 = 0.30 31.

2.2 Key concepts in probability

  • Probability: The likelihood of an event occurring, expressed as a number between 0 and 1.
  • Random Variable: A variable whose value is a numerical outcome of a random phenomenon.
  • Continuous Random Variable: A variable that can take any value within a given range. Probability for continuous variables is represented by areas under a curve.

2.2.1 Properties of probability distributions

For any probability distribution, the sum of all probabilities must equal 1. For continuous distributions, the total area under the probability density function (PDF) curve is 1.

The probability of a specific value for a continuous random variable is technically zero. Instead, we consider the probability of the variable falling within an interval.

🔑 Important: Probabilities are always non-negative.

🔑 Important: The sum of probabilities for all possible outcomes must equal 1.

🔑 Important: For continuous random variables, P(X=x)=0P(X=x) = 0. We calculate P(a≤X≤b)P(a \le X \le b).

2.3 The standard normal distribution

The standard normal distribution is a specific normal distribution with a mean (μ\mu) of 0 and a standard deviation (σ\sigma) of 1. It is often denoted as ZZ.

  • Mean (μ\mu): 00.
  • Standard Deviation (σ\sigma): 11.

Any normal distribution can be converted to a standard normal distribution using the z-score formula: z=x−μσz = \frac{x - \mu}{\sigma}. This transformation allows us to use standard normal tables to find probabilities for any normal distribution.

Distribution TypeMean (μ\mu)Standard Deviation (σ\sigma)
Standard Normal (ZZ)0011
General Normal (XX)μ\muσ\sigma

📝 Example: If a test score is 85, the mean is 70, and the standard deviation is 10, the z-score is z=85−7010=1.5z = \frac{85 - 70}{10} = 1.5. This means the score is 1.5 standard deviations above the mean.

🔑 Important: A positive z-score indicates the value is above the mean; a negative z-score indicates it is below the mean.

🔑 Important: Tables for the standard normal distribution are crucial for calculating probabilities.

🔑 Important: The standard normal distribution is the bedrock for many inferential statistical methods 21 33 37.

3. Introduction to statistical inference (part 3)

3.1 Understanding statistical inference

Statistical inference uses sample data to draw conclusions about a larger population. This process relies on understanding the relationship between population parameters and sample statistics.

A parameter is a numerical characteristic of a population. For example, the average height of all adult women in a country is a population parameter.

A statistic is a numerical characteristic of a sample. The average height of 100 randomly selected women from that country is a sample statistic.

3.2 The behavior of sample statistics

Sample statistics vary from sample to sample. If you take multiple samples from the same population, the statistics calculated from each sample will likely differ.

This variation is expected and is the basis for inferential methods.

The distribution of a sample statistic across many samples is called its sampling distribution. Understanding this distribution is crucial for making inferences about the population parameter.

3.3 The z-score for standardizing data

The z-score is a standardized measure that indicates how many standard deviations a data point is from the mean. It helps compare values from different distributions.

The formula for a z-score is the data value minus the mean, divided by the standard deviation.

z=x−μσz = \frac{x - \mu}{\sigma}

Where:

  • zz is the z-score
  • xx is the individual data value
  • μ\mu is the population mean
  • σ\sigma is the population standard deviation

The formula for calculating a z-score is shown, which involves subtracting the mean from a value and dividing by the standard deviation.

3.4 Probabilities and the normal distribution

The normal distribution, often called the bell curve, is a common probability distribution. It is symmetrical and has a mean, median, and mode at its center.

Probabilities in a normal distribution correspond to the area under the curve.

Areas under the normal curve represent probabilities. For instance, approximately 68% of the data falls within one standard deviation of the mean.

A normal distribution curve is shown with the area to the right shaded, representing an area of 0.68.

A standard normal distribution has a mean of 0 and a standard deviation of 1. Most values in a standard normal distribution lie close to the mean.

The area between z=−1.96z = -1.96 and z=1.96z = 1.96 covers 95% of the distribution. This means 2.5% of the data is in each tail.

A standard normal curve is shown with shaded areas representing probabilities.

3.5 Common probability areas in the normal distribution

The areas under the normal curve are used to find probabilities. These areas are critical for hypothesis testing and confidence intervals.

Area/ProbabilityZ-score Range
0.68Approximately -1 to 1
0.95Approximately -1.96 to 1.96
0.99Approximately -2.58 to 2.58

🔑 Important: The z-score is key for standardizing any normal distribution to the standard normal distribution, allowing probability lookup 45.

🔑 Important: Statistical inference bridges the gap between sample data and population characteristics 41 42.

4. Introduction to statistical inference (part 4)

4.1 Population parameters vs. sample estimates

Statistical inference uses data from a sample to draw conclusions about a larger population. A population parameter describes a characteristic of the entire population.

For example, the average height of all adults in a country is a population parameter.

A sample statistic, on the other hand, is a characteristic calculated from a sample drawn from that population. The average height of 100 randomly selected adults is a sample statistic.

We use sample statistics to estimate unknown population parameters 71 72.

Type of ValueDescriptionExample
Population ParameterA value describing a whole populationMean (μ\mu) of all ages
Sample StatisticA value describing a sampleMean (xˉ\bar{x}) of 50 ages

4.2 Understanding sampling variability

When we take multiple samples from the same population, the sample statistics will likely differ from one sample to another. This natural variation is called sampling variability.

It's the reason why two different surveys of the same population might produce slightly different results.

This variability is not random error in measurement. It is inherent in the process of selecting samples.

Understanding this variability is crucial for assessing how reliable our sample estimates are 73 74.

🔑 Important: Sampling variability means our sample statistic is unlikely to exactly match the population parameter.

4.3 The concept of a sampling distribution

A sampling distribution shows the distribution of a particular sample statistic across many repeated samples from the same population. Imagine taking hundreds of samples, calculating the mean for each, and then plotting those means.

That plot is a sampling distribution of the mean.

The shape, center, and spread of a sampling distribution tell us about the behavior of our sample statistic. This distribution is central to statistical inference because it allows us to quantify the uncertainty associated with our estimates 75 76.

📝 Example: If we repeatedly sample groups of 30 students and calculate the average exam score for each group, the distribution of these average scores forms a sampling distribution of the mean.

4.4 Key properties of sampling distributions

The properties of a sampling distribution depend on the statistic being considered and the population from which samples are drawn. For many common statistics, like the sample mean, the sampling distribution tends to follow predictable patterns, especially with larger sample sizes.

These distributions help us understand the range of values our sample statistic could take. They are the foundation for constructing confidence intervals and performing hypothesis tests 77 78.

Sampling Distribution PropertyDescription
CenterThe mean of the sampling distribution is often equal to the population parameter.
ShapeThe shape can approach a normal distribution, especially for large samples.
SpreadThe spread (standard deviation) of the sampling distribution is called the standard error.

4.5 Introducing the standard error

The standard error is the standard deviation of a sampling distribution. It measures the typical distance between a sample statistic and the corresponding population parameter.

A smaller standard error indicates that sample statistics are clustered closely around the population parameter, suggesting a more precise estimate.

The standard error is influenced by the variability in the population and the size of the sample. Larger sample sizes generally lead to smaller standard errors.

This is because larger samples provide more information about the population, reducing the impact of random sampling variability 79 80.

🔑 Important: The standard error quantifies the uncertainty in our sample estimate.

🔑 Important: A smaller standard error means our sample statistic is a more reliable estimate of the population parameter.

5. Introduction to statistical inference (part 5)

5.1 Understanding sample means and sampling distributions

Statistical inference uses sample data to make conclusions about a population. A population parameter describes a population.

A sample statistic estimates this parameter. We often use the sample mean (xˉ\bar{x}) to estimate the population mean (μ\mu).

When we take multiple samples, the sample means can vary. The collection of all possible sample means forms a sampling distribution.

This distribution shows how sample statistics behave 86.

Consider rolling three tetrahedral dice. Each die has faces numbered 1, 2, 3, and 4.

This is our population. We take samples of size three.

We calculate the mean for each sample. This process generates a distribution of sample means 85.

The table shows all 64 possible samples of size 3 and their calculated sample means. Examining this table helps visualize how sample means can differ 87.

SampleSample Mean (xˉ\bar{x})
(1,1,1)1.00
(1,1,2)1.33
(1,1,3)1.67
......
(4,4,4)4.00

Table 7.2 lists the 64 possible samples of size 3 and their corresponding sample means.

5.2 The properties of sampling distributions

The sampling distribution of the sample mean has key properties. Its mean is equal to the population mean.

Its standard deviation is smaller than the population standard deviation.

The standard deviation of the sampling distribution is called the standard error of the mean. It quantifies the variability of sample means.

The standard error of the mean is calculated as the population standard deviation (σ\sigma) divided by the square root of the sample size (nn) 89.

σxˉ=σn\sigma_{\bar{x}} = \frac{\sigma}{\sqrt{n}}

This diagram illustrates the formula for the standard deviation of a sampling distribution, denoted as σx̄, which is equal to the population standard deviation (σ) divided by the square root of the sample size (n).

The formula for the standard deviation of a sampling distribution is:

σxˉ=σn\sigma_{\bar{x}} = \frac{\sigma}{\sqrt{n}}

This formula shows that as the sample size (nn) increases, the standard error of the mean (σxˉ\sigma_{\bar{x}}) decreases. Larger samples lead to sample means that are closer to the population mean 93.

🔑 Important: Increasing sample size reduces the variability of sample means.

5.3 The Central Limit Theorem

The Central Limit Theorem (CLT) is a fundamental concept in statistics. It states that for a sufficiently large sample size, the sampling distribution of the sample mean will be approximately normally distributed, regardless of the population's original distribution.

This theorem holds even if the population itself is not normally distributed. The distribution of sample means will approach normality as the sample size increases.

The mean of the sampling distribution equals the population mean (μ\mu). The standard deviation of the sampling distribution is σxˉ=σ/n\sigma_{\bar{x}} = \sigma / \sqrt{n} 91.

The shape of the sampling distribution of the sample mean is approximately normal for large sample sizes. A common rule of thumb is that a sample size of n≥30n \ge 30 is sufficient for the CLT to apply.

Summary of the Central Limit Theorem, defining the mean and standard deviation of a sampling distribution.

The probability histogram for the sampling distribution of the sample mean of three rolls of a die is shown below. This distribution is centered around a sample mean of 2.5.

It shows a bell shape, which is characteristic of a normal distribution.

Sample Mean (xˉ\bar{x})Probability
1.000.0156
1.330.0469
1.670.0938
2.000.1406
2.330.1719
2.670.1719
3.000.1406
3.330.0938
3.670.0469
4.000.0156

This chart displays the probability histogram for the sampling distribution of the sample mean of three rolls of a die. 95 97.

🔑 Important: The CLT allows us to use normal distribution theory to make inferences about the population mean, even when the population distribution is unknown or not normal.

📝 Example: If a population has a skewed distribution, but we take large samples (n≥30n \ge 30), the sampling distribution of the sample mean will be approximately normal. This allows us to calculate probabilities and construct confidence intervals using normal distribution properties.

🔑 Important: The sampling distribution of the sample mean is approximately normal when:

  • The population is normally distributed, OR
  • The sample size (nn) is sufficiently large (typically n≥30n \ge 30).

🔑 Important: The key takeaway from the Central Limit Theorem is that the distribution of sample means tends towards a normal distribution as sample size increases.

6. Introduction to statistical inference (part 6)

6.1 Understanding distributions and sample statistics

Statistical inference bridges the gap between sample data and population truths. We use sample statistics to estimate unknown population parameters.

For instance, the sample mean (xˉ\bar{x}) estimates the population mean (μ\mu) 101.

The behavior of these sample statistics is crucial. When we take multiple samples, their means vary.

Understanding this variation helps us make more reliable inferences about the population.

The distribution of sample means is called the sampling distribution of the mean. As the sample size increases, the sampling distribution becomes narrower and more concentrated around the population mean.

This effect is visually demonstrated by comparing the spread of sample means for small versus large sample sizes 103.

This figure displays probability histograms for a population and for sample means of sizes 3, 10, and 30.

6.2 The Normal distribution and z-scores

The normal distribution is a fundamental concept in statistics. It is a symmetrical bell-shaped curve.

Many natural phenomena and sampling distributions approximate this shape.

A z-score measures how many standard deviations a data point is from the mean. It standardizes values from different normal distributions.

This allows for comparisons and probability calculations.

The formula for a z-score is: z=x−μσz = \frac{x - \mu}{\sigma} where xx is the individual value, μ\mu is the population mean, and σ\sigma is the population standard deviation.

Tables are available to find the cumulative probability associated with any z-score. This is the area under the normal curve to the left of that z-score 107.

A table showing cumulative probabilities for various z-scores in a normal distribution.

6.3 Using normal distributions for probability

We can determine probabilities of specific outcomes using the normal distribution. This involves converting values to z-scores and using the standard normal distribution.

For example, if we know the mean and standard deviation, we can find the probability of a value falling within a certain range. This is done by shading the area under the curve corresponding to that range 109.

A normal distribution curve is shown, with the area to the left of a value labeled 'x' shaded and indicated as 0.30.

The mean of the distribution is a key reference point. A z-score of 0 represents the mean.

Values above the mean have positive z-scores, and values below have negative z-scores 111.

A normal distribution curve is shown with the mean at 1135 and a z-score of -2.06 corresponding to a value of 1115.

6.4 The Central Limit Theorem

The Central Limit Theorem (CLT) is a cornerstone of statistical inference. It states that the sampling distribution of the sample mean will be approximately normally distributed.

This holds true regardless of the original population distribution, provided the sample size is sufficiently large.

🔑 Important: A sample size of n≥30n \ge 30 is generally considered large enough for the CLT to apply.

The CLT is powerful because it allows us to use normal distribution methods even when the population is not normally distributed. This simplifies many statistical procedures.

The mean of the sampling distribution of the mean (μxˉ\mu_{\bar{x}}) is equal to the population mean (μ\mu) 113. The standard deviation of the sampling distribution of the mean, known as the standard error of the mean (σxˉ\sigma_{\bar{x}}), is equal to the population standard deviation (σ\sigma) divided by the square root of the sample size (nn).

μxˉ=μ\mu_{\bar{x}} = \mu σxˉ=σn\sigma_{\bar{x}} = \frac{\sigma}{\sqrt{n}}

This relationship highlights how increasing sample size reduces the variability of sample means 115.

6.5 Applying the Central Limit Theorem

We can calculate z-scores for sample means using the CLT. This allows us to find probabilities related to sample means.

The formula for the z-score of a sample mean is:

z=xˉ−μσxˉ=xˉ−μσ/nz = \frac{\bar{x} - \mu}{\sigma_{\bar{x}}} = \frac{\bar{x} - \mu}{\sigma / \sqrt{n}}

This formula is crucial for hypothesis testing and confidence interval construction 117.

We can use this z-score with standard normal distribution tables or software to find probabilities. These probabilities tell us how likely a particular sample mean is to occur.

📝 Example: If a population has a mean of 50 and a standard deviation of 10, what is the probability that a sample of size 40 will have a mean greater than 52?

  1. Calculate the standard error: σxˉ=10/40≈1.58\sigma_{\bar{x}} = 10 / \sqrt{40} \approx 1.58.
  2. Calculate the z-score for xˉ=52\bar{x} = 52: z=(52−50)/1.58≈1.27z = (52 - 50) / 1.58 \approx 1.27.
  3. Find the probability for z>1.27z > 1.27 using a z-table. This is approximately 0.1020.

🔑 Important: The Central Limit Theorem is essential for inferring population characteristics from sample data, even with non-normal populations 119.

7. Introduction to statistical inference (part 7)

7.1 Approximating binomial probabilities

  • Many binomial distributions can be approximated by the normal distribution. This is useful when calculating exact binomial probabilities is difficult.
  • The normal approximation works best when the sample size (nn) is large. It's also better when the probability of success (pp) is close to 0.5125.

7.1.1 Continuity correction

  • A continuity correction is needed when approximating a discrete distribution (binomial) with a continuous one (normal) 123 129.
  • This correction adjusts the boundaries of the interval for a more accurate probability.

📝 Example: To find the probability P(X≤k)P(X \le k) for a binomial variable XX, you would use the normal approximation for P(Y≤k+0.5)P(Y \le k + 0.5), where YY is the normal variable.

  • For P(X<k)P(X < k), use P(Y≤k−0.5)P(Y \le k - 0.5).
  • For P(X≥k)P(X \ge k), use P(Y≥k−0.5)P(Y \ge k - 0.5).
  • For P(X>k)P(X > k), use P(Y≥k+0.5)P(Y \ge k + 0.5).
  • For P(X=k)P(X = k), use P(k−0.5≤Y≤k+0.5)P(k - 0.5 \le Y \le k + 0.5) 131.

The histogram visually represents the binomial probabilities, while the normal curve shows the approximation. Continuity correction refines this by adjusting the area under the curve.

This chart shows a binomial probability histogram superimposed with a normal curve, illustrating the concept of continuity correction.

This chart illustrates the normal approximation to a binomial distribution, showing a histogram of probabilities overlaid with a normal curve.

Diagrams illustrating the application of continuity correction to areas under the normal curve.

7.1.2 Calculating z-scores

  • To use the normal approximation, you need the mean and standard deviation of the binomial distribution.

  • The mean of a binomial distribution is μ=np\mu = np.

  • The standard deviation is σ=np(1−p)\sigma = \sqrt{np(1-p)}.

  • Once you have the mean and standard deviation, you can calculate a z-score for your desired binomial probability.

  • The z-score formula for a binomial approximation is z=x−npnp(1−p)z = \frac{x - np}{\sqrt{np(1-p)}}.

📝 Example: For n=100n=100 and p=0.2p=0.2, the mean is μ=100×0.2=20\mu = 100 \times 0.2 = 20. The standard deviation is σ=100×0.2×0.8=16=4\sigma = \sqrt{100 \times 0.2 \times 0.8} = \sqrt{16} = 4.

  • This z-score allows you to find the probability using a standard normal distribution table or calculator 127.

This diagram illustrates the calculation of z-scores for a normal approximation to a binomial distribution.

This diagram shows the calculation of the z-score for a normal distribution.

7.2 Parameters versus estimates

  • A parameter is a fixed characteristic of an entire population.

  • Examples include the population mean (μ\mu), population variance (σ2\sigma^2), and population proportion (pp).

  • Parameters are usually unknown and constant.

  • An estimate is a value calculated from a sample.

  • Examples include the sample mean (xˉ\bar{x}), sample variance (s2s^2), and sample proportion (p^\hat{p}).

  • Estimates are random variables because they change with each different sample taken.

🔑 Important: The central question of statistical inference is understanding how sample estimates behave across many different samples.

FeatureParameterEstimate
Defined forPopulationSample
ValueFixed, usually unknownVariable, computed
NotationGreek letters (μ\mu, σ2\sigma^2, pp)Roman letters (xˉ\bar{x}, s2s^2, p^\hat{p})

🔑 Important: Understanding the distribution of estimates is key to making inferences about population parameters 139.

8. Introduction to statistical inference (part 8)

8.1 Understanding the sample mean

Statistical inference uses sample data to draw conclusions about a larger population. A key concept is the sample mean (xˉ\bar{x}).

This is the average of values in a sample. We often want to know how this sample mean relates to the true population mean (μ\mu).

To understand this relationship, we examine the behavior of sample means from repeated sampling. Even if the original population distribution is not normal, the distribution of these sample means tends to approximate a normal distribution.

This is a core idea of the Central Limit Theorem.

The mean of all possible sample means is equal to the population mean. This means the sample mean is an unbiased estimator of the population mean.

In other words, on average, our sample means will hit the true population mean.

The average of sample means equals the population mean.

8.1.1 The sampling distribution of the sample mean

Consider a small population, like {1, 2, 3, 4, 5}. The population mean (μ\mu) is 3.

If we take all possible samples of size n=3n=3 from this population (without replacement), each sample will have its own mean. For example, the sample {3, 2, 4} has a mean of 3.00.

The sample {3, 2, 1} has a mean of 2.00.

By listing all possible samples and their means, we can see the distribution of these means. There are 10 possible samples of size 3 from a population of 5: C(5,3)=10C(5, 3) = 10.

The means of these samples will vary. The collection of all these sample means forms the sampling distribution of the sample mean.

The mean of these 10 sample means is 3.0, which is equal to μ\mu. This illustrates that E[xˉ]=μE[\bar{x}] = \mu.

The Central Limit Theorem states that as the sample size (nn) increases, the shape of the sampling distribution of the sample mean becomes more like a normal distribution, regardless of the original population's shape.

A histogram illustrating the sampling distribution of the sample mean, showing frequencies for different ranges of sample means.

The sampling distribution of the sample mean approximates a normal distribution as sample size increases.

Samplexˉ\bar{x}
{3, 2, 4}3.00
{3, 2, 1}2.00
{3, 2, 5}3.33
{3, 4, 1}2.67
{3, 4, 5}4.00
{2, 4, 1}2.33
{2, 4, 5}3.67
{2, 1, 5}2.67
{4, 1, 5}3.33
{3, 1, 5}3.00
Total30.00
Mean of xˉ\bar{x}3.00

🔑 Important: The sample mean (xˉ\bar{x}) is an unbiased estimator of the population mean (μ\mu). This is crucial for making inferences about the population 143.

9. Sampling distributions and the Central Limit Theorem

9.1 Sampling distributions

A sampling distribution describes the probabilities of outcomes for a statistic, like the sample mean (xˉ\bar{x}) or sample proportion (p^\hat{p}). It shows how these statistics vary across different samples drawn from the same population.

9.1.1 Sampling distribution of the sample mean (xˉ\bar{x})

When we take multiple samples of size nn from a population, the distribution of their means, xˉ\bar{x}, often forms a bell shape. This occurs even if the original population distribution is not normal.

The sampling distribution of xˉ\bar{x} is centered around the population mean (μ\mu). Its spread is narrower than the population's spread, shrinking as the sample size nn increases.

9.1.2 Sampling distribution of the sample proportion (p^\hat{p})

Similarly, the sampling distribution of the sample proportion, p^\hat{p}, describes the variability of proportions calculated from different samples. For a toy population, we can list all possible samples and their proportions.

This table displays the breakdown of possible samples of size n=4, grouped by the number of F's drawn, along with their corresponding contributions to the mean.

The sample proportion p^\hat{p} is an unbiased estimator of the population proportion pp, meaning its expected value equals pp. The spread of the sampling distribution of p^\hat{p} decreases as the sample size nn increases.

A bar chart displays the sampling distribution of p-hat, showing frequencies for different values of p-hat.

9.2 The Central Limit Theorem (CLT)

The Central Limit Theorem is a fundamental concept in statistics. It states that as the sample size (nn) gets larger, the sampling distribution of the sample mean (xˉ\bar{x}) approaches a normal distribution.

This is true regardless of the shape of the original population distribution. For sample proportions, the CLT also applies for large sample sizes.

The CLT is crucial because it allows us to use normal distribution theory for inference, even with non-normally distributed populations.

The CLT provides approximate distributions for statistics:

StatisticPopulation parameterApproximate Sampling Distribution (for large nn)
xˉ\bar{x}μ\mu (mean)N(μ,σ2/n)N(\mu, \sigma^2/n)
p^\hat{p}pp (proportion)N(p,p(1−p)/n)N(p, p(1-p)/n)

This theorem forms the basis for constructing confidence intervals and performing hypothesis tests for both means and proportions.

9.3 Hypothesis testing basics

Hypothesis testing is a formal process to make decisions about population parameters using sample data. It involves setting up two competing claims about a parameter.

9.3.1 Null and alternative hypotheses

  • Null hypothesis (H0H_0): This represents the "status quo" or a claim assumed to be true. It is always stated with an equality, for example, H0:μ=μ0H_0: \mu = \mu_0.
  • Alternative hypothesis (H1H_1): This is what we suspect or want to find evidence for. It contradicts the null hypothesis and can be one of three forms: μ≠μ0\mu \neq \mu_0 (two-sided), μ>μ0\mu > \mu_0 (one-sided), or μ<μ0\mu < \mu_0 (one-sided).

We do not "prove" H0H_0; we either reject it or fail to reject it based on the data.

9.3.2 The logic of a test and types of error

The process assumes H0H_0 is true and calculates a test statistic from the sample. If this statistic falls into a predefined region of rejection, we reject H0H_0.

Otherwise, we "fail to reject H0H_0," meaning the data are consistent with H0H_0.

There are two potential errors in this decision-making process:

Error TypeDescriptionProbability
Type IRejecting H0H_0 when it is actually true.α\alpha (significance level)
Type IIFailing to reject H0H_0 when H1H_1 is true.β\beta (Power is 1−β1-\beta)

10. The Z-test for means and p-values

10.1 The Z-test framework

The Z-test is used to test hypotheses about a population mean when the population variance (σ2\sigma^2) is known. This test is applicable if the population is normally distributed or if the sample size (nn) is large enough for the Central Limit Theorem to apply.

The core of the test is the Z-test statistic. This statistic measures how many standard errors the sample mean (Xˉ\bar{X}) is away from the hypothesized population mean (μ0\mu_0).

Z=Xˉ−μ0σ/nZ = \frac{\bar{X} - \mu_0}{\sigma / \sqrt{n}}

Under the null hypothesis (H0H_0), this statistic follows a standard normal distribution (N(0,1)N(0, 1)) 161.

10.2 Setting up the hypothesis test

The Z-test involves defining a null hypothesis (H0H_0) and an alternative hypothesis (H1H_1). The significance level (α\alpha) is chosen, representing the probability of a Type I error (rejecting H0H_0 when it is true).

This α\alpha determines the region of rejection 159.

10.2.1 Bilateral (two-tailed) tests

A bilateral test is used when the question is whether the population mean is simply different from a hypothesized value.

  • Hypotheses: H0:μ=μ0H_0: \mu = \mu_0 versus H1:μ≠μ0H_1: \mu \neq \mu_0.
  • Decision rule: Reject H0H_0 if the absolute value of the Z-statistic is greater than the critical value for α/2\alpha/2 in each tail (∣Z∣>z(α/2)|Z| > z(\alpha/2)). For α=0.05\alpha = 0.05, this critical value is 1.961.96.

Example: A machine is supposed to fill bottles with 500 mL. A sample of 16 bottles shows a mean of 504.2 mL, with a known population standard deviation of 8 mL. At α=0.05\alpha = 0.05, we calculate Z=(504.2−500)/(8/16)=4.2/2=2.10Z = (504.2 - 500) / (8 / \sqrt{16}) = 4.2 / 2 = 2.10. Since ∣2.10∣>1.96|2.10| > 1.96, we reject H0H_0 and conclude the machine's fill volume differs from 500 mL 163.

10.2.2 Unilateral (one-tailed) tests

One-tailed tests are used when there is a specific direction of interest for the hypothesis.

  • Right-tailed test (Is μ\mu larger?): H0:μ≤μ0H_0: \mu \le \mu_0 versus H1:μ>μ0H_1: \mu > \mu_0. Reject H0H_0 if Z>z(α)Z > z(\alpha).
  • Left-tailed test (Is μ\mu smaller?): H0:μ≥μ0H_0: \mu \ge \mu_0 versus H1:μ<μ0H_1: \mu < \mu_0. Reject H0H_0 if Z<−z(α)Z < -z(\alpha).

For a one-tailed test, the entire α\alpha is placed in a single tail. For α=0.05\alpha = 0.05, the critical value for a right-tailed test is z(0.05)=1.645z(0.05) = 1.645, and for a left-tailed test, it is −z(0.05)=−1.645-z(0.05) = -1.645.

Example (right-tailed): A supplier claims battery life is at most 40 hours (σ=5\sigma=5 known). A sample of 25 batteries (n=25n=25) yields a mean life of 41.8 hours (Xˉ=41.8\bar{X}=41.8). At α=0.05\alpha = 0.05, Z=(41.8−40)/(5/25)=1.8/1=1.80Z = (41.8 - 40) / (5 / \sqrt{25}) = 1.8 / 1 = 1.80. Since 1.80>1.6451.80 > 1.645, we reject H0H_0 and conclude the mean battery life exceeds 40 hours 165.

Example (left-tailed): A process should deliver a mean weight of 250 g (σ=6\sigma=6 known). We suspect under-filling. A sample of 36 items (n=36n=36) averages 248.2 g (Xˉ=248.2\bar{X}=248.2). At α=0.05\alpha = 0.05, Z=(248.2−250)/(6/36)=−1.8/1=−1.80Z = (248.2 - 250) / (6 / \sqrt{36}) = -1.8 / 1 = -1.80. Since −1.80<−1.645-1.80 < -1.645, we reject H0H_0 and conclude the process under-fills below 250 g 167.

10.3 Understanding p-values

The p-value quantifies the strength of evidence against the null hypothesis. It is the probability of observing a test statistic as extreme as, or more extreme than, the one obtained, assuming H0H_0 is true.

  • A smaller p-value indicates stronger evidence against H0H_0.
  • The decision rule is: Reject H0H_0 if p≤αp \le \alpha.

The calculation of the p-value depends on the alternative hypothesis:

Alternative Hypothesis (H1H_1)p-value Calculation
μ>μ0\mu > \mu_0 (Right-tailed)P(Z≥zobs)P(Z \ge z_{obs})
μ<μ0\mu < \mu_0 (Left-tailed)P(Z≤zobs)P(Z \le z_{obs})
μ≠μ0\mu \neq \mu_0 (Two-tailed)$2 \cdot P(Z \ge

169

10.3.1 Calculating p-values

Using the bottle-fill example (μ0=500\mu_0 = 500, σ=8\sigma = 8, n=16n = 16, Xˉ=504.2\bar{X} = 504.2, α=0.05\alpha = 0.05, H1:μ≠500H_1: \mu \neq 500):

  • The observed Z-statistic (zobsz_{obs}) is 2.102.10.
  • For a two-tailed test, p=2⋅P(Z≥2.10)=2⋅0.0179=0.0358p = 2 \cdot P(Z \ge 2.10) = 2 \cdot 0.0179 = 0.0358.
  • Since 0.0358≤0.050.0358 \le 0.05, we reject H0H_0 171.

Using the battery-life example (μ0=40\mu_0 = 40, σ=5\sigma = 5, n=25n = 25, Xˉ=41.8\bar{X} = 41.8, α=0.05\alpha = 0.05, H1:μ>40H_1: \mu > 40):

  • The observed Z-statistic (zobsz_{obs}) is 1.801.80.
  • For a right-tailed test, p=P(Z≥1.80)=0.0359p = P(Z \ge 1.80) = 0.0359.
  • Since 0.0359≤0.050.0359 \le 0.05, we reject H0H_0 173.

🔑 Important: The p-value provides a continuous measure of evidence against H0H_0, offering a more nuanced decision than simply comparing to a critical value.

A standard normal distribution curve illustrating the region of rejection and non-rejection based on the significance level alpha.

The formula for the Z-test statistic is presented, showing the difference between the sample mean and the hypothesized population mean, divided by the standard error of the mean.

🔑 Important: For a two-tailed test, extreme values in either direction provide evidence against H0H_0, so the p-value is doubled. For one-tailed tests, only extreme values in the specified direction count.

11. Confidence intervals and their relation to hypothesis testing

11.1 Understanding confidence intervals

A confidence interval (CI) provides a range of plausible values for an unknown population parameter, like the mean (μ\mu). It is calculated from sample data.

The general form is a point estimate plus or minus a margin of error. This interval indicates the uncertainty in the estimation.

  • Confidence level: This represents the long-run proportion of intervals that successfully capture the true parameter. Common levels are 90%, 95%, or 99%.
  • A higher confidence level leads to a wider interval. This reflects a trade-off between certainty and precision.
  • A 95% CI corresponds to values of μ0\mu_0 that a two-tailed test would not reject at α=0.05\alpha = 0.05 177.

🔑 Important: The 95% refers to the reliability of the method used to construct the interval, not the probability that a specific computed interval contains the true parameter. Once calculated, an interval either contains the parameter or it does not.

11.2 Computing a confidence interval for μ\mu (when σ\sigma is known)

The formula for a confidence interval for the population mean (μ\mu) when the population standard deviation (σ\sigma) is known is:

Xˉ±zα/2⋅σn\bar{X} \pm z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}

Here, Xˉ\bar{X} is the sample mean, σ\sigma is the population standard deviation, nn is the sample size, and zα/2z_{\alpha/2} is the critical value from the standard normal distribution.

  • Steps to compute:
  1. Calculate the sample mean (Xˉ\bar{X}) and the standard error (σ/n\sigma/\sqrt{n}).
  2. Choose the confidence level to find the critical value (zα/2z_{\alpha/2}). For example, z0.025=1.96z_{0.025} = 1.96 for 95% confidence and z0.005=2.576z_{0.005} = 2.576 for 99% confidence.
  3. Calculate the margin of error (EE) as zα/2⋅(σ/n)z_{\alpha/2} \cdot (\sigma/\sqrt{n}). The interval is then Xˉ±E\bar{X} \pm E.

📝 Example: A bottle filling process has σ=8\sigma = 8 mL. A sample of n=16n = 16 bottles has a mean fill of Xˉ=504.2\bar{X} = 504.2 mL. A 95% CI for μ\mu:

  • Standard Error (SE) = 8/16=8/4=2.08 / \sqrt{16} = 8 / 4 = 2.0 mL.
  • Margin of Error (E) = 1.96×2.0=3.921.96 \times 2.0 = 3.92 mL.
  • CI = 504.2±3.92504.2 \pm 3.92, which is (500.3,508.1)(500.3, 508.1) mL 179.

11.3 Interpreting confidence intervals

  • Correct interpretation: "We are 95% confident that the true population mean (μ\mu) lies between 500.3 and 508.1 mL." This means the method used to create the interval will capture the true mean in 95% of repetitions.
  • Common misinterpretation: It is incorrect to state "There is a 95% probability that the true mean (μ\mu) is within this specific interval." The parameter μ\mu is fixed, not random.
AspectInterpretation
Narrower IntervalIndicates a more precise estimate of the parameter.
Wider IntervalIndicates a less precise estimate, often due to smaller sample size or higher confidence level.
Precision GainIncrease sample size (nn) or accept a lower confidence level to achieve a narrower interval.

181

11.4 The duality of confidence intervals and hypothesis testing

There's a direct link between confidence intervals and hypothesis tests. A (1−α)(1 - \alpha) confidence interval contains precisely those null hypothesis values (μ0\mu_0) that a level-α\alpha test would not reject.

🔑 Important: The decision rule is simple: if the hypothesized value (μ0\mu_0) falls inside the CI, do not reject H0H_0. If μ0\mu_0 falls outside the CI, reject H0H_0.

11.4.1 Bilateral tests using two-sided CIs

For a bilateral hypothesis test (where H1:μ≠μ0H_1: \mu \neq \mu_0), you use a two-sided confidence interval. The α\alpha level for the test is split between the two tails (α/2\alpha/2 in each).

This directly matches the construction of a two-sided CI using zα/2z_{\alpha/2}.

📝 Example: Test if the mean fill is different from μ0=500\mu_0 = 500 mL, with α=0.05\alpha = 0.05. Given: σ=8\sigma = 8, n=16n = 16, Xˉ=504.2\bar{X} = 504.2.

  • Construct a 95% CI: 504.2±1.96⋅(8/16)=504.2±3.92504.2 \pm 1.96 \cdot (8/\sqrt{16}) = 504.2 \pm 3.92, resulting in (500.3,508.1)(500.3, 508.1) mL.
  • Check if μ0=500\mu_0 = 500 is in the interval: 500500 is less than 500.3500.3, so it is outside the CI.
  • Decision: Reject H0H_0. The mean fill is significantly different from 500 mL 193.

11.4.2 Unilateral tests using one-sided CIs

For a unilateral hypothesis test (e.g., H1:μ>μ0H_1: \mu > \mu_0 or H1:μ<μ0H_1: \mu < \mu_0), you use a one-sided confidence interval (which provides a single bound). The entire α\alpha level is placed in one tail, matching the use of zαz_\alpha for the critical value.

📝 Example: Test if a battery lasts longer than μ0=40\mu_0 = 40 hours, with α=0.05\alpha = 0.05. Given: σ=5\sigma = 5, n=25n = 25, Xˉ=41.8\bar{X} = 41.8. We want to test H1:μ>40H_1: \mu > 40.

  • Construct a one-sided lower-bound CI: Xˉ−zα⋅(σ/n)=41.8−1.645⋅(5/25)=41.8−1.645⋅(5/5)=41.8−1.645=40.155\bar{X} - z_{\alpha} \cdot (\sigma/\sqrt{n}) = 41.8 - 1.645 \cdot (5/\sqrt{25}) = 41.8 - 1.645 \cdot (5/5) = 41.8 - 1.645 = 40.155.
  • The one-sided CI is μ>40.155\mu > 40.155.
  • Check if μ0=40\mu_0 = 40 is within this bound: 4040 is less than 40.15540.155, so it is outside the interval's range.
  • Decision: Reject H0H_0. There is evidence that the battery life is greater than 40 hours 195.

🔑 Important: The relationship is fundamental: a confidence interval visually represents all null hypothesis values that would not be rejected at the corresponding significance level 191.

© 2026 Maeve. All rights reserved. This content is protected by copyright.

See also