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 and μ2.
The observed difference is Xˉ−Yˉ, where Xˉ is the sample mean for Group 1 and Yˉ is the sample mean for Group 2.
The difference in population means is μ1−μ2. 7.
1.2.2 Sample means and differences
We use sample means to estimate population means.
- Sample mean for Group 1: Xˉ
- Sample mean for Group 2: Yˉ
The difference between sample means is Xˉ−Yˉ. This difference is a statistic that estimates the difference between population means, μ1−μ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: S12
- Sample variance for Group 2: S22
The variance of the difference between two independent sample means is the sum of their individual variances: Var(Xˉ−Yˉ)=Var(Xˉ)+Var(Yˉ). This formula is crucial for hypothesis testing.
Formula: Var(Xˉ−Yˉ)=n1S12+n2S22 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 (H0) and an alternative hypothesis (Ha).
A common null hypothesis is that the two population means are equal:
- H0:μ1=μ2 or H0:μ1−μ2=0.
The alternative hypothesis could be:
- Ha:μ1=μ2 (two-sided test)
- Ha:μ1>μ2 (one-sided test)
- Ha:μ1<μ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), we can use a Z-test. The Z-test statistic for the difference between means is calculated as: Z=n1S12+n2S22(Xˉ−Yˉ)−(μ1−μ2).
Under the null hypothesis (H0:μ1−μ2=0), the formula simplifies to: Z=n1S12+n2S22Xˉ−Yˉ.
This statistic follows a standard normal distribution (N(0,1)) if H0 is true 15.
1.2.4.2 Pooled variance estimate
When population variances are unknown but assumed to be equal (σ12=σ22), we use a pooled variance estimate. This approach is common for t-tests.
The pooled variance (Sp2) combines information from both samples to get a better estimate of the common variance.
- Pooled variance: Sp2=n1+n2−2(n1−1)S12+(n2−1)S22 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 β.
- Power: The probability of correctly rejecting a false null hypothesis is called power, calculated as 1−β. Higher power means a better chance of detecting a real effect.
Key Concept: Power = 1−P(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 (H0) typically states there is no difference between the population means. The alternative hypothesis (Ha) states there is a difference.
We then collect sample data and calculate a test statistic to evaluate these hypotheses.
📝 Example:
- Null hypothesis (H0): The average height of men and women is the same.
- Alternative hypothesis (Ha): 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 (n): The number of observations in a sample.
- Sample mean (xˉ): The average value of the observations in a sample.
- Sample variance (s2): 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+n2−2(n1−1)s12+(n2−1)s22 Here, n1 and n2 are sample sizes, and s12 and s22 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=spooled2(n11+n21)(xˉ1−xˉ2)−(μ1−μ2) The null hypothesis often sets μ1−μ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−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 H0: Evidence suggests a statistically significant difference between population means.
- Fail to reject H0: 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 Type | Primary Goal | Output |
|---|---|---|
| Hypothesis Testing | Decide if a claim about a population is supported. | Reject or fail to reject H0. |
| Confidence Interval | Estimate 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:
- Stating the null (H0) and alternative (Ha) hypotheses.
- Choosing a significance level (α).
- Calculating a test statistic.
- Determining the p-value.
- Making a decision based on the p-value and α.
🔑 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.
| Scenario | Hypothesis Test (for μ1=μ2) | Confidence Interval (for μ1−μ2) |
|---|---|---|
| The interval does not contain 0. | Reject H0. | The difference is statistically significant. |
| The interval does contain 0. | Fail to reject H0. | 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 toD̄ = X̄ - Ȳ43. - Hypothesis test statistic: For a large sample size (n≥30), the test statistic (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.
| Component | Description |
|---|---|
| Hypothesized difference | The value of the population mean difference (ω) under the null hypothesis. |
| Observed difference | The mean difference calculated from the sample data (D̄). |
| Standard error | The 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/n1andp̂2 = Y/n2. Here,XandYare the counts of successes in samples of sizen1andn2respectively. - 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)=n1p1q1+n2p2q2
where q1 = 1 - p1 and q2 = 1 - p2 44.
- Estimating SE: When population proportions
p1andp2are unknown, we use the sample proportionsp̂1andp̂2to estimate the standard error. - Pooled proportion: For hypothesis testing, a pooled proportion
p̂is often calculated asp̂ = (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=S.E.(p^1−p^2)(p^1−p^2)−(hypothesized difference)
- Null hypothesis: Typically, the null hypothesis is that the proportions are equal, i.e.,
p1 - p2 = 0. - Distribution: For large sample sizes
n1andn2, the test statistic follows approximately a standard normal distributionN(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.