9장 두집단의비교

📚 9장-두집단의비교.pdf

Brief overview

This document introduces the fundamental concepts of statistical inference, focusing on methods for comparing two groups. It details how to analyze data from experiments, understand treatments, and apply statistical tests to draw conclusions from sample data. Understanding these methods is crucial for interpreting research findings and making informed decisions in various fields.

Key points

  • Overview of statistical inference and experimental treatments.
  • Methods for comparing two means, including calculations and hypothesis testing.
  • Paired comparisons for related data and their hypothesis testing.
  • Statistical methods for comparing two proportions.
  • Hypothesis testing for differences in paired data and proportions.

1. Introduction to statistical inference (part 1)

1.1 Overview of statistical inference

Statistical inference uses data from a sample to draw conclusions about a larger population. The core idea is to understand how a specific treatment influences an outcome.

Experiments are designed to isolate the effect of this treatment.

Statistical inference involves two main types of methods:

  • Descriptive inference: summarizing data from a sample.
  • Inferential inference: generalizing findings from a sample to a population.

1.2 Comparing two means

This section focuses on inferential methods to compare the means of two different groups. This is common when studying the effect of a treatment versus a control.

We aim to determine if the observed difference in sample means reflects a real difference in population means.

1.2.1 The concept of treatment and samples

In an experiment, a treatment is what is applied to a group to observe its effect. Statistical inference compares outcomes between groups that received different treatments or between a treatment group and a control group.

A study might compare two groups:

  • Group 1: Receives treatment A.
  • Group 2: Receives treatment B 6.

The goal is to compare the average outcome (mean) of Group 1 to the average outcome of Group 2. Let the population means be μ1\mu_1 and μ2\mu_2.

The observed difference is Xˉ−Yˉ\bar{X} - \bar{Y}, where Xˉ\bar{X} is the sample mean for Group 1 and Yˉ\bar{Y} is the sample mean for Group 2.

The difference in population means is μ1−μ2\mu_1 - \mu_2. 7.

1.2.2 Sample means and differences

We use sample means to estimate population means.

  • Sample mean for Group 1: Xˉ\bar{X}
  • Sample mean for Group 2: Yˉ\bar{Y}

The difference between sample means is Xˉ−Yˉ\bar{X} - \bar{Y}. This difference is a statistic that estimates the difference between population means, μ1−μ2\mu_1 - \mu_2.

Key Relationship: Sample mean difference estimates population mean difference.

1.2.3 Variance and its role

Variance measures the spread or variability of data. In comparing two means, we consider the variance of each sample.

  • Sample variance for Group 1: S12S_1^2
  • Sample variance for Group 2: S22S_2^2

The variance of the difference between two independent sample means is the sum of their individual variances: Var(Xˉ−Yˉ)=Var(Xˉ)+Var(Yˉ)Var(\bar{X} - \bar{Y}) = Var(\bar{X}) + Var(\bar{Y}). This formula is crucial for hypothesis testing.

Formula: Var(Xˉ−Yˉ)=S12n1+S22n2Var(\bar{X} - \bar{Y}) = \frac{S_1^2}{n_1} + \frac{S_2^2}{n_2} 9.

1.2.4 Hypothesis testing for the difference between means

Hypothesis testing allows us to formally test if the difference between two population means is statistically significant. We start with a null hypothesis (H0H_0) and an alternative hypothesis (HaH_a).

A common null hypothesis is that the two population means are equal:

  • H0:μ1=μ2H_0: \mu_1 = \mu_2 or H0:μ1−μ2=0H_0: \mu_1 - \mu_2 = 0.

The alternative hypothesis could be:

  • Ha:μ1≠μ2H_a: \mu_1 \neq \mu_2 (two-sided test)
  • Ha:μ1>μ2H_a: \mu_1 > \mu_2 (one-sided test)
  • Ha:μ1<μ2H_a: \mu_1 < \mu_2 (one-sided test)

1.2.4.1 The Z-test statistic

