slides H6
Point estimators and point estimates in statistical inference
In statistical inference, point estimators and point estimates are fundamental tools used to approximate unknown population parameters based on sample data. The primary goal is to provide a single, "best guess" value for a parameter that cannot be directly observed from the entire population 8.
1.1 Definition of a point estimator and a point estimate
A point estimator is a random variable that yields a single numerical value, known as a point estimate, upon observing a sample. This point estimate serves as the best approximation for the unknown population parameter 8.
1.2 Notation and examples
- For a population proportion p, the sample proportion P^ is a point estimator, and its observed value p^ is a point estimate 9.
- For a population mean μ, the sample mean Xˉn is a point estimator, and its observed value xˉn is a point estimate 9.
- For a population variance σ2, the sample variance S2 is a point estimator, and its observed value s2 is a point estimate 9.
- For a population standard deviation σ, the sample standard deviation S is a point estimator, and its observed value s is a point estimate 9.
1.3 Properties of a good point estimator
A good point estimator possesses two key characteristics:
1.3.1 Unbiasedness
An unbiased estimator is one whose expected value is equal to the value of the population parameter it is estimating. This means that, on average, the estimator will produce correct estimates over many repeated samples 10.
- Example:
- P^ is an unbiased estimator for p because E(P^)=p 10.
- Xˉn is an unbiased estimator for μ because E(Xˉn)=μ 10.
- S2 is an unbiased estimator for σ2 because E(S2)=σ2 10.
Tip: The formula for the sample variance S2 involves dividing by n−1 rather than n specifically to ensure that it is an unbiased estimator of the population variance σ2. S2=n−11∑i=1n(Xi−Xˉ)2 10.
1.3.2 Efficiency (Smallest standard error)
A good point estimator should also have a standard error that is as small as possible. This implies that the estimates it produces tend to be closer to the true parameter value compared to other estimators. Most estimators covered in introductory statistics courses are unbiased and have relatively small standard errors 11.
Puntschatting in de praktijk en intervalschatting
This topic explores the practical application of point estimation and introduces interval estimation as a method to convey accuracy.
2.1 Point estimation in practice
A practical example illustrates point estimation by asking numerous individuals to estimate the number of candies in a jar. The expectation is that the average of these individual estimates will be closer to the true value than most individual guesses. However, in a specific experiment, 76 participants provided an average estimate of 1,697 candies, which was significantly different from the actual count of 2,845. This highlights that even an average of many estimates might not always be accurate, and some individual estimates can be better than the group's average 13.
Tip: While averaging many estimates can often improve accuracy, it's not a guaranteed solution for finding the true value.
2.2 Limitations of point estimation
A key disadvantage of point estimation is that it provides only a single value representing the estimated population parameter. It offers no information about the accuracy of this estimate or how close the estimated value is believed to be to the true parameter value 14 15.
2.3 Interval estimation
To address the limitations of point estimation, interval estimation is frequently employed. This method not only indicates where the population parameter is thought to lie but also provides a margin of error, giving an idea of the estimator's accuracy 14 15.
2.3.1 Example of interval estimation in VO2 max calculation
An article from 4endurance published in 2024 discusses the estimation of VO2 max, a crucial metric for endurance athletes. Measuring VO2 max accurately requires laboratory conditions to assess oxygen uptake directly. Smartwatches estimate VO2 max using tempo and heart rate, providing an approximation rather than an exact value. Studies indicated that Garmin smartwatches estimate VO2 max with an average error margin of 5%. While 5% might seem large, it translates to a smaller absolute error. For example, if an individual has a VO2 max of 50 ml/kg/min, a 5% error represents 2.5 ml/kg/min. This discrepancy can be significant for professional athletes but may be less critical for recreational athletes 16.
The article illustrates this concept with a visual representation:
- Point estimation: A single point representing the estimated VO2 max (xˉ) 16.
- Interval estimation: A range centered around the point estimate, indicating the potential error margin, such as xˉ−2.5 to xˉ+2.5 16.
Interpretation of confidence intervals
A confidence interval provides a range of plausible values for an unknown population parameter 32 33.
3.1 The correct interpretation
A confidence interval is generated by a method that, over many repetitions, will capture the true population parameter a specified percentage of the time. Specifically, a 95% confidence interval is produced by a method that, on average, yields intervals containing the unknown population mean μ in 95% of instances 32 33.
Conversely, there is a 5% chance that the method will generate a confidence interval that does not contain the true population parameter. This 5% error rate is referred to as a Type I error 32 33.
Tip: It is crucial to understand that the interpretation is about the method used to construct the interval, not about the specific interval obtained from a single sample.
3.2 Common misinterpretations
A common mistake is to state that the true population mean μ has a 95% probability of falling within a specific 95% confidence interval. This interpretation is incorrect because the population mean μ is a fixed, unknown value and not a random variable. Therefore, we cannot assign probabilities to μ belonging to a particular interval 32 33.
3.3 Illustrative examples and concepts
The concept can be better understood through simulations, often available via Java applets 34.
- 95% Confidence Interval: When using a 95% confidence level (which corresponds to an alpha level, α, of 5%), approximately 95% of the generated confidence intervals will successfully capture the true population parameter 34.
- 99% Confidence Interval: Similarly, with a 99% confidence level (an alpha level, α, of 1%), approximately 99% of the generated confidence intervals will contain the population parameter 34.
Figure on page 35 visually depicts multiple confidence intervals generated from different samples. Each interval represents a plausible range for the population mean based on the sample data. The collection of intervals illustrates how, over many samples, a certain percentage will correctly bracket the true population mean 35.
Calculating quantiles for small tail probabilities
This section explains how to find quantiles for small tail probabilities using the standard normal distribution.
4.1 General principles for finding quantiles
For a standard normal distribution Z, we are interested in finding quantiles related to small tail probabilities. For any α such that 0<α≤0.5, we denote QZ(1−α) as the quantile corresponding to the upper tail probability of α. This is equivalent to finding the z-value, denoted as zα, such that the probability of Z being greater than zα is α 41 42.
The relationship can be formally stated as: P(Z>zα)=α 41 42.
This also implies that the probability of Z being less than zα is 1−α: P(Z<zα)=1−α 41 42.
Furthermore, for a symmetric distribution like the standard normal distribution, we can relate this to probabilities in the lower tail. The probability of Z being less than −zα is equal to α: P(Z<−zα)=α 41 42.
We can also consider the probability within a symmetric interval around the mean. The probability of Z falling between −zα/2 and zα/2 is 1−α: P(−zα/2≤Z≤zα/2)=1−α 41 42.
It is important to note that zα/2 is not the same as zα/2 41 42.
Tip: When working with small tail probabilities, think about whether you need the z-value for the upper tail (zα) or for a symmetric interval (zα/2).
4.2 Using a standard normal distribution table
Standard normal distribution tables are commonly used to find these z-values. The tables typically provide cumulative probabilities, i.e., P(Z<z).
Example: Finding z0.1 and z0.05 for α=0.1.
-
Calculate zα=z0.1: We are looking for the z-value such that P(Z>0.1)=0.1. This is equivalent to finding z0.1 such that P(Z<z0.1)=1−0.1=0.90. Looking up 0.900 in a standard normal distribution table, we find that z0.1 is approximately 1.28 44.
-
Calculate zα/2=z0.1/2=z0.05: We are looking for the z-value such that P(Z>0.05)=0.05. This is equivalent to finding z0.05 such that P(Z<z0.05)=1−0.05=0.95. Consulting a standard normal distribution table (as shown in the document ), we observe values around 0.95. For instance, P(Z<1.64)≈0.949 and P(Z<1.65)≈0.951. By convention or interpolation, z0.05 is often taken as 1.645 43 44.
Example: To find the z-score corresponding to the 97.5th percentile (i.e., P(Z<z)=0.975), we look for 0.975 in the table. This value is typically found to be 1.96. This means that 97.5% of the data falls below z=1.96 and 2.5% falls above it. This value 1.96 is often used to construct 95% confidence intervals, where α=0.05.
Student t-distribution
The student t-distribution is a probability distribution that is used in statistical inference when the population standard deviation is unknown and must be estimated from sample data 57.
5.1 Characteristics of the t-distribution
The t-distribution is similar to the normal distribution in that it is bell-shaped and symmetric around zero. However, it has heavier tails than the normal distribution, meaning that extreme values are more likely to occur. This characteristic makes the t-distribution more appropriate for small sample sizes, where the uncertainty in estimating the population standard deviation is greater 57.
The shape of the t-distribution is determined by its degrees of freedom, denoted by r. The degrees of freedom are typically calculated as n−1, where n is the sample size. As the degrees of freedom increase, the t-distribution approaches the standard normal distribution 57 58 60.
Tip: The degrees of freedom represent the number of independent pieces of information available to estimate a parameter. For a single sample mean, it is n−1 because one degree of freedom is lost in estimating the sample mean itself.
5.2 Using the t-distribution for confidence intervals
In statistical inference, the t-distribution is frequently used to construct confidence intervals for population means when the population standard deviation is unknown 58.
To construct a 100(1−α)%-confidence interval, we need t-values that satisfy the condition: P(T>t)=2α and P(T<−t)=2α 58.
Here, T is a random variable following a t-distribution with r=n−1 degrees of freedom. These critical t-values are denoted as tn−1,α/2 and can be found in t-tables. The structure of the t-distribution and the critical values is illustrated in Figure 1 58 59.
Example: Suppose we want to construct a 95% confidence interval for a population mean using a sample of size n=10. The degrees of freedom would be r=10−1=9. For a 95% confidence interval, α=0.05, so α/2=0.025. Looking up t9,0.025 in a t-table, we find the value is approximately 2.262. This value is used in the calculation of the confidence interval 60.
5.3 t-tables and values
T-tables provide critical t-values for various degrees of freedom (r) and tail probabilities (α/2). The rows of the table typically correspond to the degrees of freedom, and the columns correspond to the cumulative tail probabilities or tail areas 60.
For instance, a t-table shows that for r=1 degree of freedom and a tail area of α/2=0.025, the t-value is 12.706. For r=2 degrees of freedom and the same tail area, the t-value is 4.303. As the degrees of freedom approach infinity (r=∞), the t-values converge to the z-values of the standard normal distribution, such as 1.960 for a tail area of 0.025 60.
Tip: When using t-tables, ensure you are using the correct column for your desired confidence level (e.g., the column for α/2=0.025 for a 95% confidence interval) and the correct row for your sample's degrees of freedom. If your exact degrees of freedom are not listed, it is common practice to use the closest lower value for a more conservative estimate.
Calculating confidence intervals for the mean with known standard deviation
This section details how to construct confidence intervals for a population mean when the population standard deviation is known.
6.1 The concept of the margin of error
The difference between the sample mean Xˉn and the population mean μ, when the data comes from a normal distribution with a known standard deviation σ, can be expressed in terms of probability. Specifically, there is a 95% probability that the sample mean deviates from the population mean by at most 1.96 times the standard error 27 28.
This maximum deviation, which occurs with 95% probability, is termed the margin of error for a 95% confidence interval for the population mean μ 27 28.
6.1.1 Definition of margin of error
The margin of error (e) quantifies the expected accuracy of an estimator and is a multiple of the estimator's standard error (se) 27 28.
6.2 Constructing the confidence interval
When a random sample X1,…,Xn is drawn from a normal distribution with a known standard deviation σ, the 95% confidence interval for the population mean μ can be calculated 29.
6.2.1 Formulas for the 95% confidence interval
The margin of error for the 95% confidence interval is given by: e=1.96×standard error 29.
With the standard error defined as nσ the margin of error formula becomes 29: e=1.96×nσ 29.
The 95% confidence interval for the population mean μ is then constructed as the point estimate (sample mean xˉn) plus or minus the margin of error: Confidence Interval=xˉn±e 29.
Substituting the margin of error formula, the interval is: [xˉn−1.96nσ,xˉn+1.96nσ] 29.
Tip: The value 1.96 is derived from the z-score corresponding to the central 95% of the standard normal distribution. For other confidence levels, this multiplier will change.
6.2.2 Application to non-normal distributions with large samples
If the sample is not drawn from a normal distribution, but the sample size (n) is sufficiently large (at least 30), the central limit theorem allows for an approximation. In such cases, the distribution of σ/nXˉn−μ approximates a standard normal distribution N(0,1) 30.
Consequently, the probability statement holds approximately: P(−1.96nσ⩽Xˉn−μ⩽1.96nσ)≈0.95 30.
This leads to an approximate 95% confidence interval for μ: [xˉn−1.96nσ,xˉn+1.96nσ] 30.
Note: This interval is an approximation, and its reliability depends on the sample size being large enough. The confidence level is the probability that the method used to construct the interval yields an interval containing μ 30.
6.3 Example calculation
Consider a scenario where the sample mean well-being score for self-employed individuals is xˉn=6.634 from a sample of n=500 individuals. If the population standard deviation σ is known to be 1.4 (based on years of measurement), we can calculate an approximate 95% confidence interval for the average well-being score of self-employed individuals 31.
-
Calculate the standard error: se=nσ=5001.4≈0.063 31.
-
Calculate the margin of error: e=1.96×se=1.96×0.063≈0.123 31.
-
Construct the confidence interval: The approximate 95% confidence interval for μ is [xˉn−e,xˉn+e]. [6.634−0.123,6.634+0.123=[6.511,6.757] 31.
Interpretation: We are 95% confident that the true average well-being score for self-employed individuals lies between 6.511 and 6.757 31.
Confidence intervals for the mean of a normal variable with different confidence levels
This section details how to construct confidence intervals for the mean of a normal variable when using confidence levels other than the commonly used 95% 36.
7.1 General principles
While a 95% confidence level is standard in many applications, some scenarios necessitate higher or lower levels of confidence, such as 90%, 99%, or even 99.9%. A fundamental trade-off exists in constructing confidence intervals: increasing the confidence level will invariably lead to a larger margin of error and, consequently, a wider interval. This means practitioners must balance the desire for high reliability with the need for a precise estimate of the population mean 36.
7.2 Notation for general confidence levels
A general confidence level is denoted as 1−α or 100(1−α)% 38 39 40.
- For a 95% confidence interval (CI), α is equal to 0.05 39 40.
- For a 99% CI, α is equal to 0.01 39 40.
The critical values used in constructing the interval are based on 2α and −2α in the standard normal distribution 38 39 40.
Tip: Understanding α as the probability of not being within the confidence interval is crucial. A smaller α (e.g., 0.01 for 99% CI) means a smaller area in the tails of the distribution, requiring larger z-scores to capture the central 1−α probability.
7.3 Relationship between confidence level and interval width
As the confidence level increases, the corresponding z-score value increases, leading to a larger margin of error and thus a wider confidence interval. Conversely, a lower confidence level will result in a smaller z-score, a smaller margin of error, and a narrower interval 36.
Example: To achieve a 99% confidence interval, we need to capture a larger proportion of the probability distribution compared to a 95% confidence interval. This requires extending further into the tails of the normal distribution, which corresponds to larger absolute values for the critical z-scores (zα/2). These larger z-scores directly increase the width of the margin of error, making the interval wider.
Student t-verdeling
The Student t-distribution is a probability distribution used for statistical inference, particularly when estimating population parameters from small sample sizes where the population standard deviation is unknown.
8.1 When to use the Student t-distribution
The Student t-distribution is primarily employed when constructing a confidence interval for the mean of a normal variable when the population standard deviation (σ) is unknown. In such practical scenarios, σ is estimated by s, the sample standard deviation. This leads to an estimated standard error of s/n 54.
The quantity s/nXˉn−μ is not standard normally distributed. However, if the individual data points X1,…,Xn are normally distributed, then the ratio s/nXˉn−μ follows a Student t-distribution with n−1 degrees of freedom 54 55.
Even if the data are not strictly normally distributed, the t-distribution can serve as a good approximation if the sample size is sufficiently large (e.g., n⩾30) 55.
8.2 Properties of the Student t-distribution
The Student t-distribution shares several key characteristics with the standard normal distribution:
- Shape: It is bell-shaped and symmetric around 0 56.
- Dependence on degrees of freedom: The precise shape and associated probabilities are determined by the number of degrees of freedom (r) 56.
- Heavier tails: Compared to the normal distribution, the t-distribution has heavier tails, especially when the number of degrees of freedom is small. This means extreme values are more likely to occur 56.
- Approximation to the normal distribution: As the number of degrees of freedom (r) increases, the t-distribution increasingly resembles the standard normal distribution. Consequently, the standard normal distribution is sometimes viewed as a t-distribution with an infinite number of degrees of freedom 56.
Tip: The heavier tails of the t-distribution account for the increased uncertainty introduced by estimating the population standard deviation from the sample 56.
The following figure illustrates the density functions of different t-distributions with varying degrees of freedom:
57.
8.3 Using the t-distribution for confidence intervals
To construct a 100(1−α)% confidence interval (CI) for the mean based on a sample of size n, specific t-values are required. Similar to z-values for the normal distribution, these t-values satisfy the condition 58:
P(T>t)=2α (and P(T<−t)=2α)
where T is a random variable following a t-distribution with r=n−1 degrees of freedom 58.
These critical t-values are denoted as tn−1,α/2 and can be found in a t-table 58.
Hypothesetest omtrent het gemiddelde van een normale variabele
This topic introduces the concept of hypothesis testing as a statistical technique to evaluate claims about a population parameter, specifically focusing on testing hypotheses about the mean of a normally distributed variable 70 71.
9.1 General principles of hypothesis testing
A hypothesis in statistics is a statement about a characteristic of a population, often concerning the value of a parameter, its range, or the distribution of a variable. A hypothesis test is a method used to determine the extent to which sample data supports a particular hypothesis about a population characteristic 71.
9.2 Examples of research questions addressed by hypothesis testing
Hypothesis testing can be applied to various research questions, such as:
- Is the average well-being score of self-employed individuals in Belgium equal to 6.5 or not 72?
- Do students of Criminology study more than 4 hours per week on average for their courses 72?
- Is the average rent for a student room in Leuven less than 500 euros 72?
9.3 Hypothesis testing for the mean of a normal variable
9.3.1 Two-sided test
A two-sided test is used to determine whether the population mean is different from a proposed value 73.
Tip: The core idea is to assess if the observed sample data deviates significantly from what would be expected if the hypothesis about the population parameter were true.
9.3.2 Motivating example: Well-being score of self-employed individuals
Consider the research question: "Is the average well-being score of self-employed individuals in Belgium different from 6.5 or not?" 74. Let X represent the well-being score of a self-employed individual in Belgium. Assume X is a random variable with a specific probability distribution, and let μ=E(X) be the average well-being score of self-employed individuals in Belgium. The hypothesis being investigated is whether μ=6.5 or μ=6.5 74.
If the sample mean, denoted as xˉn, is 6.634, this point estimate for μ differs from the proposed value of 6.5. The question then becomes: can we conclude from this sample that the population mean μ is also not equal to 6.5? A hypothesis test will be used to ascertain whether this conclusion can be drawn based on the available sample data 74.
Formulating conclusions in hypothesis testing
This section details the process of interpreting the results of a hypothesis test to formulate a meaningful conclusion, focusing on the P-value and significance level .
10.1 Calculating the P-value
The P-value quantifies how extreme the observed test statistic is within the context of the sampling distribution, assuming the null hypothesis (H0) is true .
-
Interpretation:
-
A small P-value indicates that the sample data strongly contradict the null hypothesis and provide support for the alternative hypothesis (Ha) .
-
A large P-value suggests that the sample data do not provide sufficient evidence to reject the null hypothesis in favor of the alternative hypothesis .
-
Calculation (for a two-sided test for μ with σ unknown): The P-value is calculated as 2P(T>∣t∣) where T∼tn−1 and t is the observed test statistic .
10.2 Formulating a decision based on the P-value and significance level
Before conducting a hypothesis test, a significance level (α) is predetermined. This α represents the threshold for how small the P-value must be to reject the null hypothesis .
- Decision Rule:
- If P-value <α: Reject the null hypothesis (H0) in favor of the alternative hypothesis (Ha) at the α significance level. This implies that the value specified in H0 is unlikely to be the true value of the parameter being tested. For a test about μ, you can conclude μ=μ0 .
- If P-value ≥α: Do not reject the null hypothesis (H0) at the α significance level. This means that the value specified in H0 remains a plausible value for the parameter, although not necessarily the only one. For a test about μ, you cannot reject the possibility that μ=μ0 .
Tip: Failing to reject the null hypothesis is not equivalent to concluding that the null hypothesis is true. It simply means that the study did not find sufficient evidence to contradict it. This is analogous to a legal trial where an acquittal means there wasn't enough evidence to convict, not necessarily that the person is innocent .
10.3 Reporting the conclusion
A comprehensive conclusion in a hypothesis test should report the P-value and the significance level used, and directly address the research question that prompted the test .
- Reporting P-value and significance level: It is crucial to always report the significance level (α) alongside the conclusion .
Example: Consider a hypothesis test where the P-value is between 2% and 5%.
- Because the P-value is less than 0.05, we can reject the null hypothesis at the 5% significance level (α=0.05). This allows us to conclude that the average well-being score of self-employed individuals in Belgium differs from 6.5 .
- However, because the P-value is greater than or equal to 0.01, we cannot reject the null hypothesis at the 1% significance level (α=0.01). Therefore, we cannot reject the statement that the average well-being score of self-employed individuals in Belgium is equal to 6.5 .
Tip: Reporting the exact P-value provides more informative insight than simply stating that a result is "statistically significant at the 5% level". For instance, a P-value of 0.1% indicates much stronger evidence against the null hypothesis than a P-value of 4.9%, even though both might lead to rejecting H0 at the 5% significance level .
Testing the mean of a normal variable with known variance
This section outlines the procedure for testing hypotheses about the mean of a normally distributed variable when the population variance is known.
11.1 Conditions for testing
Before conducting a test on the mean of a normal variable with known variance, the following conditions must be met :
- The sample must be random .
- The variable (X) must be quantitative (or pseudo-metric) .
- The variable must come from a normal distribution, or the sample size (n) must be greater than or equal to 30 .
- The sample should not contain any outliers .
Tip: The condition that the variable comes from a normal distribution can be relaxed if the sample size is sufficiently large (n⩾30) due to the Central Limit Theorem (CLT) .
11.2 Setting up hypotheses
Hypotheses are formulated in relation to the population mean (μ) and a specified value (μ0). There are three common forms :
- Right-tailed test:
- Null hypothesis (H0): μ⩽μ0
- Alternative hypothesis (H1): μ>μ0
- Left-tailed test:
- Null hypothesis (H0): μ⩾μ0
- Alternative hypothesis (H1): μ<μ0
- Two-tailed test:
- Null hypothesis (H0): μ=μ0
- Alternative hypothesis (H1): μ=μ0
11.3 Test statistic
Given that the sample data (X1,…,Xn) are drawn from a normal distribution with a known population variance (σ2), the sample mean (Xˉn) follows a normal distribution under the null hypothesis. Specifically, Xˉn∼N(μ,nσ2) .
The appropriate test statistic (Z) for testing the mean when the variance is known is: Z=σ/nXˉn−μ0 Under the null hypothesis (H0), this test statistic approximately follows a standard normal distribution, N(0,1) .
The calculated value of the test statistic from the sample data is denoted by z: z=σ/nxˉn−μ0
Note: If the variable X does not originate from a normal distribution, but the sample size is large enough (n⩾30), the Central Limit Theorem (CLT) implies that Xˉn≈N(μ,nσ2) .
11.4 Calculating the p-value
The p-value is the probability of observing a test statistic as extreme as, or more extreme than, the one calculated from the sample, assuming the null hypothesis is true. The calculation depends on the type of test :
- Right-tailed test: P-value = P(Z>z) .
- Left-tailed test: P-value = P(Z<z) .
- Two-tailed test: P-value = 2P(Z>∣z∣) .
The probabilities P(Z>z), P(Z<z), and P(Z>∣z∣) are found using a standard normal distribution table, where Z∼(≈)N(0,1) .
11.5 Decision rule
The decision to reject or fail to reject the null hypothesis (H0) is made by comparing the calculated p-value to the chosen significance level (α) .
- If the p-value < α, reject H0 .
- If the p-value ≥α, fail to reject H0 .
11.6 Example: Well-being score of self-employed individuals
Consider a study investigating the average well-being score of self-employed individuals. The sample mean well-being score from a sample of 500 self-employed individuals is xˉn=6.634. It is known from years of measurement that the population standard deviation (σ) of well-being scores is 1.4. We want to test at the 5% significance level if the average well-being score of self-employed individuals is greater than 6.5 .
1. Check conditions:
- The sample is random (given) .
- Well-being score (X) is a pseudo-metric variable .
- Although X does not strictly come from a normal distribution (scores are between 0 and 10), the sample size n=500 is large enough, satisfying the CLT .
- It is assumed there are no outliers in the data .
2. Set up hypotheses: We are testing if the mean well-being score is greater than 6.5.
- H0:μ⩽6.5
- H1:μ>6.5 Here, μ represents the average well-being score of self-employed individuals .
3. Calculate the test statistic: Using the formula Z=σ/nXˉn−μ0≈H0N(0,1), we calculate the test value: z=1.4/5006.634−6.5=1.4/22.360.134=0.06260.134≈2.14
4. Calculate the p-value: This is a right-tailed test, so the p-value is P(Z>z): P(Z>2.14)=1−P(Z⩽2.14) Looking up P(Z⩽2.14) in a standard normal table gives approximately 0.984. P(Z>2.14)=1−0.984=0.016
5. Make a decision: The p-value (0.016) is less than the significance level (α=0.05). Therefore, we reject H0 .
Conclusion: At the 5% significance level, we conclude that the average well-being score of self-employed individuals is greater than 6.5. This conclusion would also hold for any higher significance levels .
11.7 Summary of test statistic and p-value formulas
The following table summarizes the test statistic and p-value calculations for testing the mean of a normal variable with known variance :
| Null Hypothesis (H0) | Alternative Hypothesis (H1) | Test Statistic | P-value |
|---|---|---|---|
| μ=μ0 | μ=μ0 | Z=σ/nXˉ−μ0∼H0N(0,1) (if σ2 known) | $2P(Z > |
| μ=μ0 | μ>μ0 | Z=σ/nXˉ−μ0∼H0N(0,1) (if σ2 known) | P(Z>z) |
| μ=μ0 | μ<μ0 | Z=σ/nXˉ−μ0∼H0N(0,1) (if σ2 known) | P(Z<z) |
Calculating a confidence interval for a proportion
This section details the process of constructing and interpreting a confidence interval for a population proportion.
12.1 Introduction to confidence intervals for proportions
A confidence interval for a proportion provides a range of plausible values for an unknown population proportion, based on sample data. It is a fundamental tool in inferential statistics for estimating population parameters .
12.2 The structure of a confidence interval
A confidence interval for a proportion is typically expressed in the form:
[point estimate ± margin of error] .
12.2.1 Point estimate for a proportion
The point estimate for the population proportion (p) is the sample proportion (p^). The sample proportion is calculated as the number of successes in the sample divided by the total sample size .
12.2.2 Margin of error
The margin of error is calculated by multiplying a critical value (based on the desired confidence level) by the standard error of the proportion .
12.2.2.1 Standard error of the proportion
The exact standard error of the sample proportion (P^) is given by: SE(P)=np(1−p) . where p is the population proportion and n is the sample size.
Since the population proportion (p) is unknown, its estimate, the sample proportion (p^), is used to estimate the standard error: Estimated SE(P^)=np^(1−p^) .
12.2.2.2 Critical value
The critical value is determined by the confidence level. For a 95% confidence interval, the critical value is approximately 1.96, which corresponds to the z-score that captures 95% of the probability in a standard normal distribution. More generally, for a 100(1−α)%-confidence interval, the critical value is zα/2 .
zα/2 is the quantile from the standard normal distribution for which the upper tail probability is α/2, i.e., P(Z>zα/2)=α/2 and P(Z<−zα/2)=α/2 .
12.3 Formula for a confidence interval for a proportion
The approximate 100(1−α)%-confidence interval for a population proportion (p) is given by: \left[ \hat{p} - z_{\alpha/2} \sqrt{\frac{\hat{p}(1-\hat{p})}{n}}, \hat{p} + z_{\alpha/2} \sqrt{\frac{\hat{p}(1-\hat{p})}{n}} \right .
12.3.1 Conditions for using the normal approximation
To use this formula, the sample size must be large enough for the sampling distribution of the sample proportion to be approximately normal. The conditions are :
- np^≥5 (at least 5 "successes" in the sample) .
- n(1−p^)≥5 (at least 5 "failures" in the sample) .
Tip: While the theoretical condition uses the unknown population proportion p (np≥5 and n(1−p)≥5), in practice, we use the sample proportion p^ to check these conditions, as p is unknown. If these conditions are met, the normal approximation is generally considered valid .
12.4 Example: Confidence interval for the proportion of sexual violence victims
Consider the study where 5,000 residents were surveyed about experiencing sexual violence. It was found that 64% of the respondents had experienced sexual violence in their lifetime. We want to find a 95% confidence interval for the true proportion of residents in Belgium who have experienced sexual violence .
-
Identify sample size and sample proportion: n=5000 . p^=0.64 .
-
Check conditions for normal approximation: np^=5000×0.64=3200≥5 . n(1−p^)=5000×(1−0.64)=5000×0.36=1800≥5 . The conditions are met.
-
Calculate the estimated standard error: Estimated SE(P^)=50000.64(1−0.64)=50000.64×0.36≈0.007 .
-
Determine the critical value: For a 95% confidence interval, zα/2=1.96 .
-
Calculate the margin of error: Margin of error (e) = 1.96×0.007=0.0133 .
-
Construct the confidence interval: p^±e=0.64±0.0133 . The approximate 95% confidence interval is [0.627,0.653] .
Example: For the sexual violence study, we are 95% confident that the true proportion of Belgian residents who have experienced sexual violence in their lifetime lies between 0.627 and 0.653, or between 62.7% and 65.3% .
12.5 Interpretation of a confidence interval
A 100(1−α)%-confidence interval for a population proportion (p) is an interval generated by a method that, over many repetitions, would produce intervals containing the true unknown population proportion p approximately 100(1−α)% of the time .
Exam Question Tip: When interpreting a confidence interval, focus on the process and the likelihood of capturing the true parameter. Avoid stating that there is a 100(1−α)% probability that the specific calculated interval contains the true proportion, as the true proportion is fixed, and the interval is what varies across samples .
Testing the mean of a normal variable using hypothesis testing
This topic explores how to test hypotheses about the population mean (μ) of a normally distributed variable using sample data.
13.1 Introduction to hypothesis testing for the mean
Hypothesis testing provides a formal framework to determine if sample data provides sufficient evidence to reject a claim about a population parameter, specifically the population mean (μ). It addresses the question of whether observed differences between a sample statistic and a hypothesized population value are likely due to random chance or a genuine effect 74.
13.2 Motivating example
Consider the example of assessing the average well-being score of self-employed individuals in Belgium. Let X represent the well-being score of a self-employed individual. The population mean is denoted by μ=E(X). We want to investigate if μ is equal to 6.5 or not. If the sample mean (xˉn) is 6.634, a difference from the hypothesized value of 6.5, a hypothesis test is used to ascertain if the population mean μ is indeed different from 6.5 74.
13.3 Method 1: Using confidence intervals
One approach to hypothesis testing involves constructing a confidence interval (CI) for the population mean 75.
13.3.1 Procedure
- Calculate a confidence interval: A confidence interval, typically at a 95% level, is calculated for μ. This interval is generated using a method that, in the long run, captures the true population mean in 95% of samples. Any value falling within this interval is considered a plausible value for μ. Values outside the interval are deemed unlikely for μ 75.
- Check for the hypothesized value: Examine whether the hypothesized population mean (e.g., 6.5 in the example) falls within the calculated confidence interval 75.
13.3.2 Decision rules
- If the hypothesized value (e.g., 6.5) lies within the 95% CI, we do not reject the null hypothesis (H0). This implies that 6.5 is a plausible value for μ, and we cannot conclude that μ=6.5 76.
- If the hypothesized value (e.g., 6.5) does not lie within the 95% CI, we reject the null hypothesis (H0) and conclude that the alternative hypothesis (H1) is true, meaning μ=6.5. This suggests that 6.5 is an unlikely value for μ 76.
13.3.3 Formalizing the hypotheses
For a two-sided test, the hypotheses are: H0:μ=hypothesized value H1:μ=hypothesized value 76.
13.3.4 Significance level (α)
There is a probability of 5% that a 95% confidence interval will not contain the true population mean (μ) even if μ is equal to the hypothesized value. This means there's a 5% chance of incorrectly concluding that μ=6.5 when it is actually 6.5. This probability is known as the significance level (α). Generally, the significance level α corresponds to a 100(1−α)% confidence interval, meaning α=1−confidence level 77.
13.3.5 Limitations of the confidence interval method
- This method is primarily suited for two-sided tests, where the alternative hypothesis is that the mean is simply different from the hypothesized value 78.
- It cannot be directly used for one-sided tests (e.g., testing if μ>hypothesized value or μ<hypothesized value) 78.
- To perform tests at different significance levels (α), a corresponding confidence interval (e.g., a 100(1−α)% CI) must be calculated 78.
13.4 Method 2: Using the P-value
Due to the limitations of the confidence interval method for hypothesis testing, the P-value approach is often preferred 78.
13.4.1 Relationship between confidence intervals and test statistics
For a two-sided test with σ unknown, a 95% confidence interval for μ is given by: \left[ \bar{x}_n - t_{n-1, 0.025} \frac{s}{\sqrt{n}}, \bar{x}_n + t_{n-1, 0.025} \frac{s}{\sqrt{n}} \right 79.
The hypothesized value (e.g., 6.5) lies within this interval if and only if: xˉn−tn−1,0.025ns≤6.5≤xˉn+tn−1,0.025ns 79.
This inequality can be rearranged to: −tn−1,0.025≤s/nxˉn−6.5≤tn−1,0.025 79 80.
This shows that 6.5 is within the 95% CI if the standardized test statistic s/nxˉn−6.5 falls between −tn−1,0.025 and tn−1,0.025. Conversely, if 6.5 is not in the 95% CI, the test statistic will lie outside this range 80 81.
13.4.2 The test statistic for a normal variable
When testing the mean of a normal variable with an unknown population standard deviation (σ), the test statistic T follows a t-distribution with n−1 degrees of freedom under the null hypothesis (H0:μ=μ0): T=S/nXˉn−μ0≈tn−1 82.
Where:
- Xˉn is the sample mean.
- μ0 is the hypothesized population mean.
- S is the sample standard deviation.
- n is the sample size.
Assuming H0 is true (i.e., μ=6.5), the test statistic becomes: T=S/nXˉn−6.5≈tn−1 82.
The P-value approach then evaluates the probability of observing a test statistic as extreme as, or more extreme than, the one calculated from the sample, assuming the null hypothesis is true 79-82.
Hypothesis testing with p-value
Hypothesis testing using the p-value provides a quantitative measure of the evidence against the null hypothesis .
14.1 The five steps of hypothesis testing
Performing a hypothesis test involves a structured, five-step process 100:
- Check conditions: Verify if the necessary assumptions for the test are met 100 .
- Formulate hypotheses: State the null hypothesis (H0) and the alternative hypothesis (H1) 100 .
- Determine the test statistic: Identify the appropriate test statistic, its distribution under H0, and calculate its observed value 100 .
- Calculate the p-value: Determine the p-value and compare it to a predetermined significance level (α) 100 .
- Formulate a nuanced conclusion: State the decision regarding the null hypothesis based on the p-value and significance level 100 .
14.2 Checking conditions
Before conducting a hypothesis test for a mean (μ) with an unknown population standard deviation (σ), several conditions should ideally be met :
- The sample must be random .
- The variable of interest should be quantitative (or pseudo-metric) .
- The variable should come from a normal distribution, or the sample size should be sufficiently large (n⩾30) .
- The sample should not contain any outliers .
14.2.1 Example of checking conditions
In Example 6.3, the conditions were assessed as follows :
- Random sample: ✔ (given)
- Pseudo-metric variable: ✔ (scores on a scale of 1 to 10)
- Sufficiently large sample: ✔ (n=500⩾30)
- No outliers: Cannot be definitively checked, but assumed to be met.
14.3 Formulating hypotheses
Hypothesis testing involves setting up two competing statements about a population parameter :
- Null Hypothesis (H0): This hypothesis proposes that a population parameter takes a specific value or falls within a certain range. It typically represents a scenario of no effect, no influence, or no change .
- Alternative Hypothesis (H1 or Ha): This hypothesis, also known as the research hypothesis, suggests that the population parameter's value lies in a different range, complementary to H0. It usually represents an effect, influence, or change .
It is crucial that hypotheses are formulated before data is analyzed or even collected .
14.3.1 Hypotheses for a two-sided test for μ
For a two-sided test concerning a mean (μ), the hypotheses are structured as follows : H0:μ=μ0 versus H1:μ=μ0
14.3.2 Example of formulating hypotheses
For Example 6.3, the hypotheses were : H0:μ=6.5 versus H1:μ=6.5
14.4 Determining the test statistic and its distribution
The test statistic quantifies how far the point estimate of a parameter is from its hypothesized value, often expressed in units of standard errors .
14.4.1 Test statistic for μ with σ unknown
When testing a mean (μ) with an unknown population standard deviation (σ), the test statistic is calculated as : T=S/nXˉn−μ0 Under the null hypothesis (H0), this statistic follows a t-distribution with n−1 degrees of freedom (tn−1), provided the variable is normally distributed or the sample size is sufficiently large (n⩾30) .
14.4.2 Calculating the test value
The test value is the specific numerical outcome of the test statistic for the observed sample . t=s/nxˉn−μ0
14.4.3 Example of calculating the test value
For Example 6.3, the calculated test value was : t=1.479/5006.634−6.5=2.026
Tip: Because the test statistic under H0 approximately follows a t-distribution, this type of hypothesis test is often referred to as a t-test .
14.5 Calculating the p-value
The p-value represents the probability of observing a test statistic as extreme as, or more extreme than, the one calculated from the sample, assuming the null hypothesis is true .
14.5.1 P-value for a two-sided test
For a two-sided test, the p-value is calculated as twice the probability of the test statistic being in the tail beyond the absolute value of the observed test statistic : P-value=P(T>∣t∣)+P(T<−∣t∣)=2P(T>∣t∣) where T∼(≈)H0tn−1 .
Tip: A small p-value indicates that the observed sample data strongly contradicts the null hypothesis and provides support for the alternative hypothesis. Conversely, a large p-value suggests that the sample data does not provide sufficient evidence to reject the null hypothesis in favor of the alternative .
14.5.2 Example illustrating p-value calculation
In Example 6.3, with a test value of t=2.026 and n=500, the p-value is calculated based on the t-distribution with 499 degrees of freedom 98 99: P-value = P(T>2.026)+P(T<−2.026) 99. From t-tables or statistical software, it is found that P(T>2.026) is between 0.010 and 0.025 for n=100 (or n=499). Therefore, the p-value lies between 2×0.01=0.02 and 2×0.025=0.05 97 98.
14.6 Formulating a conclusion
The final step involves making a decision about the null hypothesis based on the comparison between the p-value and the chosen significance level (α) .
14.6.1 Decision rule
A significance level (α) is set in advance. This α represents the maximum acceptable probability of committing a Type I error (rejecting a true null hypothesis) .
- If the p-value is less than α (P-value < α), the null hypothesis (H0) is rejected in favor of the alternative hypothesis (H1) .
- If the p-value is greater than or equal to α (P-value ⩾α), the null hypothesis (H0) is not rejected .
Tip: "Not rejecting H0" does not mean H0 is true; it simply means there is not enough statistical evidence in the sample to reject it at the chosen significance level .
14.6.2 Conclusion for a test for μ
- If P-value < α, we reject the null hypothesis (H0) at the α-significance level in favor of the alternative hypothesis (H1), concluding that μ=μ0 .
- If P-value ⩾α, we do not reject the null hypothesis (H0) at the α-significance level, meaning we cannot conclude that μ=μ0 .
14.6.3 Example of formulating a conclusion
Using Example 6.3, if α=0.05 and the calculated p-value is between 0.02 and 0.05, then P-value < α. Therefore, we would reject the null hypothesis (H0) at the 0.05 significance level and conclude that μ=6.5 98.
Univariate inference for the mean of a normal variable with unknown standard deviation
This section details the process of conducting hypothesis tests for the population mean (μ) of a normally distributed variable when the population standard deviation (σ) is unknown, focusing on one-sided tests .
15.1 Hypothesis formulation for one-sided tests
When investigating whether the population mean (μ) is greater than or less than a specified value (μ0), one-sided hypotheses are formulated .
15.1.1 Right-tailed test
A right-tailed test is used to determine if the population mean is greater than a hypothesized value. The hypotheses are structured as follows :
- Null hypothesis (H0): μ⩽μ0
- Alternative hypothesis (H1): μ>μ0
The goal is to gather evidence to support the claim that μ is indeed greater than μ0 .
15.1.2 Left-tailed test
A left-tailed test is employed to ascertain if the population mean is less than a hypothesized value. The hypotheses are set up as :
- Null hypothesis (H0): μ⩾μ0
- Alternative hypothesis (H1): μ<μ0
The objective here is to find evidence suggesting that μ is less than μ0 .
Tip: Some textbooks may use H0:μ=μ0 for both one-sided tests, with the direction of the inequality being exclusively defined by H1 .
15.2 The t-distribution and test statistic
When the population standard deviation (σ) is unknown, the t-distribution is used for inference about the population mean. The test statistic remains the same as in the case of known σ, but it follows a t-distribution with n−1 degrees of freedom under the null hypothesis .
15.2.1 Test statistic formula
The test statistic, denoted by T, is calculated as: T=S/nXˉn−μ0 where:
- Xˉn is the sample mean .
- μ0 is the hypothesized population mean under the null hypothesis .
- S is the sample standard deviation .
- n is the sample size .
Under the null hypothesis (H0), this test statistic follows a t-distribution with n−1 degrees of freedom, often denoted as T∼H0tn−1 or approximately so, especially when n is large (n≥30) due to the Central Limit Theorem (CLT) .
15.2.2 Interpretation of the test statistic
The value of the test statistic provides an indication of how far the sample mean deviates from the hypothesized mean, in units of standard errors .
- For a right-tailed test (μ>μ0), larger positive values of T suggest that the true mean might be greater than μ0 .
- For a left-tailed test (μ<μ0), smaller (more negative) values of T indicate that the true mean might be less than μ0 .
15.3 P-value approach for hypothesis testing
The P-value approach offers a standardized method for making decisions in hypothesis testing .
15.3.1 Definition of the P-value
The P-value is defined as the probability of observing a test statistic that is at least as extreme as the one obtained from the sample, assuming the null hypothesis is true. The interpretation of "at least as extreme" depends on the type of test :
- Two-sided test: The test value is at least as far from 0 as the observed value .
- Right-tailed test: The test value is at least as large as the observed value .
- Left-tailed test: The test value is at least as small as the observed value .
15.3.2 Calculating the P-value for one-sided tests
- Right-tailed test: The P-value is calculated as P(T>t), where T∼tn−1 and t is the observed test statistic value .
- Left-tailed test: The P-value is calculated as P(T<t), where T∼tn−1 and t is the observed test statistic value .
Visually, the P-value represents the area in the tail of the t-distribution that corresponds to the direction of the alternative hypothesis, beyond the calculated test statistic .
15.3.3 Decision rule
A decision is made by comparing the P-value to a pre-determined significance level (α):
- If P-value ⩽α: Reject the null hypothesis (H0).
- If P-value >α: Fail to reject the null hypothesis (H0).
Tip: A common significance level is α=0.05 (5%) .
15.4 Example: Left-tailed test for rental prices
Consider a scenario investigating the average rental price of student housing in Leuven .
Scenario: A sample of 38 rental prices was collected, showing a sample mean (xˉn) of 432 dollars and a sample standard deviation (s) of 138 dollars. We want to determine if the average rental price is less than 500 dollars .
Steps:
- Check conditions:
- The sample is random (given) .
- The variable 'rental price' (in dollars) is quantitative .
- Normality is not obviously violated based on sample data (e.g., boxplot, histogram), and with n=38≥30, the t-test is sufficiently accurate due to the CLT .
- No significant outliers are present in the data .
- Formulate hypotheses: Since we want to test if μ<500, we set up a left-tailed test:
- H0:μ⩾500 dollars
- H1:μ<500 dollars where μ is the average rental price of student housing in Leuven .
-
Calculate the test statistic: Using the formula for the t-test statistic with μ0=500: t=s/nxˉn−μ0=138/38432−500 t≈−3.04 The degrees of freedom are n−1=38−1=37 .
-
Calculate the (approximate) P-value: For a left-tailed test, the P-value is P(T<−3.04), where T∼t37. Looking at a t-table for 37 degrees of freedom, we find that values around t=2.750 correspond to a tail probability of 0.005. Since ∣−3.04∣>∣2.750∣, the probability P(T<−3.04) is smaller than 0.005 .
-
Make a decision: The P-value is less than 0.005, which is smaller than the significance level of α=0.05 (5%). Therefore, we reject H0 at the 5% significance level .
-
Conclusion: We can conclude at the 5% significance level that the average rental price of student housing in Leuven is less than 500 dollars. Alternatively, we can state that at the 5% significance level, we reject the hypothesis that the average rental price is 500 dollars or more .
15.5 Example: Right-tailed test for rental prices (continuation)
Using the same data, let's consider a right-tailed test .
Scenario: Average rental price of student housing in Leuven is 432 dollars with a standard deviation of 138 dollars, based on a sample of 38. We want to determine if the average rental price is more than 500 dollars .
Steps:
- Formulate hypotheses: For testing if μ>500:
- H0:μ⩽500 dollars
- H1:μ>500 dollars The statement you want to prove or conclude is placed in H1 .
-
Test statistic: The test value remains the same as calculated before: t=−3.04 .
-
P-value calculation: For a right-tailed test, the P-value would be P(T>−3.04) where T∼t37. Since the test statistic is negative, this probability will be very high (close to 1). This indicates that the observed sample mean is not in the direction of the alternative hypothesis (H1).
-
Decision and Conclusion: Since the P-value will be much larger than any reasonable α (e.g., 0.05), we would fail to reject H0. This means we do not have sufficient evidence to conclude that the average rental price is greater than 500 dollars .
Hypothesis testing for the mean of a variable with unknown standard deviation overview
This section provides a comprehensive overview of conducting hypothesis tests for a population mean (μ) when the population standard deviation (σ) is unknown, focusing on the use of the t-distribution.
16.1 The t-distribution and its role
When the population standard deviation (σ) is unknown, and we are testing hypotheses about the population mean (μ), we use the t-distribution instead of the standard normal (Z) distribution. The t-distribution is used because the sample standard deviation (S) is used as an estimate for the unknown population standard deviation, introducing additional uncertainty. The shape of the t-distribution depends on the degrees of freedom, which are typically n−1, where n is the sample size .
16.2 Components of a t-test
The structure of a t-test for the mean with unknown standard deviation follows the general principles of hypothesis testing, adapted for the t-distribution.
16.2.1 Hypothesis formulation
Hypotheses are formulated based on the research question. For a test concerning the population mean μ, the null hypothesis (H0) typically states that the mean is equal to a specific value (μ0) or lies within a certain range, while the alternative hypothesis (H1) states the opposite, indicating a difference or a specific direction of difference .
- Two-sided test: H0:μ=μ0 versus H1:μ=μ0
- Right-sided test: H0:μ≤μ0 versus H1:μ>μ0 .
- Left-sided test: H0:μ≥μ0 versus H1:μ<μ0 .
Tip: Always place the claim you want to demonstrate or conclude into the alternative hypothesis (H1) .
16.2.2 Test statistic
The test statistic for a t-test about the mean with unknown standard deviation is calculated as follows:
T=S/nXˉ−μ0
where:
- Xˉ is the sample mean .
- μ0 is the hypothesized population mean under the null hypothesis .
- S is the sample standard deviation .
- n is the sample size .
This test statistic follows a t-distribution with n−1 degrees of freedom under the null hypothesis, denoted as T∼tn−1 .
16.2.3 P-value calculation
The P-value is the probability of observing a test statistic as extreme as, or more extreme than, the one calculated from the sample, assuming the null hypothesis is true. The calculation of the P-value depends on the type of alternative hypothesis:
- For H1:μ=μ0 (two-sided test): The P-value is 2×P(T>∣t∣), where t is the calculated test statistic and T∼tn−1. This accounts for extreme values in both tails of the distribution .
- For H1:μ>μ0 (right-sided test): The P-value is P(T>t), where t is the calculated test statistic and T∼tn−1. This measures the probability of observing a value greater than t .
- For H1:μ<μ0 (left-sided test): The P-value is P(T<t), where t is the calculated test statistic and T∼tn−1. This measures the probability of observing a value less than t .
Example: If the calculated test statistic is t=−3.04 with 37 degrees of freedom, for a left-sided test (H1:μ<500), the P-value is P(T<−3.04). For a right-sided test (H1:μ>500) with the same test statistic and degrees of freedom, the P-value is P(T>−3.04)=1−P(T<−3.04) .
16.2.4 Decision rule
The decision to reject or fail to reject the null hypothesis is based on comparing the P-value to a pre-determined significance level (α).
- If P-value ≤α, reject H0.
- If P-value >α, fail to reject H0.
Tip: When interpreting results, state clearly that you "reject H0" or "fail to reject H0" at a specific significance level. Avoid stating that you "accept H0".
16.3 Illustrative examples
16.3.1 Example: Rent prices in Leuven
Consider a scenario where the average rent price for a student room in Leuven is being investigated.
- Left-sided test: To test if the average rent is less than 500 dollars, H0:μ≥500 versus H1:μ<500. If the P-value is less than 0.005 and the significance level is 0.05, H0 is rejected, concluding that the average rent is less than 500 dollars at the 5% significance level .
- Right-sided test: To test if the average rent is more than 500 dollars, H0:μ≤500 versus H1:μ>500. If the calculated test statistic is t=−3.04 with 37 degrees of freedom, the P-value is P(T>−3.04), which is greater than 0.995. Since this P-value is much larger than typical significance levels (e.g., 0.05), H0 is not rejected. We cannot conclude that the average rent is more than 500 dollars at the 5% significance level .
16.3.2 Example: Student self-assessment of passing chances
A study surveyed 69 criminology students about their chances of passing a statistics course, on a scale of 1 to 5. The average score was 3.88. A hypothesis test was conducted to see if the average estimate deviates from 3, yielding a test statistic of t=2.27 .
- Right-sided test: For H1:μ>3, the P-value is P(T>2.27) with T∼t68. Using a t-table with degrees of freedom close to 68 (e.g., 60), the P-value is between 0.01 and 0.025, as 2.27 falls between the critical values 2.000 and 2.390 for those probabilities .
- Left-sided test: For H1:μ<3, the P-value is P(T<2.27). This is calculated as 1−P(T>2.27). Since P(T>2.27) is between 0.01 and 0.025, P(T<2.27) is between 1−0.025 and 1−0.01, meaning it falls between 0.975 and 0.99 .
- Two-sided test: For H1:μ=3, the P-value is 2×P(T>∣2.27∣)=2×P(T>2.27). Since P(T>2.27) is between 0.01 and 0.025, the P-value for the two-sided test is between 2×0.01 and 2×0.025, thus falling between 0.02 and 0.05 .
Hypothesis testing for a proportion with a large sample size
This section details the process of conducting hypothesis tests for a population proportion when the sample size is sufficiently large, enabling the use of the normal approximation .
17.1 Core principles of hypothesis testing for a proportion
Hypothesis testing for a proportion with a large sample size follows a standard five-step procedure :
- Check conditions: Ensure the assumptions required for the test are met .
- Formulate hypotheses: State the null hypothesis (H0) and the alternative hypothesis (H1) .
- Determine the test statistic and its distribution under H0: Calculate the value of the test statistic using sample data and understand its behavior assuming the null hypothesis is true .
- Calculate the p-value and compare it to the significance level (α): Determine the probability of observing test results as extreme as, or more extreme than, the sample results if H0 were true, and compare this to the pre-determined significance level .
- Formulate a nuanced conclusion: Based on the comparison in step 4, decide whether to reject or fail to reject H0 and interpret the findings in the context of the problem .
17.2 Conditions for testing a proportion with a large sample size
For a hypothesis test regarding a proportion with a large sample size, the following conditions must be met :
- The sample must be random .
- The variable of interest must be discrete with exactly two possible outcomes (e.g., success or failure) .
- The sample size must be sufficiently large so that the sampling distribution of the sample proportion (P^) can be approximated by a normal distribution. This is typically checked by ensuring that np0≥5 and n(1−p0)≥5, where n is the sample size and p0 is the proportion specified in the null hypothesis .
17.3 Formulating hypotheses
The hypotheses for a proportion test are formulated as follows :
- Right-tailed test:
- H0:p≤p0
- H1:p>p0
- Left-tailed test:
- H0:p≥p0
- H1:p<p0
- Two-tailed test:
- H0:p=p0
- H1:p=p0
Here, p represents the true population proportion, and p0 is the hypothesized population proportion under the null hypothesis.
17.4 Determining the test statistic
When the sample size is large and the conditions are met, the test statistic for a proportion is a Z-score .
-
Test statistic: Z=np0(1−p0)P^−p0 where:
-
P^ is the sample proportion.
-
p0 is the hypothesized population proportion under H0.
-
n is the sample size.
-
Distribution under H0: If H0 is true, the test statistic Z is approximately standard normally distributed (Z∼N(0,1)), provided that np0≥5 and n(1−p0)≥5 .
-
Test value calculation: The observed test value, denoted by z, is calculated using the sample proportion (p^) : z=np0(1−p0)p^−p0
17.5 Calculating the p-value
The p-value is the probability of observing a test statistic as extreme as, or more extreme than, the calculated test value (z) if the null hypothesis were true. The calculation depends on the type of test :
- Right-tailed test: P-value=P(Z>z) .
- Left-tailed test: P-value=P(Z<z) .
- Two-tailed test: P-value=2P(Z>∣z∣) .
where Z∼N(0,1) .
A table of common p-values for the standard normal distribution can be used for these calculations .
17.6 Making a decision and formulating a conclusion
The decision in hypothesis testing is based on comparing the p-value to the chosen significance level (α) .
- If the p-value is less than α ( P-value<α ), then H0 is rejected at the α significance level, and the alternative hypothesis (H1) is accepted .
- If the p-value is greater than or equal to α ( P-value≥α ), then H0 is not rejected at the α significance level .
It is crucial to remember that failing to reject H0 does not prove H0 is true; it simply means there is insufficient evidence to reject it at the given significance level .
17.7 Summary of test statistic and p-value calculations
The following table summarizes the test statistic and p-value calculation for different alternative hypotheses, assuming H0:p=p0 .
| Alternative Hypothesis (H1) | Test Statistic (Z) | P-value Calculation |
|---|---|---|
| p=p0 (Two-tailed) | Z=np0(1−p0)P^−p0 | $2P(Z > |
| p>p0 (Right-tailed) | Z=np0(1−p0)P^−p0 | P(Z>z) |
| p<p0 (Left-tailed) | Z=np0(1−p0)P^−p0 | P(Z<z) |
These calculations are valid if np0≥5 and n(1−p0)≥5, and Z∼N(0,1) under H0 .
17.8 Motivating example: Victimization of refugees
Consider a study where a sample of n=50 refugees were interviewed, and 84% reported having been victims of sexual violence. The question is whether this sample provides evidence that more than 80% of all refugees have been victims of sexual violence .
- Hypotheses:
- H0:p≤0.80
- H1:p>0.80 where p is the proportion of all refugees who have been victims of sexual violence .
- Conditions:
- Random sample: Given .
- Binary outcome: "Victim of sexual violence" (yes/no) .
- Large sample: np0=50×0.80=40≥5 and n(1−p0)=50×0.20=10≥5 .
- Test statistic and value:
- Test statistic: Z=np0(1−p0)P^−p0
- Test value: z=500.80(1−0.80)0.84−0.80=500.160.04=0.00320.04=0.05660.04≈0.71 .
- P-value: This is a right-tailed test.
- P-value=P(Z>0.71)=1−P(Z<0.71)
- Using a standard normal table, P(Z<0.71)≈0.761.
- P-value=1−0.761=0.239 .
- Conclusion:
- Let α=0.05.
- Since P-value=0.239≥α=0.05, we fail to reject H0 at the 5% significance level .
- Conclusion: We do not have sufficient evidence to conclude that more than 80% of all refugees have ever been victims of sexual violence .
Tip: This result does not mean we have proven that less than 80% are victims. It only means the current data does not strongly support the claim that more than 80% are victims .
17.9 Example: Lottery number frequency
A lottery organization observes that the number 39 appeared 17 times among winning numbers in 100 draws in 2022. The expected probability for any given number to appear in a draw, based on previous analysis (from other sections not detailed here), is approximately 0.102. The question is whether this observed frequency is abnormal .
- Hypotheses:
- H0:p=0.102
- H1:p=0.102 where p is the true probability that the number 39 appears in a British lottery draw .
- Conditions:
- Random sample: Given .
- Binary outcome: "Number 39 appears in a draw" (yes/no) .
- Large sample: np0=100×0.102=10.2≥5 and n(1−p0)=100×0.898=89.8≥5 .
- Test statistic and value:
- Test statistic: Z=np0(1−p0)P^−p0
- Test value: z=1000.102(1−0.102)0.17−0.102=1000.102(0.898)0.068=1000.0915960.068=0.000915960.068=0.030260.068≈2.24 .
- P-value: This is a two-tailed test.
- P-value=2P(Z>∣2.24∣)=2P(Z>2.24)
- P(Z>2.24)=1−P(Z<2.24)
- Using a standard normal table, P(Z<2.24)≈0.987.
- P(Z>2.24)=1−0.987=0.013.
- P-value=2×0.013=0.026 .
- Conclusion:
- Let α=0.05.
- Since P-value=0.026<α=0.05, we reject H0 at the 5% significance level .
- Conclusion: It is abnormal for a number to appear 17 times in a winning sequence out of 100 draws, as the observed frequency is statistically significantly different from the expected probability of 0.102 .
Understanding type I and type II errors in hypothesis testing
When conducting a hypothesis test, two types of errors can occur: a Type I error and a Type II error. These errors are inherent to the process of drawing conclusions from a random sample and are not due to researcher mistakes .
18.1 Definitions and Overview
18.1.1 Type I error
A Type I error, also known as an error of the first kind, occurs when the null hypothesis (H0) is rejected, but in reality, H0 is true. This happens when sample data yields an extreme result that is attributable to chance, leading to the rejection of a true null hypothesis .
The probability of committing a Type I error is denoted by α, which is the significance level of the test. This probability is expressed as : α=P(reject H0∣H0 is true)
Researchers cannot know if H0 is true or false, as that would render the hypothesis test unnecessary. However, the probability of a Type I error can be controlled by setting the significance level α in advance. If the consequences of wrongly rejecting the null hypothesis are severe, a smaller α should be chosen .
18.1.2 Type II error
A Type II error, also known as an error of the second kind, occurs when the null hypothesis (H0) is not rejected, but in reality, H0 is false. The probability of this error is denoted by β. This probability is expressed as : β=P(do not reject H0∣H0 is false)
The likelihood of a Type II error depends on the extent to which H0 is false. A small relative deviation from H0 will result in a higher probability of a Type II error compared to a large relative deviation. Specifically, if H0:μ=μ0 is not rejected while in reality μ=μ1 is true, the chance of a Type II error increases as μ1 gets closer to μ0 .
Furthermore, the probability of a Type II error decreases as the spread of the sampling distribution becomes smaller, meaning a smaller standard error of the sample mean (Xˉn) leads to a smaller β. The calculation of the probability of a Type II error is not typically required .
18.1.3 Overview of errors
The possible outcomes of a hypothesis test can be summarized in a table:
| Reject H0 | Do not reject H0 | |
|---|---|---|
| H0 is true | Type I error (α) | No error |
| H0 is false | No error | Type II error (β) |
This table also highlights the relationship between the significance level (α), the confidence level (1−α), the probability of a Type II error (β), and the power of the test (1−β) .
Tip: The relationship between Type I and Type II errors is inverse; reducing the chance of one often increases the chance of the other.
18.2 Choice of α
Setting the significance level α before conducting the hypothesis test predetermines the maximum probability of a Type I error. Common values for α are 0.1, 0.05, or 0.01 .
Choosing α involves a trade-off:
- A very small α minimizes the risk of a Type I error but increases the likelihood of a Type II error, meaning the null hypothesis might not be rejected even when it is false .
- Conversely, a larger α reduces the chance of a Type II error but increases the risk of a Type I error .
The probabilities of these two types of errors are not independent .
Analogy: Consider a sports referee. A referee who is quick to blow the whistle (low α) might catch most infractions but also call fouls incorrectly (high β). A referee who is hesitant to blow the whistle (high α) will rarely make incorrect calls but might miss some actual infractions (low β).
18.3 Relationship to Confidence Intervals
There is a direct link between confidence intervals (CIs) and hypothesis testing for a two-sided test. The randomness inherent in sampling means that a 95% confidence interval will, in 5% of cases, fail to contain the true population mean (μ). This 5% mirrors the α level for a Type I error. If the null hypothesis value falls outside a calculated confidence interval, it suggests that the null hypothesis would likely be rejected at the corresponding significance level .
Understanding the p-value in two-sided hypothesis testing
The p-value provides a measure of the evidence against the null hypothesis in a two-sided hypothesis test by quantifying the probability of observing a test statistic at least as extreme as the one obtained from the sample, assuming the null hypothesis is true 93.
19.1 The foundation of the p-value in hypothesis testing
In two-sided hypothesis testing, we aim to determine if a population parameter, such as the mean (μ), is significantly different from a hypothesized value. The null hypothesis (\(H_0\)) states that the parameter is equal to a specific value, while the alternative hypothesis (\(H_1\)) states that it is not equal to that value 91.
19.1.1 Relationship between confidence intervals and hypothesis testing
There's an equivalence between using confidence intervals and hypothesis testing for making decisions about the null hypothesis. Specifically, a hypothesized value (μ0) is considered statistically plausible (i.e., we do not reject (H_0)) if it falls within the calculated confidence interval for the population parameter. Conversely, if the hypothesized value falls outside the confidence interval, we reject (H_0). This translates to whether the calculated test statistic falls within the critical values defined by the confidence interval's bounds 81 82.
19.1.2 The test statistic and its distribution
When testing hypotheses about a population mean (μ) using a sample mean (Xˉn) and sample standard deviation (S), and assuming the sample size is sufficiently large or the population is normally distributed, the test statistic T follows a t-distribution with n−1 degrees of freedom under the null hypothesis 82:
T=S/nXˉn−μ0≈tn−1
Here, μ0 is the value specified in the null hypothesis Xˉn is the sample mean, S is the sample standard deviation, and n is the sample size. The calculated value of this test statistic from a given sample is called the test value (t) 91.
19.1.3 Understanding extreme values in a t-distribution
For a t-distribution with n−1 degrees of freedom, the probabilities associated with its tails are crucial for determining the p-value 83.
- For a positive critical value tα/2,n−1, the probability of observing a value greater than it is P(T>tα/2,n−1)=α/2 83.
- For a negative critical value −tα/2,n−1, the probability of observing a value less than it is P(T<−tα/2,n−1)=α/2 83.
In a two-sided test with a significance level of α=0.05, this means that P(T>t0.025,n−1)=0.025 and P(T<−t0.025,n−1)=0.025 83.
19.2 Defining and calculating the p-value
The p-value is a direct consequence of how extreme the observed test value (t) is in relation to the null distribution of the test statistic (T) 92.
19.2.1 P-value for positive test values
If the calculated test value (t) is positive, it is considered "extreme" if it is greater than the critical value tn−1,0.025. The probability of observing a value of T greater than this positive t is P(T>t). For a two-sided test, the p-value is twice this probability: 2P(T>t). This accounts for the possibility of an equally extreme result in the opposite direction (i.e., a value less than −t). (#page=84, 85) If 2P(T>t) is less than the significance level (α=0.05), it suggests that the observed result is unlikely under the null hypothesis. (#page=84, 85) 84 85.
19.2.2 P-value for negative test values
If the calculated test value (t) is negative, it is considered "extreme" if it is less than the critical value −tn−1,0.025. The probability of observing a value of T less than this negative t is P(T<t). For a two-sided test, the p-value is 2P(T<t). Due to the symmetry of the t-distribution, this is equivalent to 2P(T>−t), where −t is the positive absolute value of the test statistic. (#page=86, 87) If 2P(T<t) is less than the significance level (α=0.05), it suggests the observed result is unlikely under the null hypothesis. (#page=86, 87) 86 87.
19.2.3 General calculation using absolute value
To unify the calculation for both positive and negative test values, the p-value for a two-sided test is generally expressed using the absolute value of the test value (∣t∣) 88:
P-value=2P(T>∣t∣)
This formula represents the probability of observing a test statistic that is at least as far from zero as the observed test value (t), assuming the null hypothesis is true. (#page=88, 89, 92) 88 89 92.
19.2.4 Formal definition of the p-value
The p-value is formally defined as:
Definition: The p-value is the probability, under the null hypothesis, of obtaining a test value that is at least as extreme in the direction of the alternative hypothesis as the value observed for the sample 93.
- "Probability under the null hypothesis": This means the probability is calculated assuming that the null hypothesis is true 93.
- "At least as extreme in the direction of the alternative hypothesis": For a two-sided test (\(H_1: \mu \neq \mu_0\)), this means the observed test value is at least as far from zero as the calculated test value 93.
19.3 Decision making using the p-value
The p-value serves as a critical tool for making decisions in hypothesis testing 90.
19.3.1 Interpreting the p-value in relation to the significance level
The decision rule is based on comparing the calculated p-value to the pre-determined significance level (α), which is the probability of incorrectly rejecting the null hypothesis 91.
- If the p-value ≥α: We do not reject the null hypothesis at the α significance level. This suggests that the observed data are not sufficiently unusual to conclude that the null hypothesis is false. The hypothesized value (μ0) is considered a plausible value for the population parameter 90.
- If the p-value <α: We reject the null hypothesis at the α significance level. This indicates that the observed data are unlikely to have occurred if the null hypothesis were true, providing evidence in favor of the alternative hypothesis. The hypothesized value (μ0) is considered an unlikely value for the population parameter 90.
19.3.2 Strength of evidence
A smaller p-value indicates stronger evidence against the null hypothesis and, consequently, stronger evidence in favor of the alternative hypothesis 93.
19.4 Example of p-value calculation
Example 6.3 (continued): Consider testing the hypotheses H0:μ=6.5 versus H1:μ=6.5 for the average well-being score of self-employed individuals in Belgium 94. The test statistic is T=S/nXˉn−μ0, which follows approximately a t499 distribution under H0 94. The calculated test value from a sample is t=2.026 94.
To find the p-value, we need to calculate 2P(T>∣2.026∣) where T≈t499 95. Since n−1=499 is not directly in the t-table, we look at nearby degrees of freedom, such as 100 95.
From the t-table for df=100:
- t0.025,100≈1.984
- t0.010,100≈2.364
Since 1.984<2.026<2.364, we know that: P(T>1.984)>P(T>2.026)>P(T>2.364). (#page=96, 97) 96 97.
From the table, P(T>1.984)=0.025 and P(T>2.364)=0.010. (#page=96, 97) 96 97. Therefore, P(T>2.026) lies between 0.010 and 0.025 98.
The p-value is 2P(T>2.026), which lies between 2×0.010=0.02 and 2×0.025=0.05 98.
Tip: When the exact degrees of freedom are not in the t-table, it's generally conservative to use the closest lower degrees of freedom to get a more conservative (larger) p-value or to estimate the range as done in this example 95.
Tip: The p-value is often interpreted as the probability of observing data as extreme or more extreme than the current sample, assuming the null hypothesis is true. A low p-value suggests the observed data are unlikely under the null hypothesis 93.
Confidence interval for the mean of a normal variable with unknown sigma
This section details how to construct and interpret confidence intervals for the mean of a normally distributed variable when the population standard deviation is unknown.
20.1 General principles for constructing confidence intervals
A confidence interval (CI) provides a range of plausible values for an unknown population parameter. For a 100(1 - α)% CI, we determine a critical value from a probability distribution that leaves α/2 area in each tail 45.
20.1.1 The z-distribution for known sigma
When the population standard deviation (σ) is known, and the variable is normally distributed or the sample size is large (n ≥ 30) due to the Central Limit Theorem, the confidence interval for the population mean (μ) is constructed using the standard normal (z) distribution 46.
The formula for a 100(1 - α)% CI is: [xˉn−zα/2nσ,xˉn+zα/2nσ] where:
- xˉn is the sample mean 46.
- σ is the population standard deviation 46.
- n is the sample size 46.
- zα/2 is the critical z-value such that the area to its right is α/2. This value is found such that P(−zα/2≤Z≤zα/2)=1−α 45 46.
This interval can be expressed as: [point estimate ± z critical value × standard error 46.
Example: For a 99% CI with a sample mean (xˉn) of 6.634, a population standard deviation (σ) of 1.4, and a sample size (n) of 500:
- α=1−0.99=0.01 47.
- zα/2=z0.005=2.58 47 49.
- The standard error is nσ=5001.4≈0.063 47.
- The margin of error (e) is zα/2×nσ=2.58×0.063≈0.162 50.
- The 99% CI is [xˉn−e,xˉn+e=[6.634−0.162,6.634+0.162=[6.472,6.800] 50.
Tip: The 99% CI is wider than a 95% CI, reflecting increased confidence with a larger interval 50.
20.1.2 Properties of confidence intervals
- Symmetry: The confidence interval is always symmetrical around the sample mean (xˉn). This is why the sample mean is always within its own confidence interval 51 52.
- Width: The width of the CI is twice the margin of error 51 52.
- Upper bound = xˉn + margin of error
- Lower bound = xˉn - margin of error
- Width = (Upper bound) - (Lower bound) = 2× margin of error 51.
- Dependence on factors: The margin of error, and thus the width of the CI, depends on:
- The desired confidence level (1 - α) 52.
- The population standard deviation (σ) 52.
- The sample size (n) 52.
20.2 When the population variance is unknown (σ unknown)
In most practical scenarios, the population standard deviation (σ) is unknown. In such cases, it is estimated using the sample standard deviation (s). This leads to an estimated standard error (sf=ns) 54.
20.2.1 The Student t-distribution
When σ is unknown, the distribution of the statistic S/nXˉn−μ is no longer a standard normal distribution. Instead, it follows a Student t-distribution with n−1 degrees of freedom, denoted as tn−1. This holds true if the population is normally distributed 54 55.
If the population is not normally distributed but the sample size is sufficiently large (n≥30), the t-distribution can still be used as an approximation due to the Central Limit Theorem 55.
Characteristics of the Student t-distribution:
- It is bell-shaped and symmetrical around 0, similar to the standard normal distribution 56.
- Its shape depends on the degrees of freedom (r) 56.
- It has heavier tails than the normal distribution, especially for small degrees of freedom 56.
- As the degrees of freedom increase, the t-distribution approaches the standard normal distribution. The normal distribution is sometimes considered a t-distribution with infinite degrees of freedom 56.
57.
20.2.2 Critical t-values
To construct a 100(1 - α)% CI using the t-distribution, we need critical t-values (tn−1,α/2) such that the area in the tail to the right of tn−1,α/2 is α/2 (and similarly for the left tail). These values can be found in t-tables 58 59.
P(T>tn−1,α/2)=2α P(T<−tn−1,α/2)=2α where T∼tn−1 58.
Example of a t-table excerpt:
| r | 0.500 | 0.250 | 0.100 | 0.050 | 0.025 | 0.010 | 0.005 |
|---|---|---|---|---|---|---|---|
| 1 | 0.000 | 1.000 | 3.078 | 6.314 | 12.706 | 31.821 | 63.656 |
| 2 | 0.000 | 0.816 | 1.886 | 2.920 | 4.303 | 6.965 | 9.925 |
| 3 | 0.000 | 0.765 | 1.638 | 2.353 | 3.182 | 4.541 | 5.841 |
| ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ |
| 37 | 0.000 | 0.683 | 1.313 | 1.701 | 2.048 | 2.467 | 2.763 |
| ∞ | 0.000 | 0.674 | 1.282 | 1.645 | 1.960 | 2.326 | 2.576 |
20.2.3 Constructing the confidence interval
When the population standard deviation (σ) is unknown, the (approximate) 100(1 - α)% CI for the population mean (μ) is: [xˉn−tn−1,α/2ns,xˉn+tn−1,α/2ns] where:
- xˉn is the sample mean 61.
- s is the sample standard deviation 61.
- n is the sample size 61.
- tn−1,α/2 is the critical t-value from the t-distribution with n−1 degrees of freedom 61.
This formula is always valid if the population follows a normal distribution. For large samples (n≥30), it provides a sufficiently accurate result due to the Central Limit Theorem 62.
Caution: The Student t-distribution should not be used if there are very strong outliers in the sample. Outliers can be identified using histograms and boxplots 62.
This interval is generally wider than the one constructed with a known σ, as estimating the standard deviation introduces additional uncertainty 61.
Example: For a 99% CI for the average rent price of a student room in Leuven in 2022, based on n=38 observations, a sample mean (xˉn) of 432 euros, and a sample standard deviation (s) of 138 euros:
- n−1=38−1=37 64.
- α=1−0.99=0.01, so α/2=0.005 64.
- The estimated standard error is ns=38138≈22.39 64.
- From the t-table, t37,0.005 is approximately t30,0.005=2.750 65 66.
- The margin of error (e) is tn−1,α/2×ns=2.750×22.39≈61.56 66.
- The 99% CI is [xˉn−e,xˉn+e=[432−61.56,432+61.56=[370.44,493.56] euros 66.
Tip: When the exact degrees of freedom are not listed in the t-table, it's common practice to use the value for the closest lower number of degrees of freedom, which will result in a slightly wider and more conservative interval 66.
Betrouwbaarheidsinterval voor het gemiddelde van een normale variabele
This topic details the construction and interpretation of confidence intervals for the mean of a normal variable, considering both known and unknown population variances 19.
21.1 Definition and principles of confidence intervals
A confidence interval (CI) provides a range of the most plausible values for an unknown population parameter, typically of the form: point estimate ± margin of error. The confidence level is the probability that the method used generates an interval containing the population parameter. Commonly used confidence levels are 95% (0.95) and 99% (0.99) 17 18.
Tip: The point estimate is usually located at the center of the confidence interval 17.
21.2 Confidence interval for the mean of a normal variable when the population variance is known (σ known)
When sampling from a normal distribution with a known population standard deviation σ, the sampling distribution of the sample mean Xˉn is normal with mean μ and standard deviation σ/n. The Z-score is used to determine the margin of error. The relationship is given by Z=σ/nXˉn−μ, which follows a standard normal distribution N(0,1) 22 24.
To construct a 95% confidence interval, we find a z-value such that the area between −z and z is 0.95. This z-value is denoted as zα/2 and for α=0.05, z0.025=1.96 (#page=25,page=26). This means there's a 95% probability that the sample mean Xˉn deviates from the population mean μ by at most 1.96×(σ/n) 25 26 27.
The margin of error (e) is defined as: e=zα/2×nσ For a 95% confidence interval when σ is known, the interval is: [xˉn−1.96nσ,xˉn+1.96nσ] 29.
If the sample is not from a normal distribution but n is sufficiently large (n≥30), the Central Limit Theorem (CLT) allows us to use an approximate normal distribution for Xˉn, resulting in an approximate confidence interval 30.
21.2.1 Example: Known variance
Consider a sample of n=500 with a sample mean xˉn=6.634 and a known population standard deviation σ=1.4. The standard error is σ/n=1.4/500≈0.063. For a 95% confidence interval, z0.025=1.96. The margin of error is e=1.96×0.063≈0.123. The 95% confidence interval is [6.634−0.123,6.634+0.123=[6.511,6.757] 31.
21.3 Interpretation of confidence intervals
A confidence interval is interpreted as follows: a 95% confidence interval is generated by a method that, with 95% probability, produces an interval containing the true population mean μ (#page=32,page=33). It is crucial to understand that the population mean μ is not a random variable, and we cannot make probability statements about it belonging to a specific interval (#page=32,page=33). Visualizations show that approximately 95% of confidence intervals generated with a 95% confidence level contain the population parameter 32 33 34.
Tip: A common misconception is to state that "the true mean μ has a 95% probability of being in the calculated interval." The correct interpretation focuses on the method's long-run success rate (#page=32,page=33) 32 33.
21.4 Confidence interval for the mean of a normal variable with a general confidence level
For a general confidence level of 1−α (or 100(1−α)%), the z-value used is zα/2. This z-value is such that the area to its right is α/2, and the area between −zα/2 and zα/2 is 1−α (#page=38,page=39,page=40,page=41,page=45). The general formula for the confidence interval is 38 39 40 41 45: [xˉn−zα/2nσ,xˉn+zα/2nσ] 46.
21.4.1 Example: General confidence level
Continuing the example with xˉn=6.634, σ=1.4, and n=500. For a 99% confidence interval (1−α=0.99, so α=0.01), α/2=0.005. The z-value z0.005 is found to be approximately 2.58 (#page=47,page=48,page=49). The standard error remains 0.063. The margin of error is e=2.58×0.063≈0.162. The 99% confidence interval is [6.634−0.162,6.634+0.162=[6.472,6.800]. This 99% CI is wider than the 95% CI, reflecting the trade-off between confidence level and interval width 47 48 49 50.
21.5 Properties of confidence intervals for the mean
- Symmetry: The confidence interval is always symmetric around the sample mean xˉn 51.
- Width: The width of the confidence interval is twice the margin of error: 2×e (#page=51,page=52) 51 52.
- Factors affecting margin of error: The margin of error depends on the confidence level (1−α), the population standard deviation (σ), and the sample size (n): e=zα/2nσ 52.
21.6 Confidence interval for the mean of a normal variable when the population variance is unknown (σ unknown)
In most practical situations, σ is unknown and is estimated by the sample standard deviation s. The estimated standard error is s/n. When σ is unknown, the quantity s/nXˉn−μ does not follow a standard normal distribution but rather a Student's t-distribution with n−1 degrees of freedom (df=n−1), denoted as tn−1. This holds if the population is normally distributed, or for large sample sizes (n≥30) due to the CLT 54 55.
21.6.1 The Student t-distribution
The Student t-distribution is bell-shaped and symmetric around 0, similar to the standard normal distribution. Its exact shape depends on the degrees of freedom (r=n−1). The t-distribution has heavier tails than the normal distribution, especially for small degrees of freedom. As the degrees of freedom increase, the t-distribution approaches the standard normal distribution, with the standard normal distribution considered a t-distribution with infinite degrees of freedom 56.
21.6.2 Finding t-values
For a 100(1−α)%-CI, we need t-values denoted as tn−1,α/2, which satisfy P(T>tn−1,α/2)=α/2 where T follows a t-distribution with n−1 degrees of freedom (#page=58,page=59). These values can be found in t-tables 58 59 60.
21.6.3 Formula for the confidence interval
When the population standard deviation σ is unknown, the (1−α) or 100(1−α)%-confidence interval for μ is given by: [xˉn−tn−1,α/2ns,xˉn+tn−1,α/2ns] 61.
This interval is generally wider than the one calculated with a known σ because estimating the standard deviation introduces additional uncertainty. The t-distribution approach is valid if the population distribution is normal, or for large samples (n≥30). However, it's not recommended if there are strong outliers in the sample, which can be detected using histograms and boxplots 61 62.
21.6.4 Example: Unknown variance
Consider a student survey with n=38 giving a sample mean rental price xˉn=432 euros and a sample standard deviation s=138 euros. We want to calculate a 99% confidence interval 63. Here, n=38≥30, and the data appears to have no strong outliers 64. The estimated standard error is s/n=138/38≈22.39 64. For a 99% CI, α=0.01, so α/2=0.005. The degrees of freedom are n−1=37. Looking up t37,0.005 in a t-table, we find it's approximately 2.750 (often approximated by t30,0.005 or t60,0.005 if t37 is not directly available or for conservative estimation) (#page=65,page=66) 65 66. The margin of error is e=2.750×22.39≈61.56 euros. The 99% confidence interval is [432−61.56,432+61.56=[370.44,493.56] euros 66.
21.6.5 Example: Large sample size with unknown variance
For xˉn=6.634, s=1.479, and n=500. For a 95% confidence interval: n=500 is large enough for the CLT. Degrees of freedom n−1=499. α/2=0.025. The t-value t499,0.025 is very close to z0.025. Approximations like t100,0.025≈1.984 are used (#page=67,page=68) 67 68. The standard error is s/n=1.479/500≈0.066. The margin of error is e=1.984×0.066≈0.131. The approximate 95% confidence interval is [6.634−0.131,6.634+0.131=[6.503,6.765] 67.
Introduction to univariate inference and its application in real-world examples
Univariate inference allows us to draw conclusions about a population based on sample data, moving from observed sample statistics to unknown population parameters.
22.1 From sample to population
The fundamental goal of statistical inference is to generalize findings from a sample to a larger population. This process involves using data from a subset of a population (the sample) to make educated guesses or statements about the characteristics of the entire population (the parameter) 2 5.
22.1.1 Motivating examples
Example 1: Well-being of working Belgians 3. Securex conducted a study on the well-being of working individuals in Belgium, collecting data from 1500 respondents (1000 employees, 500 self-employed). The study reported average well-being scores and highlighted differences between self-employed individuals and others. The key inferential questions revolve around whether these sample findings (e.g., average scores, differences between groups) accurately reflect the entire population of working Belgians. For instance, can we conclude that the average societal well-being score for a Belgian is lower than 6.5 based on the sample data 4 5?
Example 2: Sexual violence in Belgium 6. A study published in De Standaard reported that nearly half of all men and eight in ten women in Belgium had experienced sexual violence in their lifetime. This study surveyed over 5000 inhabitants. Inferential questions here focus on the precision of these percentages when applied to the entire population and whether specific demographic groups experience sexual violence at significantly different rates. For example, can we prove that more than 60% of Belgians have ever been victims of sexual violence based on this sample 6 7?
22.2 Point estimators and point estimates
In statistical inference, we often use sample statistics to estimate unknown population parameters.
22.2.1 Definitions
- Point estimator: A random variable that produces a single value (a point estimate) from a sample. This value serves as the "best guess" for the population parameter 8.
- Point estimate: The specific numerical value obtained from a point estimator for a given sample 8.
22.2.2 Examples of point estimators
- P^: A point estimator for the population proportion p, with p^ as the point estimate 9.
- Xˉn: A point estimator for the population mean μ, with xˉn as the point estimate 9.
- S2: A point estimator for the population variance σ2, with s2 as the point estimate 9.
- S: A point estimator for the population standard deviation σ, with s as the point estimate 9.
22.2.3 Properties of good point estimators
A good point estimator possesses two key properties:
- Unbiasedness: The expected value of the estimator equals the population parameter it is estimating. In other words, on average, the estimator will be correct 10.
Tip: The formula for sample variance (S2) divides by n−1 precisely to ensure it is an unbiased estimator of the population variance σ2 10.
- Efficiency (Small Standard Error): A good point estimator has a standard error that is as small as possible. This means that the estimates it produces are generally closer to the true population parameter value compared to other estimators. Most estimators covered in this course are unbiased and have relatively small standard errors 11.
22.2.4 Practical consideration: The "wisdom of the crowd"
An experiment involving estimating the number of candies in a jar illustrates the concept that the average of many individual estimates can be a surprisingly accurate point estimate for the true value, even if individual estimates vary widely 13.
22.3 Interval estimation
While point estimates provide a single "best guess," they offer no information about the precision or accuracy of the estimate. Interval estimation addresses this limitation.
22.3.1 Disadvantage of point estimation
- It only provides a single value thought to be the population parameter 14.
- It does not indicate the accuracy or how close the estimate is believed to be to the true parameter value 14.
22.3.2 Introduction to interval estimation
An interval estimate provides a range of plausible values for the population parameter, along with a margin of error that quantifies the accuracy of the estimate 14.
22.3.3 Real-world application: VO2 max estimation
Smartwatches estimate VO2 max, a crucial metric for endurance athletes, by using tempo and heart rate data. While these are estimates, studies show Garmin smartwatches have an average error margin of 5% for VO2 max estimations. This margin of error, when translated into an interval, provides a sense of the estimate's precision 16.
22.4 Confidence interval: definition
A confidence interval (CI) is a type of interval estimate for a population parameter.
22.4.1 Definition of a confidence interval
A confidence interval (CI) is an interval that contains the most plausible values for an unknown population parameter, based on the sample data. It is typically expressed as 17:
point estimate ± margin of error 17.
The point estimate usually lies at the center of the interval 17.
22.4.2 Confidence level
The confidence level is the probability that the method used to construct the interval generates an interval that contains the population parameter. It is chosen between 0 and 1, usually close to 1. Common confidence levels are 95% (0.95) and 99% (0.99) 18.
22.5 Confidence interval for the mean of a normal variable
This section focuses on constructing confidence intervals for the population mean (μ) when the data comes from a normal distribution or the sample size is large.
22.5.1 Example: Well-being score of self-employed individuals
Using the well-being study data, we can construct a 95% confidence interval for the average well-being score of self-employed individuals in the population, using the sample mean (xˉn=6.634) and sample standard deviation (s=1.479) from a sample of n=500 20.
The general form of a confidence interval for the mean is:
[point estimate - margin of error, point estimate + margin of error] 21.
We aim to find an interval [xˉn−e,xˉn+e] such that P(Xˉn−e<μ<Xˉn+e)=0.95. The margin of error (e) is determined by the distribution of the sample mean (Xˉn) 21 22.
22.5.2 Case 1: Population variance (σ2) is known
If the population standard deviation (σ) is known, we can use the Z-distribution. The standardized sample mean follows a standard normal distribution: Z=σ/nXˉn−μ∼N(0,1) 24.
For a 95% confidence interval, we find the z-value such that the area between −z and z is 0.95. This value is z0.025=1.96, meaning P(−1.96≤Z≤1.96)=0.95 24 26.
The margin of error (e) for a 95% CI when σ is known is: e=1.96×standard error=1.96×nσ 27 29.
The 95% confidence interval for μ is: [xˉn−1.96nσ,xˉn+1.96nσ] 29.
If the population is not normal but the sample size (n) is sufficiently large (n≥30), the Central Limit Theorem (CLT) allows us to use this formula as an approximate 95% confidence interval 30.
Example 6.1: For a sample mean xˉn=6.634 with n=500 and a known σ=1.4: Standard error = 5001.4≈0.063 31. Margin of error (e) = 1.96×0.063≈0.123 31. The approximate 95% CI is [6.634−0.123,6.634+0.123=[6.511,6.757] 31.
22.5.3 Interpretation of a confidence interval
A 95% confidence interval means that the method used to construct the interval will capture the true population mean 95% of the time in repeated sampling. It does not mean that there is a 95% probability that the true mean μ falls within the specific interval calculated, as μ is a fixed, albeit unknown, value 32 33.
Tip: Visualizations using Java Applets demonstrate that approximately 95% of generated intervals capture the population parameter when using a 95% confidence level 34.
22.5.4 General confidence level (1 - α)
For a general confidence level of 100(1−α)%, we use the critical z-value zα/2, where P(Z>zα/2)=α/2 41 45.
The general formula for a (1−α)%-confidence interval for μ (when σ is known or n is large) is: [xˉn−zα/2nσ,xˉn+zα/2nσ] 46.
This can be expressed as:
point estimate ± z_{\alpha/2} * standard error 46.
Example 6.1 (continued): For a 99% CI (α=0.01, α/2=0.005), z0.005≈2.58 47 48. Margin of error (e) = 2.58×0.063≈0.162 50. The approximate 99% CI is [6.634−0.162,6.634+0.162=[6.472,6.800] 50. Note that the 99% CI is wider than the 95% CI, reflecting a higher degree of confidence 50.
22.5.5 Properties of confidence intervals for the mean
- Symmetry: The CI is always symmetric around the sample mean (xˉn) 51.
- Width: The width of the CI is twice the margin of error:
2 * margin of error51. - Factors affecting margin of error: The margin of error depends on:
- The desired confidence level (1−α) 52.
- The population standard deviation (σ) 52.
- The sample size (n) 52. e=zα/2nσ 52.
22.6 Case 2: Population variance (σ2) is unknown
In most practical situations, the population standard deviation (σ) is unknown. We estimate it using the sample standard deviation (s), leading to an estimated standard error (s/n) 54.
22.6.1 The Student's t-distribution
When σ is unknown and the population is normally distributed (or n is large), the ratio S/nXˉn−μ follows a Student's t-distribution with n−1 degrees of freedom (tn−1) 55.
22.6.2 Properties of the Student's t-distribution
- It is bell-shaped and symmetric around 0, similar to the standard normal distribution 56.
- Its shape depends on the degrees of freedom (r).
- It has heavier tails than the normal distribution, especially for small degrees of freedom 56.
- As the degrees of freedom increase, the t-distribution approaches the standard normal distribution. The standard normal distribution can be considered a t-distribution with infinite degrees of freedom 56.
22.6.3 Using the t-distribution for confidence intervals
For a 100(1−α)%-CI, we need the t-values (tn−1,α/2) such that P(T>tn−1,α/2)=α/2, where T∼tn−1. These values can be found in t-tables 58 59 60.
22.6.4 Formula for CI when σ is unknown
The (approximate) 100(1−α)%-confidence interval for the population mean μ when σ is unknown is: [xˉn−tn−1,α/2ns,xˉn+tn−1,α/2ns] 61.
This interval is generally wider than the CI calculated when σ is known, reflecting the added uncertainty from estimating the standard deviation 61.
Tip: This formula is valid if the population distribution is normal. For large samples (n≥30), it is sufficiently accurate due to the CLT. However, the Student's t-distribution should not be used if there are strong outliers in the sample, which can be identified using histograms and boxplots 62.
Example 6.2: A survey of 38 students found an average rent price of 432 dollars with a standard deviation of 138 dollars. To find a 99% CI 63: Sample size n=38, so degrees of freedom r=n−1=37 63. For a 99% CI, α=0.01, so α/2=0.005. We need t37,0.005. From t-tables, this value is approximately 2.712 60 63. Estimated standard error = ns=38138≈22.39 dollars 63. Margin of error (e) = t37,0.005×ns≈2.712×22.39≈60.68 dollars 63. The approximate 99% CI for the average rent price is [432−60.68,432+60.68=[371.32,492.68] dollars 63.
Univariate inference allows us to draw conclusions about population parameters based on sample data, focusing on a single variable.
22.1 Hypothesis testing
A hypothesis test is a statistical technique used to determine the extent to which sample data supports or contradicts a hypothesis about a population characteristic. It addresses questions about whether a specific value or interval for a population parameter is plausible given the observed data 70 71.
22.1.1 Formulating hypotheses
A hypothesis is a statement about a population characteristic, often concerning a parameter's value, an interval it might fall within, or the distribution it follows. In hypothesis testing, two competing hypotheses are formulated 71:
- Null Hypothesis (H0): This hypothesis posits that a population parameter takes a specific value or lies within a certain range. It typically represents a scenario of no effect, influence, or change. For tests concerning the mean (μ), it can be stated as H0:μ=μ0, H0:μ≤μ0, or H0:μ≥μ0 .
- Alternative Hypothesis (H1 or Ha): This hypothesis states that the population parameter lies in a different region, complementary to H0. It generally represents the presence of an effect, influence, or change that the researcher aims to demonstrate. For tests concerning the mean (μ), it can be stated as H1:μ=μ0 (two-sided), H1:μ>μ0 (right-sided), or H1:μ<μ0 (left-sided) .
Tip: Hypotheses should be formulated before examining or collecting data to avoid bias.
22.1.2 Types of hypothesis tests for the mean (μ) when σ is unknown
The focus is on testing hypotheses about the population mean (μ) when the population standard deviation (σ) is unknown, and we rely on the sample standard deviation (s).
22.1.2.1 Two-sided test
A two-sided test examines whether the population mean is different from a hypothesized value 73.
- Hypotheses: H0:μ=μ0 versus H1:μ=μ0 76.
- Real-world example: Is the average well-being score of self-employed individuals in Belgium different from 6.5? 74.
22.1.2.2 Right-sided test
A right-sided test investigates whether the population mean is greater than a hypothesized value .
- Hypotheses: H0:μ≤μ0 versus H1:μ>μ0 .
- Real-world example: Do students in Criminological Sciences study on average more than 4 hours per week? 72.
22.1.2.3 Left-sided test
A left-sided test checks if the population mean is less than a hypothesized value .
- Hypotheses: H0:μ≥μ0 versus H1:μ<μ0 .
- Real-world example: Is the average rent for a student room in Leuven less than 500 euros? 72.
22.1.3 Methods for hypothesis testing
Two primary methods are discussed for conducting hypothesis tests concerning the mean (μ) when σ is unknown:
22.1.3.1 Using confidence intervals
This method is applicable only for two-sided tests 78.
- Calculate a 100(1−α)%-confidence interval (CI) for μ.
- Check if the hypothesized value (μ0) falls within this CI.
- If μ0 is within the CI, we do not reject H0. This means μ0 is a plausible value for μ 76.
- If μ0 is not within the CI, we reject H0 in favor of H1. This means μ0 is unlikely to be the true population mean 76.
The significance level (α) of the test is equal to 1 minus the confidence level of the CI used 77.
Tip: This method is limited to two-sided tests. For one-sided tests, other methods are necessary.
22.1.3.2 Using the P-value
The P-value approach is more versatile and can be used for all types of hypothesis tests (two-sided, right-sided, left-sided) 78.
Definition of the P-value: The P-value is the probability of obtaining a test statistic that is at least as extreme as the observed one, assuming the null hypothesis is true 93.
- For a two-sided test, the P-value is 2P(T>∣t∣) representing the probability of observing a test statistic as far from 0 as, or further than, the calculated test statistic (t), under H0 88 91 92.
- For a right-sided test, the P-value is P(T>t) representing the probability of observing a test statistic greater than or equal to the calculated test statistic (t), under H0 .
- For a left-sided test, the P-value is P(T<t) representing the probability of observing a test statistic less than or equal to the calculated test statistic (t), under H0 .
Decision Rule:
- If P-value <α (significance level), reject H0. This indicates strong evidence against H0 and in favor of H1 100 .
- If P-value ≥α, do not reject H0. This indicates insufficient evidence to reject H0 100 .
Tip: "Not rejecting H0" does not mean H0 is true; it simply means there is no sufficient evidence to reject it, similar to a verdict of "not guilty" in a trial where no evidence of guilt was found .
22.1.4 Steps for conducting a hypothesis test
A hypothesis test typically involves five steps:
- Check conditions: Verify if the assumptions for the chosen statistical test are met (e.g., random sample, quantitative variable, normality or large sample size, no outliers) 100 .
- State hypotheses: Formulate the null (H0) and alternative (H1) hypotheses 100 .
- Determine the test statistic and its distribution under H0: Calculate the test statistic and identify its sampling distribution assuming H0 is true. For tests about the mean with unknown σ, this is typically a t-distribution 100 .
- Test statistic: T=S/nXˉ−μ0 91.
- Distribution under H0: T∼tn−1 if the variable is normally distributed, or T≈tn−1 if n≥30 (by Central Limit Theorem) .
- Test value: The observed value of the test statistic for the sample data: t=s/nxˉ−μ0 91.
- Calculate the P-value and compare it to α: Determine the P-value and compare it with the pre-determined significance level (α) 100 .
- Formulate a nuanced conclusion: State the decision regarding H0 (reject or do not reject) and interpret the result in the context of the research question, always reporting the P-value and significance level 100 .
22.1.5 Test statistic and its distribution for the mean (μ) when σ is unknown
When testing hypotheses about the population mean (μ) with an unknown population standard deviation (σ), the sample standard deviation (s) is used.
- Test statistic: The general form of the test statistic is T=S/nXˉ−μ0 where Xˉ is the sample mean, μ0 is the hypothesized population mean, S is the sample standard deviation, and n is the sample size 91.
- Distribution under H0:
- If the underlying variable is normally distributed, the test statistic T follows a t-distribution with n−1 degrees of freedom: T∼tn−1 .
- If the underlying variable is not normally distributed but the sample size n is sufficiently large (n≥30), the Central Limit Theorem (CLS) allows us to approximate the distribution of the test statistic as a t-distribution: T≈tn−1 .
This type of hypothesis test is often referred to as a t-test .
22.1.6 Calculating the test value
The test value is the specific numerical result obtained when plugging the sample statistics into the test statistic formula 91.
- Formula: t=s/nxˉ−μ0 91.
Example: For Example 6.3, testing H0:μ=6.5, with xˉ=6.634, s=1.479, and n=500, the test value is: t=1.479/5006.634−6.5=0.066130.134≈2.026 94.
22.1.7 Determining the P-value
The P-value quantifies how extreme the observed test value is under the null hypothesis .
- Two-sided test: Pvalue=2P(T>∣t∣), where T∼tn−1. This represents the probability of observing a test statistic value as far from 0 as, or further from 0 than, the calculated test value t 88 91.
- Right-sided test: Pvalue=P(T>t), where T∼tn−1. This is the probability of observing a test statistic value greater than or equal to t .
- Left-sided test: Pvalue=P(T<t), where T∼tn−1. This is the probability of observing a test statistic value less than or equal to t .
Tip: When the exact degrees of freedom (n−1) are not in the t-table, use the closest smaller number of degrees of freedom to obtain a conservative (larger) P-value estimate. For example, when n−1=499, using the row for df=100 is appropriate 95.
Example: For Example 6.3, with a test value t=2.026 and T≈t499, using df=100 for approximation, we find that t100,0.025=1.984 and t100,0.010=2.364. Since 1.984<2.026<2.364, the probability P(T>2.026) lies between 0.010 and 0.025. For the two-sided test, the P-value is 2×P(T>2.026), which lies between 2×0.01=0.02 and 2×0.025=0.05 95 96 97 98.
22.1.8 Significance level (α)
The significance level (α) is the probability of making a Type I error – incorrectly rejecting the null hypothesis when it is actually true. It is typically set at 0.05 (5%), but can also be 0.01 (1%) or 0.10 (10%) 77 91.
22.1.9 Formulating a conclusion
The conclusion of a hypothesis test should state the decision about the null hypothesis, relate it to the research question, and report the P-value and significance level used .
- If P-value <α, reject H0. Conclude that there is statistically significant evidence to support H1 .
- If P-value ≥α, do not reject H0. Conclude that there is not enough statistically significant evidence to support H1 .
Important Note: Reporting the P-value provides more detailed information than just stating statistical significance at a given α level. A P-value of 0.001 provides stronger evidence against H0 than a P-value of 0.049, even though both are significant at the 0.05 level .
Example: For Example 6.3, the P-value is between 0.02 and 0.05.
- At α=0.05: Since P-value (0.02 to 0.05) <0.05, we reject H0 and conclude that the average well-being score of self-employed individuals in Belgium differs from 6.5 .
- At α=0.01: Since P-value (0.02 to 0.05) ≥0.01, we do not reject H0 and cannot conclude that the average well-being score differs from 6.5 .
22.2 Real-world applications of univariate inference
22.2.1 Confidence intervals for the mean (μ)
Confidence intervals provide a range of plausible values for the population mean (μ) based on sample data.
- Formula (when σ is unknown and n is large or data is normal): The confidence interval is of the form [xˉ−tn−1,α/2ns,xˉ+tn−1,α/2ns]. Here, xˉ is the sample mean, s is the sample standard deviation, n is the sample size, and tn−1,α/2 is the critical t-value for n−1 degrees of freedom and α/2 tail probability 64 66.
Example 6.1: For self-employed individuals, a sample of n=500 yields a mean well-being score of xˉ=6.634 and a standard deviation of s=1.479. A 95%-confidence interval for the average well-being score is calculated as: [6.634−t499,0.0255001.479,6.634+t499,0.0255001.479] Using t499,0.025≈t100,0.025=1.984, the interval is approximately [6.503,6.765] 67.
Example 6.2: For a sample of n=38, xˉ=432 and s=138. A 99%-confidence interval for the mean housing price is: [xˉ−t37,0.005ns,xˉ+t37,0.005ns] With t37,0.005≈t30,0.005=2.750, the standard error is s/n=138/38≈22.39. The margin of error is e=2.750×22.39=61.56. The 99%-CI is [432−61.56,432+61.56=[370.44,493.56] dollars 64 66.
22.2.2 Hypothesis testing for the mean (μ)
Hypothesis tests allow us to make decisions about population means based on sample evidence.
Example 6.3 (Two-sided test): Investigating if the average well-being score of self-employed individuals in Belgium differs from 6.5.
- H0:μ=6.5 vs H1:μ=6.5 76.
- Test statistic: T=S/nXˉ−6.5≈t499 94.
- Test value: t=2.026 94.
- P-value: Between 0.02 and 0.05 98.
- Conclusion at α=0.05: Reject H0. The average well-being score differs from 6.5 .
- Conclusion at α=0.01: Do not reject H0. Cannot conclude the average well-being score differs from 6.5 .
- Relationship with CI: The calculated 95%-CI is [6.503,6.765] dollars, which does not contain 6.5 dollars, consistent with rejecting H0 at α=0.05. The 99%-CI is [6.478,6.790] dollars, which does contain 6.5 dollars, consistent with not rejecting H0 at α=0.01 .
Example 6.4 (Left-sided test): Examining if the average rent for a student room in Leuven is less than 500 dollars.
- n=38, xˉ=432 dollars, s=138 dollars .
- H0:μ≥500 vs H1:μ<500 dollars .
- Test statistic: T=S/nXˉ−500≈t37 .
- Test value: t=138/38432−500=−3.04 .
- P-value: P(T<−3.04). From the t-table, t30,0.005=2.750. Since −3.04<−2.750, P(T<−3.04)<P(T<−2.750)=0.005 .
- Conclusion at α=0.05: Since P-value <0.005<0.05, reject H0. We can conclude that the average rent is less than 500 dollars .
Example 6.4 (Right-sided test, continuation): Examining if the average rent for a student room in Leuven is more than 500 dollars.
- H0:μ≤500 vs H1:μ>500 dollars .
- Test value: t=−3.04 .
- P-value: P(T>−3.04). Since P(T<−3.04)<0.005, then P(T>−3.04)=1−P(T<−3.04)>1−0.005=0.995 .
- Conclusion at α=0.05: Since P-value ( >0.995) >0.05, do not reject H0. We cannot conclude that the average rent is more than 500 dollars .
22.2.3 Practice problem overview
Practice problems, such as Exercise 6.2, require calculating P-values for right-sided, left-sided, and two-sided tests given a test value and sample size, then interpreting the results based on different significance levels. For a test value t=2.27 with n=69 students (degrees of freedom n−1=68), we would find the corresponding P-values for each test type .
This section introduces the fundamental concepts of univariate statistical inference, focusing on hypothesis testing for means and proportions, and the critical distinction between Type I and Type II errors.
22.1 Hypothesis testing for the mean of a variable when σ is unknown
While the provided text primarily focuses on cases where σ is known or implicitly assumed from context, it touches upon the interpretation of P-values related to t-tests. For a right-tailed test, the P-value is the probability of observing a test statistic as extreme or more extreme than the one obtained, assuming the null hypothesis is true .
22.1.1 Understanding P-values in different test directions
The P-value's interpretation varies based on the direction of the hypothesis test:
- Right-tailed test: For a test statistic t with T∼t68, the P-value is P(T>t). If t=2.27, the P-value lies between 0.01 and 0.025, as 2.27 falls between the critical values for α=0.025 and α=0.01 with 60 degrees of freedom .
- Left-tailed test: The P-value is P(T<t). If t=2.27, then P(T<2.27)=1−P(T>2.27), placing the P-value between 1−0.025 and 1−0.01, thus between 0.975 and 0.99 .
- Two-tailed test: The P-value is 2P(T>∣t∣). For t=2.27, the P-value is 2P(T>2.27), which lies between 2×0.01 and 2×0.025, resulting in a range of 0.02 to 0.05 .
22.2 Type I and Type II errors
When conducting a hypothesis test, two types of errors can occur due to random sampling, not researcher mistakes :
- Type I error (false positive): Rejecting the null hypothesis (H0) when it is actually true. The probability of a Type I error is denoted by α, the significance level. This occurs when sample data yields an extreme result due to chance, leading to the rejection of a true H0 .
- Type II error (false negative): Failing to reject the null hypothesis (H0) when it is actually false. The probability of a Type II error is denoted by β. This error occurs when H0 is not rejected, despite a true alternative hypothesis (H1) .
The relationship between these errors can be summarized in a table:
| Reject H0 | Do not reject H0 | |
|---|---|---|
| H0 is true | Type I error | No error |
| H0 is false | No error | Type II error |
22.2.1 Factors influencing Type II error
The probability of a Type II error (β) is influenced by:
- The degree to which H0 is false: A small relative deviation from H0 leads to a higher probability of a Type II error than a large deviation. If the true population mean (μ1) is closer to the hypothesized mean (μ0), the chance of a Type II error increases .
- The spread of the sampling distribution: A smaller spread (smaller standard error of the sample mean, Xn) leads to a smaller probability of a Type II error .
The calculation of β is not typically required in practice .
22.2.2 Choosing the significance level α
The significance level α is chosen before conducting the hypothesis test and sets the maximum acceptable probability of a Type I error. Common choices for α are 0.1, 0.05, or 0.01 .
- Too large α: Increases the risk of a Type I error.
- Too small α: Increases the risk of a Type II error, as H0 is less likely to be rejected .
The probabilities of Type I and Type II errors are not independent .
Tip: Think of α as the threshold for how "unusual" an observation needs to be before you are willing to reject the null hypothesis. A stricter threshold (α closer to 0) means you need a more extreme observation to reject H0, thus reducing the chance of a Type I error but increasing the chance of a Type II error.
22.2.3 Overview of error probabilities
The probabilities of Type I and Type II errors can be presented in a table, relating them to the significance level (α) and the confidence level (1−α):
| H0 is true | α (Type I) | 1−α (Confidence) | | H0 is false | 1−β | β (Type II) |
22.3 Hypothesis testing for the mean of a normal variable (σ known)
This section outlines the steps and considerations for hypothesis testing when the population standard deviation (σ) is known.
22.3.1 Conditions for testing
The following conditions must be met:
- The sample must be random .
- X is a quantitative (or pseudo-metric) variable .
- The variable X originates from a normal distribution, or the sample size is sufficiently large (n≥30) due to the Central Limit Theorem (CLT) .
- The sample should not contain outliers .
22.3.2 Setting up hypotheses
Hypotheses are formulated based on the research question:
- Right-tailed test: H0:μ≤μ0 vs. H1:μ>μ0 .
- Left-tailed test: H0:μ≥μ0 vs. H1:μ<μ0 .
- Two-tailed test: H0:μ=μ0 vs. H1:μ=μ0 .
22.3.3 Determining the test statistic
Given the conditions and that X1,…,Xn are from a normal distribution with known σ, the Central Limit Theorem (CLT) implies that the sample mean Xn is normally distributed: Xn∼N(μ,nσ2). The test statistic used is a Z-score: Z=σ/nXn−μ0 Under H0, Z∼N(0,1). The test value, z, is calculated as : If X does not follow a normal distribution but the sample is large (n≥30), the CLT still allows us to approximate Xn≈N(μ,nσ2) .
22.3.4 Calculating the P-value
The P-value is determined based on the test statistic z and the alternative hypothesis:
- Right-tailed test: P(Z>z) .
- Left-tailed test: P(Z<z) .
- Two-tailed test: 2P(Z>∣z∣) .
The P-value is then found using the standard normal distribution table (Z-table) .
22.3.5 Decision rule
Reject H0 if the P-value is less than the chosen significance level α .
22.3.5.1 Example: Wellbeing score of self-employed individuals
Consider a sample of xn=6.634 for the wellbeing score of self-employed individuals, with a known population standard deviation σ=1.4. We want to test if the average wellbeing score is greater than 6.5 at a 5% significance level .
- Conditions: Random sample (given), pseudo-metric variable (wellbeing score), n=500 (large enough, even if not strictly normal distribution), assume no outliers .
- Hypotheses: H0:μ≤6.5 vs. H1:μ>6.5 .
- Test statistic: Z=σ/nXn−μ0. Test value z=1.4/5006.634−6.5=2.14 .
- P-value: P(Z>2.14)=1−P(Z≤2.14)=1−0.984=0.016 .
- Decision: Since 0.016<0.05, we reject H0 at the 5% significance level and conclude that the average wellbeing score of self-employed individuals is greater than 6.5 .
22.3.6 Summary of test for σ known
| H0:μ=μ0 | Test Statistic | P-value |
|---|---|---|
| H1:μ=μ0 | Z=σ/nX−μ0≈H0N(0,1) | $2P(Z > |
| H1:μ>μ0 | (if σ2 is known) | P(Z>z) |
| H1:μ<μ0 | P(Z<z) |
22.4 Inference for a proportion
This section covers constructing confidence intervals and performing hypothesis tests for population proportions.
22.4.1 Confidence interval for a proportion
A confidence interval (CI) for a proportion p is typically of the form [point estimate ± margin of error .
- Point estimate: The sample proportion, p^ .
- Standard error: The standard error of the sample proportion P^ is np(1−p). Since p is unknown, it is estimated using p^: np^(1−p^) .
- Margin of error: For a 95% CI, this is 1.96×standard error .
Conditions for approximate normality: The sampling distribution of P^ is approximately normal if np≥5 and n(1−p)≥5. Since p is unknown, we use p^: the condition becomes np^≥5 and n(1−p^)≥5, meaning at least 5 "successes" and 5 "failures" in the sample .
Formula for approximate 95% CI: \left[ \hat{p} - 1.96 \sqrt{\frac{\hat{p}(1-\hat{p})}{n}}, \hat{p} + 1.96 \sqrt{\frac{\hat{p}(1-\hat{p})}{n}} \right
General formula for approximate 100(1−α)% CI: \left[ \hat{p} - z_{\alpha/2} \sqrt{\frac{\hat{p}(1-\hat{p})}{n}}, \hat{p} + z_{\alpha/2} \sqrt{\frac{\hat{p}(1-\hat{p})}{n}} \right where zα/2 is the quantile from the standard normal distribution such that P(Z>zα/2)=α/2 .
Interpretation: A 100(1−α)% CI is an interval generated by a method that, on average, will contain the true population proportion p in 100(1−α)% of samples .
22.4.1.1 Example: Sexual violence victims
In a study of 5,000 inhabitants, 64% reported being a victim of sexual violence. A 95% CI for the percentage of victims in Belgium is calculated as follows :
- n=5000, p^=0.64.
- Conditions: np^=3200≥5 and n(1−p^)=1800≥5.
- Estimated standard error: 50000.64(1−0.64)=0.007.
- Margin of error: e=1.96×0.007=0.0133.
- 95% CI: 0.64±0.0133=[0.627,0.653] .
22.4.2 Hypothesis testing for a proportion (n sufficiently large)
The general five steps of hypothesis testing apply here :
- Check conditions:
- Random sample.
- Discrete variable with two outcomes (e.g., success/failure).
- Sufficiently large sample size: np0≥5 and n(1−p0)≥5, where p0 is the proportion under the null hypothesis .
- Set up hypotheses:
- Right-tailed: H0:p≤p0 vs. H1:p>p0 .
- Left-tailed: H0:p≥p0 vs. H1:p<p0 .
- Two-tailed: H0:p=p0 vs. H1:p=p0 .
- Determine test statistic and value: The test statistic is: Z=np0(1−p0)P^−p0 Under H0, Z≈N(0,1) if the sample size conditions are met. The test value is :
- Determine P-value and compare with α:
- Right-tailed: P(Z>z) .
- Left-tailed: P(Z<z) .
- Two-tailed: 2P(Z>∣z∣) . If P-value <α, reject H0. Otherwise, do not reject H0 .
- Formulate a nuanced conclusion: State the decision in the context of the problem .
Tip: When you fail to reject H0, it does not prove that H0 is true. It simply means that the evidence from the sample is not strong enough to reject it at the chosen significance level .
22.4.2.1 Example: Sexual violence victims among refugees
We want to know if the proportion of refugees who were victims of sexual violence is greater than 80% (p>0.80). A sample of n=50 refugees shows p^=0.84 .
- Hypotheses: H0:p≤0.80 vs. H1:p>0.80 .
- Conditions: Random sample, binary variable, np0=50×0.80=40≥5 and n(1−p0)=50×0.20=10≥5 .
- Test statistic: Z=np0(1−p0)P^−p0. Test value z=500.80(1−0.80)0.84−0.80=0.71 .
- P-value: P(Z>0.71)=1−P(Z<0.71)=1−0.761=0.239 .
- Decision: Since 0.239>0.05 (assuming α=0.05), we do not reject H0. We cannot conclude that more than 80% of refugees were victims of sexual violence .
22.4.2.2 Example: Lottery number frequency
We investigate if the number 39 appeared abnormally often in 100 British lottery drawings in 2022, where it occurred 17 times. The expected probability for any number is approximately 0.102 .
- Hypotheses: H0:p=0.102 vs. H1:p=0.102 .
- Conditions: Random sample, binary variable, np0=100×0.102=10.2≥5 and n(1−p0)=100×0.898=89.8≥5 .
- Test statistic: Z=np0(1−p0)P^−p0. Test value z=1000.102(1−0.102)0.17−0.102=2.24 .
- P-value: 2P(Z>2.24)=2×(1−P(Z<2.24))=2×0.013=0.026 .
- Decision: Since 0.026<0.05, we reject H0 at the 5% significance level. We conclude that it is abnormal for the number 39 to appear 17 times in 100 drawings .
22.4.3 Summary of test for proportion (n large)
| H0:p=p0 | Test Statistic | P-value |
|---|---|---|
| H1:p=p0 | Z=p0(1−p0)/nP^−p0≈H0N(0,1) | $2P(Z > |
| H1:p>p0 | (if np0≥5 and n(1−p0)≥5) | P(Z>z) |
| H1:p<p0 | P(Z<z) |
Common mistakes to avoid
- Review all topics thoroughly before exams
- Pay attention to formulas and key definitions
- Practice with examples provided in each section
- Don't memorize without understanding the underlying concepts
© 2026 Maeve. All rights reserved. This content is protected by copyright.