5a890255 8f8e 428b abe6 c2bc44a4828a
📚 5a890255-8f8e-428b-abe6-c2bc44a4828a.pdf
Brief overview
This document provides a comprehensive guide to statistical inference, covering the foundational concepts of sampling distributions and their application in hypothesis testing and confidence intervals for means and proportions. It also delves into the analysis of relationships between variables through linear regression and correlation.
Key points
- Overview of sampling distributions for sample mean and proportion.
- Performing hypothesis tests for population proportions and means.
- Conducting analysis of variance (ANOVA) for multiple groups.
- Understanding linear regression and correlation analysis.
- Practical application of statistical inference in various scenarios.
1. Sampling distributions of sample mean and proportion
1.1 Sampling distribution of the sample mean (xˉ)
- Population mean (μxˉ): The mean of the sampling distribution of the sample mean is equal to the population mean.
- μxˉ=μ.
- Population standard deviation (σxˉ): This is also known as the standard error of the mean. It is calculated by dividing the population standard deviation by the square root of the sample size.
- σxˉ=nσ.
1.1.1 Normality condition
- The Central Limit Theorem (CLT) states that the sampling distribution of the sample mean can be approximated by a normal distribution if the sample size (n) is sufficiently large.
- Typically, n≥30 is considered large enough.
- If the population itself is normally distributed, the sampling distribution of the sample mean will also be normal, regardless of the sample size.
🔑 Important: CLT allows us to use normal distribution methods even if the population isn't normal, as long as the sample is large.
1.1.2 Confidence intervals for the population mean (μ)
- Point estimate: The sample mean (xˉ) is the best point estimate for the population mean (μ).
- Critical values: These depend on the confidence level and whether the population standard deviation (σ) is known.
- If σ is known or n≥30, use z-scores.
- If σ is unknown and n<30 (and population is normal), use t-scores.
- Confidence Interval formula:
- When σ is known or n≥30: xˉ±zα/2(nσ)
- When σ is unknown: xˉ±tα/2,n−1(ns)
🔑 Important: The choice between z and t critical values is crucial and depends on whether the population standard deviation is known.
1.1.2.1 Example: Confidence Interval
- Scenario: Sample mean (xˉ) = 7, sample standard deviation (s) = 2.5, sample size (n) = 25, confidence level = 90%.
- Since σ is unknown and n<30, we use the t-distribution.
- The critical value for 90% confidence with df=25−1=24 is t0.05,24=2.064.
- The margin of error is t×ns=2.064×252.5=2.064×0.5=1.032.
- The confidence interval is 7±1.032, which is (5.968,8.032).
- The upper limit is approximately 8.032.
1.1.2.2 Example: Upper limit calculation
- Scenario: Sample mean (xˉ) = 6.8, sample standard deviation (s) = 1.6, sample size (n) = 16, confidence level = 95%.
- Since σ is unknown and n<30, we use the t-distribution.
- The critical value for 95% confidence with df=16−1=15 is t0.025,15=2.131.
- The margin of error is t×ns=2.131×161.6=2.131×0.4=0.8524.
- The confidence interval is 6.8±0.8524, which is (5.9476,7.6524).
- The upper limit is approximately 7.652.
1.1.3 Hypothesis testing for the population mean (μ)
- Test statistic: Calculated to determine how far the sample mean is from the hypothesized population mean.
- When σ is known or n≥30: z=σ/nxˉ−μ0
- When σ is unknown: t=s/nxˉ−μ0
- Rejection region: Determined by the significance level (α) and the alternative hypothesis.
- For a one-sided test HA:μ<μ0 with α=0.05 and n=8 (assuming normal population and unknown σ), the critical t-value has df=7. The rejection region is t≤−2.365.
🔑 Important: The test statistic quantifies the evidence against the null hypothesis.
1.1.3.1 Example: Test statistic calculation
- Scenario: Null hypothesis H0:μ=5.4, sample mean (xˉ) = 7, sample standard deviation (s) = 2.5, sample size (n) = 25.
- Using the t-statistic formula: t=2.5/257−5.4=2.5/51.6=0.51.6=3.2 3.
1.1.3.2 Example: Test statistic calculation
- Scenario: Null hypothesis H0:μ=5, sample mean (xˉ) = 6.8, sample standard deviation (s) = 1.6, sample size (n) = 16.
- Using the t-statistic formula: t=1.6/166.8−5=1.6/41.8=0.41.8=4.5 5.
1.2 Sampling distribution of the sample proportion (p^)
- Population proportion (p): The proportion of a characteristic in the entire population.
- Sample proportion (p^): The proportion of a characteristic in a sample.
1.2.1 Mean and standard deviation of the sample proportion
- Mean (μp^): The mean of the sampling distribution of the sample proportion is equal to the population proportion (p).
- μp^=p.
- Standard deviation (σp^): Also known as the standard error of the proportion.
- σp^=np(1−p).
1.2.1.1 Example: Mean and standard deviation
- Scenario: Population proportion (p) = 80% = 0.80, sample size (n) = 75.
- Mean: μp^=p=0.80.
- Standard deviation: σp^=750.80(1−0.80)=750.80×0.20=750.16≈0.002133≈0.0462.
1.2.2 Normality condition for p^
- The sampling distribution of p^ can be approximated by a normal distribution if the following conditions are met:
- np≥5
- n(1−p)≥5
- These ensure that there are enough "successes" and "failures" in the population relative to the sample size 2.
🔑 Important: These conditions are essential for using normal approximations and constructing confidence intervals or conducting hypothesis tests for proportions.
1.2.3 Confidence intervals for the population proportion (p)
- Point estimate: The sample proportion (p^) is the best point estimate for the population proportion (p).
- Confidence Interval formula: p^±zα/2np^(1−p^)
- Note: The standard error is estimated using p^ instead of p when p is unknown.
1.2.3.1 Example: Confidence Interval
- Scenario: Sample size (n) = 80, number of students finding eText helpful = 48, confidence level = 99%.
- Sample proportion (p^) = 48/80=0.60.
- For 99% confidence, zα/2=2.576.
- The standard error is 800.60(1−0.60)=800.60×0.40=800.24=0.003≈0.0548.
- The margin of error is 2.576×0.0548≈0.141.
- The confidence interval is 0.60±0.141, which is approximately (0.459,0.741).
- The most appropriate interval is .60±0.14.
1.3 Key concepts summary
| Concept | Symbol/Formula | Description |
|---|---|---|
| Mean of sample mean | μxˉ=μ | The average of all possible sample means equals the population mean. |
| Std. dev. of sample mean | σxˉ=nσ | Also called standard error; measures spread of sample means. |
| Normality condition | n≥30 or population is normal | Allows approximation by a normal distribution via CLT. |
| Mean of sample proportion | μp^=p | The average of all possible sample proportions equals the population proportion. |
| Std. dev. of sample proportion | σp^=np(1−p) | Also called standard error of proportion; measures spread of sample proportions. |
| Normality condition | np≥5 and n(1−p)≥5 | Allows approximation by a normal distribution. |
🔑 Important: Understanding the parameters of sampling distributions (mean and standard deviation) and their normality conditions is fundamental for inference.
🔑 Important: The p-value is the probability of observing a test statistic as extreme or more extreme than the one calculated, assuming the null hypothesis is true 4.
2. Hypothesis tests for population proportions
Hypothesis testing for population proportions helps us make inferences about proportions in a population based on sample data. This section covers tests for single proportions and for comparing two proportions.
2.1 Comparing two population proportions
When comparing proportions from two independent populations, we use a z-test. This test assumes the sample sizes are large enough for the sampling distributions to be approximated by a normal distribution.
- Null Hypothesis (H₀): Typically states there is no difference between the two population proportions, often written as p1−p2=0.
- Alternative Hypothesis (H₁): States a specific difference exists, which can be one-sided (p1−p2>0 or p1−p2<0) or two-sided (p1−p2=0).
The null hypothesis always contains the equality.
To determine if we should reject the null hypothesis, we compare a calculated test statistic to a critical value from the z-distribution.
2.1.1 Example: Coronavirus worry among genders
A survey asked if women are more worried than men about coronavirus.
- Data:
- Women: 530 out of 1,000 are very worried (p1).
- Men: 658 out of 1,400 are very worried (p2).
- Hypotheses:
- Distribution: Use a z-distribution for large sample sizes .
- Critical Value (α = 0.01): The critical value for a right-tailed test at α=0.01 is approximately 2.33 .
- Test Statistic: Assuming the calculation is done, the test statistic is approximately 3.61 .
- Decision: Since 3.61>2.33, we reject the null hypothesis.
- Conclusion: There is sufficient evidence to conclude that the proportion of women very worried about the pandemic is higher than that of men 7.
2.1.2 Comparing two population means with unknown variances
When comparing the means of two independent groups and the population standard deviations are unknown, we use a t-distribution. This is common when dealing with sample data.
- Null Hypothesis (H₀): Typically states no difference between the population means (μ1−μ2=0).
- Alternative Hypothesis (H₁): States a specific difference exists, e.g., μ1−μ2>0 for a right-tailed test .
- Distribution: The t-distribution is used .
- Degrees of Freedom (df): Calculated based on the sample sizes of both groups. If population variances are assumed equal, a pooled variance is used.
- Critical Value: Obtained from the t-distribution table using the calculated degrees of freedom and the significance level (α).
- Test Statistic: Calculated using the sample means, sample standard deviations, and sample sizes.
Use the t-distribution when population standard deviations are unknown and sample sizes may be small.
2.1.2.1 Example: Social networking time
Comparing daily social networking time between women and men.
- Data:
- Women: n1=22, xˉ1=172, s1=18.4
- Men: n2=24, xˉ2=150, s2=20
- Hypotheses: H0:μ1−μ2=0, H1:μ1−μ2>0 (Women spend more time) .
- Distribution: t-distribution 8.
- Critical Value (α=0.05): With appropriate df, the critical value is approximately 1.677 .
- Test Statistic: Using the provided pooled standard error, the test statistic is approximately 3.872 .
- Decision: Since 3.872>1.677, reject H0 .
- Conclusion: Women spend more time on social networking than men 9.
2.2 Comparing means of multiple populations (ANOVA)
When comparing the means of three or more independent groups, Analysis of Variance (ANOVA) is used. ANOVA tests if there is a significant difference among any of the group means.
- Null Hypothesis (H₀): States that all population means are equal (μ1=μ2=...=μk).
- Alternative Hypothesis (H₁): States that at least one population mean is different from the others. It does not specify which mean is different .
- Distribution: The F-distribution is used .
- Degrees of Freedom:
- Numerator (df_num): Number of groups (k) minus 1 (k−1).
- Denominator (df_den): Total number of observations (N) minus the number of groups (N−k).
ANOVA uses the F-distribution to compare variances between groups.
2.2.1 Example: Grocery price comparison
Comparing weekly grocery prices among three chains.
- Data: Weekly prices for 100 items over 4 weeks for three stores.
- Hypotheses:
- Distribution: F-distribution .
- Degrees of Freedom:
- Numerator dfnum=3−1=2 .
- Denominator dfden=12−3=9 (Total observations N=12, number of groups k=3) 10.
- Critical Value (α=0.01): For dfnum=2 and dfden=9 at α=0.01, the critical F-value is approximately 8.02 .
- Test Statistic: Calculated using the sum of squares between groups (SSB) and within groups (SSW). F=SSW/(N−k)SSB/(k−1). Given SSB = 7823.1667 and SSW = 6647.5000, the test statistic is approximately 5.27 .
- Decision: Since 5.27>8.02, we reject H0 .
- Conclusion: There is sufficient evidence to indicate at least one of the average grocery prices is different 11.
🔑 Important: Hypothesis tests for proportions use the z-distribution, while tests for means often use the t-distribution (for unknown population variances) or z-distribution (for known variances). ANOVA uses the F-distribution to compare multiple group means.
3. Linear regression and correlation
3.1 The least squares line
The least squares line estimates the linear relationship between two variables. It minimizes the sum of squared differences between observed and predicted values.
The equation of this line is ŷ = a + bx.
<span style="color: #ff9f29; font-weight: 700;">ŷ</span>: predicted value of the dependent variable (y).<span style="color: #ff9f29; font-weight: 700;">a</span>: the y-intercept, which is the predicted value of y when x is 0.<span style="color: #ff9f29; font-weight: 700;">b</span>: the slope, indicating the change in y for a one-unit increase in x.<span style="color: #ff9f29; font-weight: 700;">x</span>: the independent variable.
The formulas to calculate the slope (b) and y-intercept (a) are derived from summary statistics.
| Formula Component | Calculation |
|---|---|
Slope (b) | b=SSxxSSxy |
Y-intercept (a) | a=yˉ−bxˉ |
Where:
- SSxy is the sum of the cross-products of x and y.
- SSxx is the sum of the squared deviations of x.
- yˉ is the mean of y.
- xˉ is the mean of x.
The slope
brepresents the average change inyfor a one-unit increase inx.
The y-intercept
ais the estimated value ofywhenxis zero. Its practical meaning depends on the context ofx.
3.1.1 Calculating regression components
To find the least squares line, we first calculate the necessary sums and sums of squares from the data. For example, if we have data on screen time (x) and weight loss (y):
- Sum of screen time: ∑x=11,100
- Sum of weight loss: ∑y=3,490
- Sum of squared screen time: SSxx=2,268,750
- Sum of squared weight loss: SSyy=451,187.5
- Sum of cross-products: SSxy=−979,375
Using these values, we can compute the slope and intercept.
- Slope calculation: b=2,268,750−979,375≈−0.43.
- Mean of x: xˉ=811,100=1,387.5.
- Mean of y: yˉ=83,490=436.25.
- Y-intercept calculation: a=436.25−(−0.43)(1,387.5)≈436.25+596.63≈1,032.88.
The least squares line for this data is approximately ŷ = 1,032.88 - 0.43x.
The slope
bof -0.43 indicates that for each additional minute of screen time, weight loss decreases by about 0.43 grams.
3.1.2 Predicting values
We use the least squares line to predict the dependent variable (y) for a given value of the independent variable (x).
- To predict weight loss for 700 minutes of screen time:
ŷ = 1,032.88 - 0.43.ŷ = 1,032.88 - 301ŷ = 731.88.
This means that for 700 minutes of screen time per week, the predicted weight loss is approximately 731.88 grams.
3.2 Correlation
Correlation measures the strength and direction of a linear relationship between two quantitative variables. The correlation coefficient (r) ranges from -1 to +1.
r = +1: perfect positive linear relationship.r = -1: perfect negative linear relationship.r = 0: no linear relationship.
A scatterplot helps visualize the relationship before calculating
r.
3.2.1 Calculating the correlation coefficient
The correlation coefficient (r) is calculated using the sums and sums of squares.
r=SSxxSSyySSxy.
- Using the previous example data: SSxx=2,268,750, SSyy=451,187.5, SSxy=−979,375. r=2,268,750×451,187.5−979,375 r=1,023,337,968,750−979,375 r=1,011,591.86−979,375 r≈−0.968.
This strong negative correlation suggests a strong linear relationship where increased screen time is associated with decreased weight loss.
| Scatterplot Appearance | Approximate Correlation Coefficient (r) |
|---|---|
| Strong positive linear | 0.92 |
| Moderate positive linear | 0.66 |
| No linear pattern | 0 |
| Moderate negative linear | -0.62 |
| Strong negative linear | -0.95 |
3.2.2 Interpreting correlation
- The sign of
rindicates the direction of the linear relationship: positive for an upward trend, negative for a downward trend. - The magnitude of
rindicates the strength: values close to 1 or -1 mean a strong linear relationship, while values close to 0 mean a weak or no linear relationship.
Correlation does not imply causation. A strong correlation between two variables does not mean one causes the other; there might be a lurking variable.
3.3 Coefficient of determination
The coefficient of determination, r2, represents the proportion of the variance in the dependent variable that is predictable from the independent variable.
-
It is calculated by squaring the correlation coefficient (
r). r2=(correlation coefficient)2 -
For the screen time and weight loss example, r≈−0.968. r2=(−0.968)2≈0.937.
This means that approximately 93.7% of the variation in weight loss can be explained by its linear relationship with screen time.
3.4 Hypothesis testing for correlation
We can test whether a statistically significant linear relationship exists between two variables in the population. This is often done by testing the population correlation coefficient, ρ.
-
Hypotheses:
- Null Hypothesis (H0): ρ=0 (no linear correlation in the population).
- Alternative Hypothesis (H1): ρ=0 (there is a linear correlation), or ρ<0 (negative correlation), or ρ>0 (positive correlation).
-
Test Statistic: A t-statistic is used for testing the correlation coefficient. t=r1−r2n−2 The degrees of freedom for this test are df=n−2.
This test helps determine if an observed correlation in a sample is likely due to chance or represents a real linear relationship in the population.
3.4.1 Example hypothesis test
Test at α=0.1 level of significance whether the correlation coefficient ρ is negative.
- Hypotheses: H0:ρ=0, H1:ρ<0.
- From previous calculations, r≈−0.968 and n=8.
- Degrees of freedom: df=n−2=8−2=6.
- Critical Value: For a one-tailed test with α=0.1 and df=6, the critical t-value is approximately -1.440.
- Test Statistic: t=−0.9681−(−0.968)28−2 t=−0.9681−0.9376 t=−0.9680.0636 t=−0.96895.238 t≈−0.968×9.759≈−9.447.
| Component | Value |
|---|---|
| Critical Value of t | -1.440 |
| Test Statistic Value | -9.447 |
| Reject H0? | Yes |
Since the test statistic (-9.447) is less than the critical value (-1.440), we reject H0. There is sufficient evidence to conclude that the correlation coefficient is negative at the α=0.1 significance level.
A negative slope (
b) and a negative correlation coefficient (r) often go together but measure different aspects:bis about change in units,ris about strength and direction of the linear association.
3.4.2 Confidence interval for the slope
We can construct a confidence interval for the population slope (β) to estimate its range.
- The formula for a confidence interval for β is: b±tα/2⋅SEb
Where:
bis the sample slope.- tα/2 is the critical t-value for the desired confidence level with n−2 degrees of freedom.
- SEb is the standard error of the slope.
For a sample with n=14 observations, SSxx=275.00, SEb=2.28, and the sample regression line is ŷ = 13.12 - 7.12x.
- The slope is b=−7.12.
- For a 95% confidence interval, α=0.05, so α/2=0.025.
- With df=n−2=14−2=12, the critical t-value t0.025 is 2.179.
- The margin of error is tα/2⋅SEb=2.179×2.28≈4.968.
The 95% confidence interval for the population slope is: −7.12±4.968
- Lower bound: −7.12−4.968=−12.088
- Upper bound: −7.12+4.968=−2.152
The 95% confidence interval for the population slope is (-12.09, -2.15). This interval suggests that for every one-unit increase in
x, the population mean ofydecreases by between 2.15 and 12.09 units.
Important: The purpose of simple linear regression is to investigate if there exists a linear relationship between a response variable and an independent (explanatory) variable.
Important: For each 1°C increase in temperature, daily ice cream sales increase by EUR 33.11. This is a correct interpretation of the slope in that context.
Important: On average, each additional hour without sleep increases the number of errors by 0.52. This correctly interprets the slope in the sleep deprivation study 15.
Important: The correlation coefficient value (r) is NOT always positive and MUST be between -1 and 1. It can be negative.
Important: If the purpose of our regression model is prediction, it DOES matter which variable is defined as the explanatory and response variable. The roles are distinct.
Important: The observed values of Y will NOT fall on the estimated regression line, while the predicted values of Y will vary around the regression line. Observed values have residuals; predicted values are the line itself.
Important: The percentage of variation in the dependent variable explained by the independent variable is given by r2, the coefficient of determination 13.
Important: A correlation coefficient
rcan range from -1 to 1. A value of 0 means no linear relationship.
Important: The strength of the linear relationship is indicated by the magnitude of
r. Values closer to 1 or -1 indicate a stronger relationship.
Important: Correlation does not imply causation. A strong relationship between two variables doesn't mean one causes the other 14.
Important: The least squares line minimizes the sum of squared vertical distances between the data points and the line 12.
© 2026 Maeve. All rights reserved. This content is protected by copyright.