When population variances are known and equal, or sample sizes are large (e.g., ≥30\geq 30), we can use a Z-test. The Z-test statistic for the difference between means is calculated as: Z=(Xˉ−Yˉ)−(μ1−μ2)S12n1+S22n2Z = \frac{(\bar{X} - \bar{Y}) - (\mu_1 - \mu_2)}{\sqrt{\frac{S_1^2}{n_1} + \frac{S_2^2}{n_2}}}.

Under the null hypothesis (H0:μ1−μ2=0H_0: \mu_1 - \mu_2 = 0), the formula simplifies to: Z=Xˉ−YˉS12n1+S22n2Z = \frac{\bar{X} - \bar{Y}}{\sqrt{\frac{S_1^2}{n_1} + \frac{S_2^2}{n_2}}}.

This statistic follows a standard normal distribution (N(0,1)N(0, 1)) if H0H_0 is true 15.

1.2.4.2 Pooled variance estimate

When population variances are unknown but assumed to be equal (σ12=σ22\sigma_1^2 = \sigma_2^2), we use a pooled variance estimate. This approach is common for t-tests.

The pooled variance (Sp2S_p^2) combines information from both samples to get a better estimate of the common variance.

  • Pooled variance: Sp2=(n1−1)S12+(n2−1)S22n1+n2−2S_p^2 = \frac{(n_1-1)S_1^2 + (n_2-1)S_2^2}{n_1 + n_2 - 2} 18.

This pooled variance is used in the denominator of the t-test statistic.

1.2.4.3 Type II error and power

A Type II error occurs when we fail to reject a false null hypothesis. The probability of a Type II error is denoted by β\beta.

  • Power: The probability of correctly rejecting a false null hypothesis is called power, calculated as 1−β1 - \beta. Higher power means a better chance of detecting a real effect.

Key Concept: Power = 1−P(Type II Error)1 - P(\text{Type II Error}). 17.

🔑 Important: Statistical inference allows us to make educated guesses about population characteristics based on sample data, particularly useful for comparing group means in experimental settings. 2.

2. Introduction to statistical inference (part 2)

2.1 Comparing two means

Statistical inference allows us to draw conclusions about populations based on sample data. When comparing two groups, we often want to know if the means of these groups are significantly different.

This involves formulating hypotheses and using sample data to test them.

The core idea is to compare the observed difference between sample means to what we would expect due to random chance alone. We use a test statistic, most commonly a t-statistic, to quantify this difference relative to the variability within the samples.

🔑 Important: Statistical inference helps bridge the gap between what we observe in a sample and what we can conclude about the larger population.

2.1.1 Hypothesis testing for two means

Hypothesis testing provides a structured way to decide if the difference between two population means is statistically significant. This process begins with defining null and alternative hypotheses.

The null hypothesis (H0H_0) typically states there is no difference between the population means. The alternative hypothesis (HaH_a) states there is a difference.

We then collect sample data and calculate a test statistic to evaluate these hypotheses.

📝 Example:

  • Null hypothesis (H0H_0): The average height of men and women is the same.
  • Alternative hypothesis (HaH_a): The average height of men and women is different.

2.1.2 Calculating sample statistics

To perform hypothesis tests, we first need to calculate key statistics from our samples. This includes the sample size, sample mean, and sample variance for each group.

  • Sample size (nn): The number of observations in a sample.
  • Sample mean (xˉ\bar{x}): The average value of the observations in a sample.
  • Sample variance (s2s^2): A measure of the spread or dispersion of data points around the sample mean.

These statistics capture the essential characteristics of our samples and are used in subsequent calculations 26.

2.1.3 Pooled variance

When assuming equal variances between two populations, we calculate a pooled variance. This combines the variances from both samples to get a more stable estimate of the common population variance.

The formula for pooled variance is: spooled2=(n1−1)s12+(n2−1)s22n1+n2−2s^2_{\text{pooled}} = \frac{(n_1 - 1)s_1^2 + (n_2 - 1)s_2^2}{n_1 + n_2 - 2} Here, n1n_1 and n2n_2 are sample sizes, and s12s_1^2 and s22s_2^2 are sample variances.

2.1.4 The t-test for independent samples

The t-test for independent samples is used to compare the means of two separate groups. It assumes the data in each group are independent and approximately normally distributed.

The test statistic, the t-value, measures the difference between sample means relative to the variability within the samples. The formula for the t-statistic when assuming equal variances is: t=(xˉ1−xˉ2)−(μ1−μ2)spooled2(1n1+1n2)t = \frac{(\bar{x}_1 - \bar{x}_2) - (\mu_1 - \mu_2)}{\sqrt{s^2_{\text{pooled}} \left(\frac{1}{n_1} + \frac{1}{n_2}\right)}} The null hypothesis often sets μ1−μ2=0\mu_1 - \mu_2 = 0.

🔑 Important: The t-test helps determine if an observed difference between two group means is likely due to a real effect or just random chance.

2.1.5 Degrees of freedom

The degrees of freedom (df) for a t-test are crucial for determining the critical value or p-value. For independent samples with pooled variance, the degrees of freedom are calculated as n1+n2−2n_1 + n_2 - 2.

These degrees of freedom influence the shape of the t-distribution and thus the probability of observing a given t-statistic 21.

🔑 Important: Degrees of freedom adjust the t-distribution based on sample size, reflecting the amount of information available to estimate variance.

2.1.6 Interpreting the results

After calculating the t-statistic and its degrees of freedom, we compare it to a critical value or calculate a p-value. If the p-value is less than our chosen significance level (e.g., 0.05), we reject the null hypothesis.

  • Reject H0H_0: Evidence suggests a statistically significant difference between population means.
  • Fail to reject H0H_0: Not enough evidence to conclude a significant difference.

🔑 Important: Statistical significance does not always imply practical significance; the size of the effect matters.

2.2 Types of statistical inference

Statistical inference broadly encompasses two main approaches: hypothesis testing and confidence intervals. Both methods use sample data to make inferences about population parameters.

Inference TypePrimary GoalOutput
Hypothesis TestingDecide if a claim about a population is supported.Reject or fail to reject H0H_0.
Confidence IntervalEstimate a population parameter with a range.A range of plausible values.

These methods provide complementary information about population characteristics based on sample evidence 22 23.

2.2.1 Hypothesis testing explained

Hypothesis testing involves setting up competing statements about a population parameter. We then use sample data to determine which statement is more likely to be true 27 28.

The process involves:

  1. Stating the null (H0H_0) and alternative (HaH_a) hypotheses.
  2. Choosing a significance level (α\alpha).
  3. Calculating a test statistic.
  4. Determining the p-value.
  5. Making a decision based on the p-value and α\alpha.

🔑 Important: The goal of hypothesis testing is to assess evidence against a specific claim (the null hypothesis).

2.2.2 Confidence intervals explained

A confidence interval provides a range of plausible values for an unknown population parameter. It is constructed from sample data and a chosen confidence level (e.g., 95%).

A 95% confidence interval means that if we were to repeat the sampling process many times, 95% of the intervals constructed would contain the true population parameter.

🔑 Important: Confidence intervals give us a sense of the precision of our estimate and the range of likely values for a population parameter.

📝 Example: A 95% confidence interval for the average height of women might be (162 cm, 166 cm). This suggests we are 95% confident the true average height of all women falls within this range.

2.2.3 Relationship between hypothesis testing and confidence intervals

Hypothesis testing and confidence intervals are closely related and can often lead to the same conclusion. For instance, if a confidence interval for the difference between two means does not contain zero, it implies that we would reject the null hypothesis of no difference at a corresponding significance level.

ScenarioHypothesis Test (for μ1=μ2\mu_1 = \mu_2)Confidence Interval (for μ1−μ2\mu_1 - \mu_2)
The interval does not contain 0.Reject H0H_0.The difference is statistically significant.
The interval does contain 0.Fail to reject H0H_0.The difference is not statistically significant.

This duality allows researchers to choose the method that best suits their inferential goals 24 25.

🔑 Important: A confidence interval provides an estimate and its precision, while hypothesis testing focuses on making a decision about a specific claim.

🔑 Important: Use statistical inference to generalize findings from a sample to a larger population, enabling data-driven conclusions.

3. Paired comparisons en Comparing two proportions

3.1 Paired comparisons

Paired comparisons are used when observations naturally occur in pairs. This often involves before-and-after measurements on the same subject.

The goal is to analyze the difference between these paired observations.

  • Paired data: Measurements taken on the same unit or matched units, like (Xi, Yi).
  • Difference: Calculate the difference for each pair as Di = Xi - Yi.
  • Hypothesis: The central question is whether the average difference, denoted by ω, is zero.

The core idea is to check if the mean difference ω is statistically different from zero.

3.1.1 Hypothesis testing for paired differences

To test the hypothesis that the mean difference ω is zero, we use the sample mean difference D̄ and its standard error.

  • Sample mean difference: D̄ = (1/n) * Σ(Xi - Yi) which simplifies to D̄ = X̄ - Ȳ 43.
  • Hypothesis test statistic: For a large sample size (n≥30n ≥ 30), the test statistic (Dˉ−ω)/(SD/√n)(D̄ - ω) / (SD/√n) follows a standard normal distribution N(0, 1) 38.

Use the sample mean difference D̄ to assess if the true mean difference ω is significantly different from zero.

ComponentDescription
Hypothesized differenceThe value of the population mean difference (ω) under the null hypothesis.
Observed differenceThe mean difference calculated from the sample data (D̄).
Standard errorThe variability of the sample mean difference.

This section focuses on the statistical methods for comparing two proportions, including formulas for estimation and hypothesis testing.

3.2 Comparing two proportions

Comparing two proportions involves analyzing differences between two groups. We often estimate these proportions and their difference, then perform a hypothesis test.

  • Sample proportions: For two groups, the sample proportions are p̂1 = X/n1 and p̂2 = Y/n2. Here, X and Y are the counts of successes in samples of size n1 and n2 respectively.
  • Difference in proportions: The observed difference is p̂1 - p̂2.
  • Standard Error (SE) of the difference: This quantifies the variability of the difference between the two sample proportions.

The SE of the difference in proportions measures how much the observed difference is likely to vary from sample to sample.

3.2.1 Calculating the standard error

The formula for the standard error of the difference between two proportions is:

S.E.(p^1−p^2)=p1q1n1+p2q2n2\text{S.E.}(\hat{p}_1 - \hat{p}_2) = \sqrt{\frac{p_1 q_1}{n_1} + \frac{p_2 q_2}{n_2}}

where q1 = 1 - p1 and q2 = 1 - p2 44.

  • Estimating SE: When population proportions p1 and p2 are unknown, we use the sample proportions p̂1 and p̂2 to estimate the standard error.
  • Pooled proportion: For hypothesis testing, a pooled proportion p̂ is often calculated as p̂ = (X + Y) / (n1 + n2). This assumes the proportions are equal under the null hypothesis.

Use the pooled proportion to calculate a common standard error for testing if proportions are equal.

3.2.2 Hypothesis testing for the difference in proportions

To test if there is a significant difference between two proportions, we use a z-test when sample sizes are large.

  • Test statistic: The test statistic for the difference between two proportions is calculated as: z=(p^1−p^2)−(hypothesized difference)S.E.(p^1−p^2)z = \frac{(\hat{p}_1 - \hat{p}_2) - (\text{hypothesized difference})}{\text{S.E.}(\hat{p}_1 - \hat{p}_2)}
  • Null hypothesis: Typically, the null hypothesis is that the proportions are equal, i.e., p1 - p2 = 0.
  • Distribution: For large sample sizes n1 and n2, the test statistic follows approximately a standard normal distribution N(0,1) 45.

The z-test for two proportions helps determine if observed differences in success rates between two groups are statistically significant.

🔑 Important: Paired comparisons analyze differences within matched pairs, while comparing two proportions analyzes differences between two independent groups.

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

See also