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 pp, the sample proportion P^\hat{P} is a point estimator, and its observed value p^\hat{p} is a point estimate 9.
  • For a population mean μ\mu, the sample mean Xˉn\bar{X}_n is a point estimator, and its observed value xˉn\bar{x}_n is a point estimate 9.
  • For a population variance σ2\sigma^2, the sample variance S2S^2 is a point estimator, and its observed value s2s^2 is a point estimate 9.
  • For a population standard deviation σ\sigma, the sample standard deviation SS is a point estimator, and its observed value ss 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^\hat{P} is an unbiased estimator for pp because E(P^)=pE(\hat{P}) = p 10.
  • Xˉn\bar{X}_n is an unbiased estimator for μ\mu because E(Xˉn)=μE(\bar{X}_n) = \mu 10.
  • S2S^2 is an unbiased estimator for σ2\sigma^2 because E(S2)=σ2E(S^2) = \sigma^2 10.

Tip: The formula for the sample variance S2S^2 involves dividing by n−1n-1 rather than nn specifically to ensure that it is an unbiased estimator of the population variance σ2\sigma^2. S2=1n−1∑i=1n(Xi−Xˉ)2S^2 = \frac{1}{n-1} \sum_{i=1}^{n} (X_i - \bar{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ˉ\bar{x}) 16.
  • Interval estimation: A range centered around the point estimate, indicating the potential error margin, such as xˉ−2.5\bar{x} - 2.5 to xˉ+2.5\bar{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 μ\mu 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 μ\mu has a 95% probability of falling within a specific 95% confidence interval. This interpretation is incorrect because the population mean μ\mu is a fixed, unknown value and not a random variable. Therefore, we cannot assign probabilities to μ\mu 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, α\alpha, 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, α\alpha, 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 ZZ, we are interested in finding quantiles related to small tail probabilities. For any α\alpha such that 0<α≤0.50 < \alpha \leq 0.5, we denote QZ(1−α)Q_Z(1 - \alpha) as the quantile corresponding to the upper tail probability of α\alpha. This is equivalent to finding the zz-value, denoted as zαz_\alpha, such that the probability of ZZ being greater than zαz_\alpha is α\alpha 41 42.

The relationship can be formally stated as: P(Z>zα)=αP(Z > z_\alpha) = \alpha 41 42.

This also implies that the probability of ZZ being less than zαz_\alpha is 1−α1 - \alpha: P(Z<zα)=1−αP(Z < z_\alpha) = 1 - \alpha 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 ZZ being less than −zα-z_\alpha is equal to α\alpha: P(Z<−zα)=αP(Z < -z_\alpha) = \alpha 41 42.

We can also consider the probability within a symmetric interval around the mean. The probability of ZZ falling between −zα/2-z_{\alpha/2} and zα/2z_{\alpha/2} is 1−α1 - \alpha: P(−zα/2≤Z≤zα/2)=1−αP(-z_{\alpha/2} \leq Z \leq z_{\alpha/2}) = 1 - \alpha 41 42.

It is important to note that zα/2z_{\alpha/2} is not the same as zα/2z_\alpha / 2 41 42.

Tip: When working with small tail probabilities, think about whether you need the zz-value for the upper tail (zαz_\alpha) or for a symmetric interval (zα/2z_{\alpha/2}).

4.2 Using a standard normal distribution table

Standard normal distribution tables are commonly used to find these zz-values. The tables typically provide cumulative probabilities, i.e., P(Z<z)P(Z < z).

Example: Finding z0.1z_{0.1} and z0.05z_{0.05} for α=0.1\alpha = 0.1.

  1. Calculate zα=z0.1z_\alpha = z_{0.1}: We are looking for the zz-value such that P(Z>0.1)=0.1P(Z > 0.1) = 0.1. This is equivalent to finding z0.1z_{0.1} such that P(Z<z0.1)=1−0.1=0.90P(Z < z_{0.1}) = 1 - 0.1 = 0.90. Looking up 0.9000.900 in a standard normal distribution table, we find that z0.1z_{0.1} is approximately 1.281.28 44.

  2. Calculate zα/2=z0.1/2=z0.05z_{\alpha/2} = z_{0.1/2} = z_{0.05}: We are looking for the zz-value such that P(Z>0.05)=0.05P(Z > 0.05) = 0.05. This is equivalent to finding z0.05z_{0.05} such that P(Z<z0.05)=1−0.05=0.95P(Z < z_{0.05}) = 1 - 0.05 = 0.95. Consulting a standard normal distribution table (as shown in the document ), we observe values around 0.950.95. For instance, P(Z<1.64)≈0.949P(Z < 1.64) \approx 0.949 and P(Z<1.65)≈0.951P(Z < 1.65) \approx 0.951. By convention or interpolation, z0.05z_{0.05} is often taken as 1.6451.645 43 44.

Example: To find the zz-score corresponding to the 97.5th percentile (i.e., P(Z<z)=0.975P(Z < z) = 0.975), we look for 0.9750.975 in the table. This value is typically found to be 1.961.96. This means that 97.5%97.5\% of the data falls below z=1.96z = 1.96 and 2.5%2.5\% falls above it. This value 1.961.96 is often used to construct 95%95\% confidence intervals, where α=0.05\alpha = 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 rr. The degrees of freedom are typically calculated as n−1n-1, where nn 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−1n-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−α)%100(1-\alpha)\%-confidence interval, we need t-values that satisfy the condition: P(T>t)=α2P(T > t) = \frac{\alpha}{2} and P(T<−t)=α2P(T < -t) = \frac{\alpha}{2} 58.

Here, TT is a random variable following a t-distribution with r=n−1r = n-1 degrees of freedom. These critical t-values are denoted as tn−1,α/2t_{n-1, \alpha/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=10n=10. The degrees of freedom would be r=10−1=9r = 10-1 = 9. For a 95% confidence interval, α=0.05\alpha = 0.05, so α/2=0.025\alpha/2 = 0.025. Looking up t9,0.025t_{9, 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 (rr) and tail probabilities (α/2\alpha/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=1r=1 degree of freedom and a tail area of α/2=0.025\alpha/2 = 0.025, the t-value is 12.70612.706. For r=2r=2 degrees of freedom and the same tail area, the t-value is 4.3034.303. As the degrees of freedom approach infinity (r=∞r=\infty), 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\alpha/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\bar{X}_n and the population mean μ\mu, when the data comes from a normal distribution with a known standard deviation σ\sigma, 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.961.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 μ\mu 27 28.

6.1.1 Definition of margin of error

The margin of error (ee) quantifies the expected accuracy of an estimator and is a multiple of the estimator's standard error (sese) 27 28.

6.2 Constructing the confidence interval

When a random sample X1,…,XnX_1, \ldots, X_n is drawn from a normal distribution with a known standard deviation σ\sigma, the 95% confidence interval for the population mean μ\mu 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 errore = 1.96 \times \text{standard error} 29.

With the standard error defined as σn\frac{\sigma}{\sqrt{n}} the margin of error formula becomes 29: e=1.96×σne = 1.96 \times \frac{\sigma}{\sqrt{n}} 29.

The 95% confidence interval for the population mean μ\mu is then constructed as the point estimate (sample mean xˉn\bar{x}_n) plus or minus the margin of error: Confidence Interval=xˉn±e\text{Confidence Interval} = \bar{x}_n \pm e 29.

Substituting the margin of error formula, the interval is: [xˉn−1.96σn,xˉn+1.96σn][\bar{x}_n - 1.96 \frac{\sigma}{\sqrt{n}}, \bar{x}_n + 1.96 \frac{\sigma}{\sqrt{n}}] 29.

Tip: The value 1.961.96 is derived from the zz-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 (nn) is sufficiently large (at least 30), the central limit theorem allows for an approximation. In such cases, the distribution of Xˉn−μσ/n\frac{\bar{X}_n - \mu}{\sigma/\sqrt{n}} approximates a standard normal distribution N(0,1)N(0, 1) 30.

Consequently, the probability statement holds approximately: P(−1.96σn⩽Xˉn−μ⩽1.96σn)≈0.95P \left( -1.96 \frac{\sigma}{\sqrt{n}} \leqslant \bar{X}_n - \mu \leqslant 1.96 \frac{\sigma}{\sqrt{n}} \right) \approx 0.95 30.

This leads to an approximate 95% confidence interval for μ\mu: [xˉn−1.96σn,xˉn+1.96σn][\bar{x}_n - 1.96 \frac{\sigma}{\sqrt{n}}, \bar{x}_n + 1.96 \frac{\sigma}{\sqrt{n}}] 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 μ\mu 30.

6.3 Example calculation

Consider a scenario where the sample mean well-being score for self-employed individuals is xˉn=6.634\bar{x}_n = 6.634 from a sample of n=500n = 500 individuals. If the population standard deviation σ\sigma is known to be 1.41.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.

  1. Calculate the standard error: se=σn=1.4500≈0.063se = \frac{\sigma}{\sqrt{n}} = \frac{1.4}{\sqrt{500}} \approx 0.063 31.

  2. Calculate the margin of error: e=1.96×se=1.96×0.063≈0.123e = 1.96 \times se = 1.96 \times 0.063 \approx 0.123 31.

  3. Construct the confidence interval: The approximate 95% confidence interval for μ\mu is [xˉn−e,xˉn+e][\bar{x}_n - e, \bar{x}_n + e]. [6.634−0.123,6.634+0.123=[6.511,6.757][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−α1 - \alpha or 100(1−α)%100(1 - \alpha)\% 38 39 40.

  • For a 95% confidence interval (CI), α\alpha is equal to 0.05 39 40.
  • For a 99% CI, α\alpha is equal to 0.01 39 40.

The critical values used in constructing the interval are based on α2\frac{\alpha}{2} and −α2-\frac{\alpha}{2} in the standard normal distribution 38 39 40.

Tip: Understanding α\alpha as the probability of not being within the confidence interval is crucial. A smaller α\alpha (e.g., 0.01 for 99% CI) means a smaller area in the tails of the distribution, requiring larger zz-scores to capture the central 1−α1-\alpha probability.

7.3 Relationship between confidence level and interval width

As the confidence level increases, the corresponding zz-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 zz-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 zz-scores (zα/2z_{\alpha/2}). These larger zz-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 (σ\sigma) is unknown. In such practical scenarios, σ\sigma is estimated by ss, the sample standard deviation. This leads to an estimated standard error of s/ns / \sqrt{n} 54.

The quantity Xˉn−μs/n\frac{\bar{X}_n - \mu}{s/\sqrt{n}} is not standard normally distributed. However, if the individual data points X1,…,XnX_1, \dots, X_n are normally distributed, then the ratio Xˉn−μs/n\frac{\bar{X}_n - \mu}{s/\sqrt{n}} follows a Student t-distribution with n−1n-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⩾30n \geqslant 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 (rr) 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 (rr) 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:

Density functions of t-distributions 57.

8.3 Using the t-distribution for confidence intervals

To construct a 100(1−α)%100(1 - \alpha)\% confidence interval (CI) for the mean based on a sample of size nn, specific t-values are required. Similar to z-values for the normal distribution, these t-values satisfy the condition 58:

P(T>t)=α2P(T > t) = \frac{\alpha}{2} (and P(T<−t)=α2P(T < -t) = \frac{\alpha}{2})

where TT is a random variable following a t-distribution with r=n−1r = n - 1 degrees of freedom 58.

These critical t-values are denoted as tn−1,α/2t_{n-1, \alpha/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 XX represent the well-being score of a self-employed individual in Belgium. Assume XX is a random variable with a specific probability distribution, and let μ=E(X)\mu = E(X) be the average well-being score of self-employed individuals in Belgium. The hypothesis being investigated is whether μ=6.5\mu = 6.5 or μ≠6.5\mu \neq 6.5 74.

If the sample mean, denoted as xˉn\bar{x}_n, is 6.6346.634, this point estimate for μ\mu differs from the proposed value of 6.56.5. The question then becomes: can we conclude from this sample that the population mean μ\mu is also not equal to 6.56.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 (H0H_0) is true .

  • Interpretation:

  • A small P-value indicates that the sample data strongly contradict the null hypothesis and provide support for the alternative hypothesis (HaH_a) .

  • 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 μ\mu with σ\sigma unknown): The P-value is calculated as 2P(T>∣t∣)2P(T > |t|) where T∼tn−1T \sim t_{n-1} and tt 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 (α\alpha) is predetermined. This α\alpha represents the threshold for how small the P-value must be to reject the null hypothesis .

  • Decision Rule:
  • If P-value <α< \alpha: Reject the null hypothesis (H0H_0) in favor of the alternative hypothesis (HaH_a) at the α\alpha significance level. This implies that the value specified in H0H_0 is unlikely to be the true value of the parameter being tested. For a test about μ\mu, you can conclude μ≠μ0\mu \neq \mu_0 .
  • If P-value ≥α\geq \alpha: Do not reject the null hypothesis (H0H_0) at the α\alpha significance level. This means that the value specified in H0H_0 remains a plausible value for the parameter, although not necessarily the only one. For a test about μ\mu, you cannot reject the possibility that μ=μ0\mu = \mu_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 (α\alpha) 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\alpha = 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\alpha = 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 H0H_0 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 (XX) must be quantitative (or pseudo-metric) .
  • The variable must come from a normal distribution, or the sample size (nn) 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⩾30n \geqslant 30) due to the Central Limit Theorem (CLT) .

11.2 Setting up hypotheses

Hypotheses are formulated in relation to the population mean (μ\mu) and a specified value (μ0\mu_0). There are three common forms :

  • Right-tailed test:
  • Null hypothesis (H0H_0): μ⩽μ0\mu \leqslant \mu_0
  • Alternative hypothesis (H1H_1): μ>μ0\mu > \mu_0
  • Left-tailed test:
  • Null hypothesis (H0H_0): μ⩾μ0\mu \geqslant \mu_0
  • Alternative hypothesis (H1H_1): μ<μ0\mu < \mu_0
  • Two-tailed test:
  • Null hypothesis (H0H_0): μ=μ0\mu = \mu_0
  • Alternative hypothesis (H1H_1): μ≠μ0\mu \neq \mu_0

11.3 Test statistic

Given that the sample data (X1,…,XnX_1, \dots, X_n) are drawn from a normal distribution with a known population variance (σ2\sigma^2), the sample mean (Xˉn\bar{X}_n) follows a normal distribution under the null hypothesis. Specifically, Xˉn∼N(μ,σ2n)\bar{X}_n \sim N(\mu, \frac{\sigma^2}{n}) .

The appropriate test statistic (ZZ) for testing the mean when the variance is known is: Z=Xˉn−μ0σ/nZ = \frac{\bar{X}_n - \mu_0}{\sigma/\sqrt{n}} Under the null hypothesis (H0H_0), this test statistic approximately follows a standard normal distribution, N(0,1)N(0, 1) .

The calculated value of the test statistic from the sample data is denoted by zz: z=xˉn−μ0σ/nz = \frac{\bar{x}_n - \mu_0}{\sigma/\sqrt{n}}

Note: If the variable XX does not originate from a normal distribution, but the sample size is large enough (n⩾30n \geqslant 30), the Central Limit Theorem (CLT) implies that Xˉn≈N(μ,σ2n)\bar{X}_n \approx N(\mu, \frac{\sigma^2}{n}) .

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)P(Z > z) .
  • Left-tailed test: P-value = P(Z<z)P(Z < z) .
  • Two-tailed test: P-value = 2P(Z>∣z∣)2P(Z > |z|) .

The probabilities P(Z>z)P(Z > z), P(Z<z)P(Z < z), and P(Z>∣z∣)P(Z > |z|) are found using a standard normal distribution table, where Z∼(≈)N(0,1)Z \sim (\approx) N(0, 1) .

11.5 Decision rule

The decision to reject or fail to reject the null hypothesis (H0H_0) is made by comparing the calculated p-value to the chosen significance level (α\alpha) .

  • If the p-value < α\alpha, reject H0H_0 .
  • If the p-value ≥α\ge \alpha, fail to reject H0H_0 .

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\bar{x}_n = 6.634. It is known from years of measurement that the population standard deviation (σ\sigma) 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 (XX) is a pseudo-metric variable .
  • Although XX does not strictly come from a normal distribution (scores are between 0 and 10), the sample size n=500n=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.5H_0: \mu \leqslant 6.5
  • H1:μ>6.5H_1: \mu > 6.5 Here, μ\mu represents the average well-being score of self-employed individuals .

3. Calculate the test statistic: Using the formula Z=Xˉn−μ0σ/n≈H0N(0,1)Z = \frac{\bar{X}_n - \mu_0}{\sigma/\sqrt{n}} \approx H_0 N(0, 1), we calculate the test value: z=6.634−6.51.4/500=0.1341.4/22.36=0.1340.0626≈2.14z = \frac{6.634 - 6.5}{1.4/\sqrt{500}} = \frac{0.134}{1.4/22.36} = \frac{0.134}{0.0626} \approx 2.14

4. Calculate the p-value: This is a right-tailed test, so the p-value is P(Z>z)P(Z > z): P(Z>2.14)=1−P(Z⩽2.14)P(Z > 2.14) = 1 - P(Z \leqslant 2.14) Looking up P(Z⩽2.14)P(Z \leqslant 2.14) in a standard normal table gives approximately 0.984. P(Z>2.14)=1−0.984=0.016P(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\alpha = 0.05). Therefore, we reject H0H_0 .

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 (H0H_0)Alternative Hypothesis (H1H_1)Test StatisticP-value
μ=μ0\mu = \mu_0μ≠μ0\mu \neq \mu_0Z=Xˉ−μ0σ/n∼H0N(0,1)Z = \frac{\bar{X} - \mu_0}{\sigma/\sqrt{n}} \sim_{H_0} N(0, 1) (if σ2\sigma^2 known)$2P(Z >
μ=μ0\mu = \mu_0μ>μ0\mu > \mu_0Z=Xˉ−μ0σ/n∼H0N(0,1)Z = \frac{\bar{X} - \mu_0}{\sigma/\sqrt{n}} \sim_{H_0} N(0, 1) (if σ2\sigma^2 known)P(Z>z)P(Z > z)
μ=μ0\mu = \mu_0μ<μ0\mu < \mu_0Z=Xˉ−μ0σ/n∼H0N(0,1)Z = \frac{\bar{X} - \mu_0}{\sigma/\sqrt{n}} \sim_{H_0} N(0, 1) (if σ2\sigma^2 known)P(Z<z)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 (pp) is the sample proportion (p^\hat{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^\hat{P}) is given by: SE(P)=p(1−p)nSE(P) = \sqrt{\frac{p(1-p)}{n}} . where pp is the population proportion and nn is the sample size.

Since the population proportion (pp) is unknown, its estimate, the sample proportion (p^\hat{p}), is used to estimate the standard error: Estimated SE(P^)=p^(1−p^)n\text{Estimated SE}(\hat{P}) = \sqrt{\frac{\hat{p}(1-\hat{p})}{n}} .

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 zz-score that captures 95% of the probability in a standard normal distribution. More generally, for a 100(1−α)%100(1-\alpha)\%-confidence interval, the critical value is zα/2z_{\alpha/2} .

zα/2z_{\alpha/2} is the quantile from the standard normal distribution for which the upper tail probability is α/2\alpha/2, i.e., P(Z>zα/2)=α/2P(Z > z_{\alpha/2}) = \alpha/2 and P(Z<−zα/2)=α/2P(Z < -z_{\alpha/2}) = \alpha/2 .

12.3 Formula for a confidence interval for a proportion

The approximate 100(1−α)%100(1-\alpha)\%-confidence interval for a population proportion (pp) 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 :

  1. np^≥5n\hat{p} \ge 5 (at least 5 "successes" in the sample) .
  2. n(1−p^)≥5n(1-\hat{p}) \ge 5 (at least 5 "failures" in the sample) .

Tip: While the theoretical condition uses the unknown population proportion pp (np≥5np \ge 5 and n(1−p)≥5n(1-p) \ge 5), in practice, we use the sample proportion p^\hat{p} to check these conditions, as pp 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 .

  1. Identify sample size and sample proportion: n=5000n = 5000 . p^=0.64\hat{p} = 0.64 .

  2. Check conditions for normal approximation: np^=5000×0.64=3200≥5n\hat{p} = 5000 \times 0.64 = 3200 \ge 5 . n(1−p^)=5000×(1−0.64)=5000×0.36=1800≥5n(1-\hat{p}) = 5000 \times (1-0.64) = 5000 \times 0.36 = 1800 \ge 5 . The conditions are met.

  3. Calculate the estimated standard error: Estimated SE(P^)=0.64(1−0.64)5000=0.64×0.365000≈0.007\text{Estimated SE}(\hat{P}) = \sqrt{\frac{0.64(1-0.64)}{5000}} = \sqrt{\frac{0.64 \times 0.36}{5000}} \approx 0.007 .

  4. Determine the critical value: For a 95% confidence interval, zα/2=1.96z_{\alpha/2} = 1.96 .

  5. Calculate the margin of error: Margin of error (ee) = 1.96×0.007=0.01331.96 \times 0.007 = 0.0133 .

  6. Construct the confidence interval: p^±e=0.64±0.0133\hat{p} \pm e = 0.64 \pm 0.0133 . The approximate 95% confidence interval is [0.627,0.653][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−α)%100(1-\alpha)\%-confidence interval for a population proportion (pp) is an interval generated by a method that, over many repetitions, would produce intervals containing the true unknown population proportion pp approximately 100(1−α)%100(1-\alpha)\% 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−α)%100(1-\alpha)\% 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 (μ\mu) 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 (μ\mu). 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 XX represent the well-being score of a self-employed individual. The population mean is denoted by μ=E(X)\mu = E(X). We want to investigate if μ\mu is equal to 6.5 or not. If the sample mean (xˉn\bar{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 μ\mu 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

  1. Calculate a confidence interval: A confidence interval, typically at a 95% level, is calculated for μ\mu. 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 μ\mu. Values outside the interval are deemed unlikely for μ\mu 75.
  2. 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 (H0H_0). This implies that 6.5 is a plausible value for μ\mu, and we cannot conclude that μ≠6.5\mu \neq 6.5 76.
  • If the hypothesized value (e.g., 6.5) does not lie within the 95% CI, we reject the null hypothesis (H0H_0) and conclude that the alternative hypothesis (H1H_1) is true, meaning μ≠6.5\mu \neq 6.5. This suggests that 6.5 is an unlikely value for μ\mu 76.

13.3.3 Formalizing the hypotheses

For a two-sided test, the hypotheses are: H0:μ=hypothesized valueH_0: \mu = \text{hypothesized value} H1:μ≠hypothesized valueH_1: \mu \neq \text{hypothesized value} 76.

13.3.4 Significance level (α\alpha)

There is a probability of 5% that a 95% confidence interval will not contain the true population mean (μ\mu) even if μ\mu is equal to the hypothesized value. This means there's a 5% chance of incorrectly concluding that μ≠6.5\mu \neq 6.5 when it is actually 6.5. This probability is known as the significance level (α\alpha). Generally, the significance level α\alpha corresponds to a 100(1−α)%100(1-\alpha)\% confidence interval, meaning α=1−confidence level\alpha = 1 - \text{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\mu > \text{hypothesized value} or μ<hypothesized value\mu < \text{hypothesized value}) 78.
  • To perform tests at different significance levels (α\alpha), a corresponding confidence interval (e.g., a 100(1−α)%100(1-\alpha)\% 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 σ\sigma unknown, a 95% confidence interval for μ\mu 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.025sn≤6.5≤xˉn+tn−1,0.025sn\bar{x}_n - t_{n-1, 0.025} \frac{s}{\sqrt{n}} \le 6.5 \le \bar{x}_n + t_{n-1, 0.025} \frac{s}{\sqrt{n}} 79.

This inequality can be rearranged to: −tn−1,0.025≤xˉn−6.5s/n≤tn−1,0.025-t_{n-1, 0.025} \le \frac{\bar{x}_n - 6.5}{s/\sqrt{n}} \le t_{n-1, 0.025} 79 80.

This shows that 6.5 is within the 95% CI if the standardized test statistic xˉn−6.5s/n\frac{\bar{x}_n - 6.5}{s/\sqrt{n}} falls between −tn−1,0.025-t_{n-1, 0.025} and tn−1,0.025t_{n-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 (σ\sigma), the test statistic TT follows a tt-distribution with n−1n-1 degrees of freedom under the null hypothesis (H0:μ=μ0H_0: \mu = \mu_0): T=Xˉn−μ0S/n≈tn−1T = \frac{\bar{X}_n - \mu_0}{S/\sqrt{n}} \approx t_{n-1} 82.

Where:

  • Xˉn\bar{X}_n is the sample mean.
  • μ0\mu_0 is the hypothesized population mean.
  • SS is the sample standard deviation.
  • nn is the sample size.

Assuming H0H_0 is true (i.e., μ=6.5\mu = 6.5), the test statistic becomes: T=Xˉn−6.5S/n≈tn−1T = \frac{\bar{X}_n - 6.5}{S/\sqrt{n}} \approx t_{n-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:

  1. Check conditions: Verify if the necessary assumptions for the test are met 100 .
  2. Formulate hypotheses: State the null hypothesis (H0H_0) and the alternative hypothesis (H1H_1) 100 .
  3. Determine the test statistic: Identify the appropriate test statistic, its distribution under H0H_0, and calculate its observed value 100 .
  4. Calculate the p-value: Determine the p-value and compare it to a predetermined significance level (α\alpha) 100 .
  5. 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 (μ\mu) with an unknown population standard deviation (σ\sigma), 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⩾30n \geqslant 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⩾30n = 500 \geqslant 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 (H0H_0): 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 (H1H_1 or HaH_a): This hypothesis, also known as the research hypothesis, suggests that the population parameter's value lies in a different range, complementary to H0H_0. 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 μ\mu

For a two-sided test concerning a mean (μ\mu), the hypotheses are structured as follows : H0:μ=μ0H_0: \mu = \mu_0 versus H1:μ≠μ0H_1: \mu \neq \mu_0

14.3.2 Example of formulating hypotheses

For Example 6.3, the hypotheses were : H0:μ=6.5H_0: \mu = 6.5 versus H1:μ≠6.5H_1: \mu \neq 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 μ\mu with σ\sigma unknown

When testing a mean (μ\mu) with an unknown population standard deviation (σ\sigma), the test statistic is calculated as : T=Xˉn−μ0S/nT = \frac{\bar{X}_n - \mu_0}{S/\sqrt{n}} Under the null hypothesis (H0H_0), this statistic follows a t-distribution with n−1n-1 degrees of freedom (tn−1t_{n-1}), provided the variable is normally distributed or the sample size is sufficiently large (n⩾30n \geqslant 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=xˉn−μ0s/nt = \frac{\bar{x}_n - \mu_0}{s/\sqrt{n}}

14.4.3 Example of calculating the test value

For Example 6.3, the calculated test value was : t=6.634−6.51.479/500=2.026t = \frac{6.634 - 6.5}{1.479/\sqrt{500}} = 2.026

Tip: Because the test statistic under H0H_0 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∣)\text{P-value} = P(T > |t|) + P(T < -|t|) = 2P(T > |t|) where T∼(≈)H0tn−1T \sim (\approx) H_0 t_{n-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.026t = 2.026 and n=500n=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)P(T > 2.026) + P(T < -2.026) 99. From t-tables or statistical software, it is found that P(T>2.026)P(T > 2.026) is between 0.010 and 0.025 for n=100n=100 (or n=499n=499). Therefore, the p-value lies between 2×0.01=0.022 \times 0.01 = 0.02 and 2×0.025=0.052 \times 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 (α\alpha) .

14.6.1 Decision rule

A significance level (α\alpha) is set in advance. This α\alpha represents the maximum acceptable probability of committing a Type I error (rejecting a true null hypothesis) .

  • If the p-value is less than α\alpha (P-value < α\alpha), the null hypothesis (H0H_0) is rejected in favor of the alternative hypothesis (H1H_1) .
  • If the p-value is greater than or equal to α\alpha (P-value ⩾α\geqslant \alpha), the null hypothesis (H0H_0) is not rejected .

Tip: "Not rejecting H0H_0" does not mean H0H_0 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 μ\mu

  • If P-value < α\alpha, we reject the null hypothesis (H0H_0) at the α\alpha-significance level in favor of the alternative hypothesis (H1H_1), concluding that μ≠μ0\mu \neq \mu_0 .
  • If P-value ⩾α\geqslant \alpha, we do not reject the null hypothesis (H0H_0) at the α\alpha-significance level, meaning we cannot conclude that μ≠μ0\mu \neq \mu_0 .

14.6.3 Example of formulating a conclusion

Using Example 6.3, if α=0.05\alpha = 0.05 and the calculated p-value is between 0.02 and 0.05, then P-value < α\alpha. Therefore, we would reject the null hypothesis (H0H_0) at the 0.05 significance level and conclude that μ≠6.5\mu \neq 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 (μ\mu) of a normally distributed variable when the population standard deviation (σ\sigma) is unknown, focusing on one-sided tests .

15.1 Hypothesis formulation for one-sided tests

When investigating whether the population mean (μ\mu) is greater than or less than a specified value (μ0\mu_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 (H0H_0): μ⩽μ0\mu \leqslant \mu_0
  • Alternative hypothesis (H1H_1): μ>μ0\mu > \mu_0

The goal is to gather evidence to support the claim that μ\mu is indeed greater than μ0\mu_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 (H0H_0): μ⩾μ0\mu \geqslant \mu_0
  • Alternative hypothesis (H1H_1): μ<μ0\mu < \mu_0

The objective here is to find evidence suggesting that μ\mu is less than μ0\mu_0 .

Tip: Some textbooks may use H0:μ=μ0H_0: \mu = \mu_0 for both one-sided tests, with the direction of the inequality being exclusively defined by H1H_1 .

15.2 The t-distribution and test statistic

When the population standard deviation (σ\sigma) 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 σ\sigma, but it follows a t-distribution with n−1n-1 degrees of freedom under the null hypothesis .

15.2.1 Test statistic formula

The test statistic, denoted by TT, is calculated as: T=Xˉn−μ0S/nT = \frac{\bar{X}_n - \mu_0}{S/\sqrt{n}} where:

  • Xˉn\bar{X}_n is the sample mean .
  • μ0\mu_0 is the hypothesized population mean under the null hypothesis .
  • SS is the sample standard deviation .
  • nn is the sample size .

Under the null hypothesis (H0H_0), this test statistic follows a t-distribution with n−1n-1 degrees of freedom, often denoted as T∼H0tn−1T \stackrel{H_0}{\sim} t_{n-1} or approximately so, especially when nn is large (n≥30n \ge 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\mu > \mu_0), larger positive values of TT suggest that the true mean might be greater than μ0\mu_0 .
  • For a left-tailed test (μ<μ0\mu < \mu_0), smaller (more negative) values of TT indicate that the true mean might be less than μ0\mu_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)P(T > t), where T∼tn−1T \sim t_{n-1} and tt is the observed test statistic value .
  • Left-tailed test: The P-value is calculated as P(T<t)P(T < t), where T∼tn−1T \sim t_{n-1} and tt 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 (α\alpha):

  • If P-value ⩽α\leqslant \alpha: Reject the null hypothesis (H0H_0).
  • If P-value >α> \alpha: Fail to reject the null hypothesis (H0H_0).

Tip: A common significance level is α=0.05\alpha = 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\bar{x}_n) of 432 dollars and a sample standard deviation (ss) of 138 dollars. We want to determine if the average rental price is less than 500 dollars .

Steps:

  1. 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≥30n=38 \ge 30, the t-test is sufficiently accurate due to the CLT .
  • No significant outliers are present in the data .
  1. Formulate hypotheses: Since we want to test if μ<500\mu < 500, we set up a left-tailed test:
  • H0:μ⩾500H_0: \mu \geqslant 500 dollars
  • H1:μ<500H_1: \mu < 500 dollars where μ\mu is the average rental price of student housing in Leuven .
  1. Calculate the test statistic: Using the formula for the t-test statistic with μ0=500\mu_0 = 500: t=xˉn−μ0s/n=432−500138/38t = \frac{\bar{x}_n - \mu_0}{s/\sqrt{n}} = \frac{432 - 500}{138/\sqrt{38}} t≈−3.04t \approx -3.04 The degrees of freedom are n−1=38−1=37n-1 = 38-1 = 37 .

  2. Calculate the (approximate) P-value: For a left-tailed test, the P-value is P(T<−3.04)P(T < -3.04), where T∼t37T \sim t_{37}. Looking at a t-table for 37 degrees of freedom, we find that values around t=2.750t=2.750 correspond to a tail probability of 0.0050.005. Since ∣−3.04∣>∣2.750∣|-3.04| > |2.750|, the probability P(T<−3.04)P(T < -3.04) is smaller than 0.0050.005 .

  3. Make a decision: The P-value is less than 0.0050.005, which is smaller than the significance level of α=0.05\alpha = 0.05 (5%). Therefore, we reject H0H_0 at the 5% significance level .

  4. 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:

  1. Formulate hypotheses: For testing if μ>500\mu > 500:
  • H0:μ⩽500H_0: \mu \leqslant 500 dollars
  • H1:μ>500H_1: \mu > 500 dollars The statement you want to prove or conclude is placed in H1H_1 .
  1. Test statistic: The test value remains the same as calculated before: t=−3.04t = -3.04 .

  2. P-value calculation: For a right-tailed test, the P-value would be P(T>−3.04)P(T > -3.04) where T∼t37T \sim t_{37}. 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 (H1H_1).

  3. Decision and Conclusion: Since the P-value will be much larger than any reasonable α\alpha (e.g., 0.05), we would fail to reject H0H_0. 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 (μ\mu) when the population standard deviation (σ\sigma) is unknown, focusing on the use of the t-distribution.

16.1 The t-distribution and its role

When the population standard deviation (σ\sigma) is unknown, and we are testing hypotheses about the population mean (μ\mu), we use the t-distribution instead of the standard normal (Z) distribution. The t-distribution is used because the sample standard deviation (SS) 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−1n-1, where nn 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 μ\mu, the null hypothesis (H0H_0) typically states that the mean is equal to a specific value (μ0\mu_0) or lies within a certain range, while the alternative hypothesis (H1H_1) states the opposite, indicating a difference or a specific direction of difference .

  • Two-sided test: H0:μ=μ0H_0: \mu = \mu_0 versus H1:μ≠μ0H_1: \mu \neq \mu_0
  • Right-sided test: H0:μ≤μ0H_0: \mu \le \mu_0 versus H1:μ>μ0H_1: \mu > \mu_0 .
  • Left-sided test: H0:μ≥μ0H_0: \mu \ge \mu_0 versus H1:μ<μ0H_1: \mu < \mu_0 .

Tip: Always place the claim you want to demonstrate or conclude into the alternative hypothesis (H1H_1) .

16.2.2 Test statistic

The test statistic for a t-test about the mean with unknown standard deviation is calculated as follows:

T=Xˉ−μ0S/nT = \frac{\bar{X} - \mu_0}{S/\sqrt{n}}

where:

  • Xˉ\bar{X} is the sample mean .
  • μ0\mu_0 is the hypothesized population mean under the null hypothesis .
  • SS is the sample standard deviation .
  • nn is the sample size .

This test statistic follows a t-distribution with n−1n-1 degrees of freedom under the null hypothesis, denoted as T∼tn−1T \sim t_{n-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:μ≠μ0H_1: \mu \neq \mu_0 (two-sided test): The P-value is 2×P(T>∣t∣)2 \times P(T > |t|), where tt is the calculated test statistic and T∼tn−1T \sim t_{n-1}. This accounts for extreme values in both tails of the distribution .
  • For H1:μ>μ0H_1: \mu > \mu_0 (right-sided test): The P-value is P(T>t)P(T > t), where tt is the calculated test statistic and T∼tn−1T \sim t_{n-1}. This measures the probability of observing a value greater than tt .
  • For H1:μ<μ0H_1: \mu < \mu_0 (left-sided test): The P-value is P(T<t)P(T < t), where tt is the calculated test statistic and T∼tn−1T \sim t_{n-1}. This measures the probability of observing a value less than tt .

Example: If the calculated test statistic is t=−3.04t = -3.04 with 3737 degrees of freedom, for a left-sided test (H1:μ<500H_1: \mu < 500), the P-value is P(T<−3.04)P(T < -3.04). For a right-sided test (H1:μ>500H_1: \mu > 500) with the same test statistic and degrees of freedom, the P-value is P(T>−3.04)=1−P(T<−3.04)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 (α\alpha).

  • If P-value ≤α\le \alpha, reject H0H_0.
  • If P-value >α> \alpha, fail to reject H0H_0.

Tip: When interpreting results, state clearly that you "reject H0H_0" or "fail to reject H0H_0" at a specific significance level. Avoid stating that you "accept H0H_0".

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:μ≥500H_0: \mu \ge 500 versus H1:μ<500H_1: \mu < 500. If the P-value is less than 0.005 and the significance level is 0.05, H0H_0 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:μ≤500H_0: \mu \le 500 versus H1:μ>500H_1: \mu > 500. If the calculated test statistic is t=−3.04t = -3.04 with 37 degrees of freedom, the P-value is P(T>−3.04)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), H0H_0 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.27t = 2.27 .

  • Right-sided test: For H1:μ>3H_1: \mu > 3, the P-value is P(T>2.27)P(T > 2.27) with T∼t68T \sim t_{68}. 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:μ<3H_1: \mu < 3, the P-value is P(T<2.27)P(T < 2.27). This is calculated as 1−P(T>2.27)1 - P(T > 2.27). Since P(T>2.27)P(T > 2.27) is between 0.01 and 0.025, P(T<2.27)P(T < 2.27) is between 1−0.0251 - 0.025 and 1−0.011 - 0.01, meaning it falls between 0.975 and 0.99 .
  • Two-sided test: For H1:μ≠3H_1: \mu \neq 3, the P-value is 2×P(T>∣2.27∣)=2×P(T>2.27)2 \times P(T > |2.27|) = 2 \times P(T > 2.27). Since P(T>2.27)P(T > 2.27) is between 0.01 and 0.025, the P-value for the two-sided test is between 2×0.012 \times 0.01 and 2×0.0252 \times 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 :

  1. Check conditions: Ensure the assumptions required for the test are met .
  2. Formulate hypotheses: State the null hypothesis (H0H_0) and the alternative hypothesis (H1H_1) .
  3. Determine the test statistic and its distribution under H0H_0: Calculate the value of the test statistic using sample data and understand its behavior assuming the null hypothesis is true .
  4. Calculate the p-value and compare it to the significance level (α\alpha): Determine the probability of observing test results as extreme as, or more extreme than, the sample results if H0H_0 were true, and compare this to the pre-determined significance level .
  5. Formulate a nuanced conclusion: Based on the comparison in step 4, decide whether to reject or fail to reject H0H_0 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^\hat{P}) can be approximated by a normal distribution. This is typically checked by ensuring that np0≥5np_0 \ge 5 and n(1−p0)≥5n(1 - p_0) \ge 5, where nn is the sample size and p0p_0 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≤p0H_0: p \le p_0
  • H1:p>p0H_1: p > p_0
  • Left-tailed test:
  • H0:p≥p0H_0: p \ge p_0
  • H1:p<p0H_1: p < p_0
  • Two-tailed test:
  • H0:p=p0H_0: p = p_0
  • H1:p≠p0H_1: p \ne p_0

Here, pp represents the true population proportion, and p0p_0 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=P^−p0p0(1−p0)nZ = \frac{\hat{P} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}} where:

  • P^\hat{P} is the sample proportion.

  • p0p_0 is the hypothesized population proportion under H0H_0.

  • nn is the sample size.

  • Distribution under H0H_0: If H0H_0 is true, the test statistic ZZ is approximately standard normally distributed (Z∼N(0,1)Z \sim N(0, 1)), provided that np0≥5np_0 \ge 5 and n(1−p0)≥5n(1 - p_0) \ge 5 .

  • Test value calculation: The observed test value, denoted by zz, is calculated using the sample proportion (p^\hat{p}) : z=p^−p0p0(1−p0)nz = \frac{\hat{p} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}

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 (zz) if the null hypothesis were true. The calculation depends on the type of test :

  • Right-tailed test: P-value=P(Z>z)P\text{-value} = P(Z > z) .
  • Left-tailed test: P-value=P(Z<z)P\text{-value} = P(Z < z) .
  • Two-tailed test: P-value=2P(Z>∣z∣)P\text{-value} = 2P(Z > |z|) .

where Z∼N(0,1)Z \sim 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 (α\alpha) .

  • If the p-value is less than α\alpha ( P-value<αP\text{-value} < \alpha ), then H0H_0 is rejected at the α\alpha significance level, and the alternative hypothesis (H1H_1) is accepted .
  • If the p-value is greater than or equal to α\alpha ( P-value≥αP\text{-value} \ge \alpha ), then H0H_0 is not rejected at the α\alpha significance level .

It is crucial to remember that failing to reject H0H_0 does not prove H0H_0 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=p0H_0: p = p_0 .

Alternative Hypothesis (H1H_1)Test Statistic (ZZ)P-value Calculation
p≠p0p \ne p_0 (Two-tailed)Z=P^−p0p0(1−p0)nZ = \frac{\hat{P} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}$2P(Z >
p>p0p > p_0 (Right-tailed)Z=P^−p0p0(1−p0)nZ = \frac{\hat{P} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}P(Z>z)P(Z > z)
p<p0p < p_0 (Left-tailed)Z=P^−p0p0(1−p0)nZ = \frac{\hat{P} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}P(Z<z)P(Z < z)

These calculations are valid if np0≥5np_0 \ge 5 and n(1−p0)≥5n(1-p_0) \ge 5, and Z∼N(0,1)Z \sim N(0, 1) under H0H_0 .

17.8 Motivating example: Victimization of refugees

Consider a study where a sample of n=50n=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 .

  1. Hypotheses:
  • H0:p≤0.80H_0: p \le 0.80
  • H1:p>0.80H_1: p > 0.80 where pp is the proportion of all refugees who have been victims of sexual violence .
  1. Conditions:
  • Random sample: Given .
  • Binary outcome: "Victim of sexual violence" (yes/no) .
  • Large sample: np0=50×0.80=40≥5n p_0 = 50 \times 0.80 = 40 \ge 5 and n(1−p0)=50×0.20=10≥5n(1 - p_0) = 50 \times 0.20 = 10 \ge 5 .
  1. Test statistic and value:
  • Test statistic: Z=P^−p0p0(1−p0)nZ = \frac{\hat{P} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}
  • Test value: z=0.84−0.800.80(1−0.80)50=0.040.1650=0.040.0032=0.040.0566≈0.71z = \frac{0.84 - 0.80}{\sqrt{\frac{0.80(1-0.80)}{50}}} = \frac{0.04}{\sqrt{\frac{0.16}{50}}} = \frac{0.04}{\sqrt{0.0032}} = \frac{0.04}{0.0566} \approx 0.71 .
  1. P-value: This is a right-tailed test.
  • P-value=P(Z>0.71)=1−P(Z<0.71)P\text{-value} = P(Z > 0.71) = 1 - P(Z < 0.71)
  • Using a standard normal table, P(Z<0.71)≈0.761P(Z < 0.71) \approx 0.761.
  • P-value=1−0.761=0.239P\text{-value} = 1 - 0.761 = 0.239 .
  1. Conclusion:
  • Let α=0.05\alpha = 0.05.
  • Since P-value=0.239≥α=0.05P\text{-value} = 0.239 \ge \alpha = 0.05, we fail to reject H0H_0 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 .

  1. Hypotheses:
  • H0:p=0.102H_0: p = 0.102
  • H1:p≠0.102H_1: p \ne 0.102 where pp is the true probability that the number 39 appears in a British lottery draw .
  1. Conditions:
  • Random sample: Given .
  • Binary outcome: "Number 39 appears in a draw" (yes/no) .
  • Large sample: np0=100×0.102=10.2≥5n p_0 = 100 \times 0.102 = 10.2 \ge 5 and n(1−p0)=100×0.898=89.8≥5n(1 - p_0) = 100 \times 0.898 = 89.8 \ge 5 .
  1. Test statistic and value:
  • Test statistic: Z=P^−p0p0(1−p0)nZ = \frac{\hat{P} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}
  • Test value: z=0.17−0.1020.102(1−0.102)100=0.0680.102(0.898)100=0.0680.091596100=0.0680.00091596=0.0680.03026≈2.24z = \frac{0.17 - 0.102}{\sqrt{\frac{0.102(1-0.102)}{100}}} = \frac{0.068}{\sqrt{\frac{0.102(0.898)}{100}}} = \frac{0.068}{\sqrt{\frac{0.091596}{100}}} = \frac{0.068}{\sqrt{0.00091596}} = \frac{0.068}{0.03026} \approx 2.24 .
  1. P-value: This is a two-tailed test.
  • P-value=2P(Z>∣2.24∣)=2P(Z>2.24)P\text{-value} = 2P(Z > |2.24|) = 2P(Z > 2.24)
  • P(Z>2.24)=1−P(Z<2.24)P(Z > 2.24) = 1 - P(Z < 2.24)
  • Using a standard normal table, P(Z<2.24)≈0.987P(Z < 2.24) \approx 0.987.
  • P(Z>2.24)=1−0.987=0.013P(Z > 2.24) = 1 - 0.987 = 0.013.
  • P-value=2×0.013=0.026P\text{-value} = 2 \times 0.013 = 0.026 .
  1. Conclusion:
  • Let α=0.05\alpha = 0.05.
  • Since P-value=0.026<α=0.05P\text{-value} = 0.026 < \alpha = 0.05, we reject H0H_0 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 (H0H_0) is rejected, but in reality, H0H_0 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 α\alpha, which is the significance level of the test. This probability is expressed as : α=P(reject H0∣H0 is true)\alpha = P(\text{reject } H_0 \mid H_0 \text{ is true})

Researchers cannot know if H0H_0 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 α\alpha in advance. If the consequences of wrongly rejecting the null hypothesis are severe, a smaller α\alpha 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 (H0H_0) is not rejected, but in reality, H0H_0 is false. The probability of this error is denoted by β\beta. This probability is expressed as : β=P(do not reject H0∣H0 is false)\beta = P(\text{do not reject } H_0 \mid H_0 \text{ is false})

The likelihood of a Type II error depends on the extent to which H0H_0 is false. A small relative deviation from H0H_0 will result in a higher probability of a Type II error compared to a large relative deviation. Specifically, if H0:μ=μ0H_0: \mu = \mu_0 is not rejected while in reality μ=μ1\mu = \mu_1 is true, the chance of a Type II error increases as μ1\mu_1 gets closer to μ0\mu_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\bar{X}_n) leads to a smaller β\beta. 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 H0H_0Do not reject H0H_0
H0H_0 is trueType I error (α\alpha)No error
H0H_0 is falseNo errorType II error (β\beta)

This table also highlights the relationship between the significance level (α\alpha), the confidence level (1−α1-\alpha), the probability of a Type II error (β\beta), and the power of the test (1−β1-\beta) .

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 α\alpha

Setting the significance level α\alpha before conducting the hypothesis test predetermines the maximum probability of a Type I error. Common values for α\alpha are 0.1, 0.05, or 0.01 .

Choosing α\alpha involves a trade-off:

  • A very small α\alpha 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 α\alpha 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 α\alpha) might catch most infractions but also call fouls incorrectly (high β\beta). A referee who is hesitant to blow the whistle (high α\alpha) will rarely make incorrect calls but might miss some actual infractions (low β\beta).

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 (μ\mu). This 5% mirrors the α\alpha 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 (μ)(\mu), 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)(\mu_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 (μ)(\mu) using a sample mean (Xˉn)(\bar{X}_n) and sample standard deviation (S)(S), and assuming the sample size is sufficiently large or the population is normally distributed, the test statistic TT follows a t-distribution with n−1n-1 degrees of freedom under the null hypothesis 82:

T=Xˉn−μ0S/n≈tn−1T = \frac{\bar{X}_n - \mu_0}{S/\sqrt{n}} \approx t_{n-1}

Here, μ0\mu_0 is the value specified in the null hypothesis Xˉn\bar{X}_n is the sample mean, SS is the sample standard deviation, and nn is the sample size. The calculated value of this test statistic from a given sample is called the test value (t)(t) 91.

19.1.3 Understanding extreme values in a t-distribution

For a t-distribution with n−1n-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−1t_{\alpha/2, n-1}, the probability of observing a value greater than it is P(T>tα/2,n−1)=α/2P(T > t_{\alpha/2, n-1}) = \alpha/2 83.
  • For a negative critical value −tα/2,n−1-t_{\alpha/2, n-1}, the probability of observing a value less than it is P(T<−tα/2,n−1)=α/2P(T < -t_{\alpha/2, n-1}) = \alpha/2 83.

In a two-sided test with a significance level of α=0.05\alpha = 0.05, this means that P(T>t0.025,n−1)=0.025P(T > t_{0.025, n-1}) = 0.025 and P(T<−t0.025,n−1)=0.025P(T < -t_{0.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)(t) is in relation to the null distribution of the test statistic (T)(T) 92.

19.2.1 P-value for positive test values

If the calculated test value (t)(t) is positive, it is considered "extreme" if it is greater than the critical value tn−1,0.025t_{n-1, 0.025}. The probability of observing a value of TT greater than this positive tt is P(T>t)P(T > t). For a two-sided test, the p-value is twice this probability: 2P(T>t)2P(T > t). This accounts for the possibility of an equally extreme result in the opposite direction (i.e., a value less than −t-t). (#page=84, 85) If 2P(T>t)2P(T > t) is less than the significance level (α=0.05)(\alpha = 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)(t) is negative, it is considered "extreme" if it is less than the critical value −tn−1,0.025-t_{n-1, 0.025}. The probability of observing a value of TT less than this negative tt is P(T<t)P(T < t). For a two-sided test, the p-value is 2P(T<t)2P(T < t). Due to the symmetry of the t-distribution, this is equivalent to 2P(T>−t)2P(T > -t), where −t-t is the positive absolute value of the test statistic. (#page=86, 87) If 2P(T<t)2P(T < t) is less than the significance level (α=0.05)(\alpha = 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∣)(|t|) 88:

P-value=2P(T>∣t∣)P\text{-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)(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 (α)(\alpha), which is the probability of incorrectly rejecting the null hypothesis 91.

  • If the p-value ≥α\geq \alpha: We do not reject the null hypothesis at the α\alpha significance level. This suggests that the observed data are not sufficiently unusual to conclude that the null hypothesis is false. The hypothesized value (μ0)(\mu_0) is considered a plausible value for the population parameter 90.
  • If the p-value <α< \alpha: We reject the null hypothesis at the α\alpha 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)(\mu_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.5H_0: \mu = 6.5 versus H1:μ≠6.5H_1: \mu \neq 6.5 for the average well-being score of self-employed individuals in Belgium 94. The test statistic is T=Xˉn−μ0S/nT = \frac{\bar{X}_n - \mu_0}{S/\sqrt{n}}, which follows approximately a t499t_{499} distribution under H0H_0 94. The calculated test value from a sample is t=2.026t = 2.026 94.

To find the p-value, we need to calculate 2P(T>∣2.026∣)2P(T > |2.026|) where T≈t499T \approx t_{499} 95. Since n−1=499n-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=100df=100:

  • t0.025,100≈1.984t_{0.025, 100} \approx 1.984
  • t0.010,100≈2.364t_{0.010, 100} \approx 2.364

Since 1.984<2.026<2.3641.984 < 2.026 < 2.364, we know that: P(T>1.984)>P(T>2.026)>P(T>2.364)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.025P(T > 1.984) = 0.025 and P(T>2.364)=0.010P(T > 2.364) = 0.010. (#page=96, 97) 96 97. Therefore, P(T>2.026)P(T > 2.026) lies between 0.0100.010 and 0.0250.025 98.

The p-value is 2P(T>2.026)2P(T > 2.026), which lies between 2×0.010=0.022 \times 0.010 = 0.02 and 2×0.025=0.052 \times 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 - α\alpha)% CI, we determine a critical value from a probability distribution that leaves α\alpha/2 area in each tail 45.

20.1.1 The z-distribution for known sigma

When the population standard deviation (σ\sigma) is known, and the variable is normally distributed or the sample size is large (n ≥\ge 30) due to the Central Limit Theorem, the confidence interval for the population mean (μ\mu) is constructed using the standard normal (z) distribution 46.

The formula for a 100(1 - α\alpha)% CI is: [xˉn−zα/2σn,xˉn+zα/2σn][\bar{x}_n - z_{\alpha/2} \frac{\sigma}{\sqrt{n}}, \bar{x}_n + z_{\alpha/2} \frac{\sigma}{\sqrt{n}}] where:

  • xˉn\bar{x}_n is the sample mean 46.
  • σ\sigma is the population standard deviation 46.
  • nn is the sample size 46.
  • zα/2z_{\alpha/2} is the critical z-value such that the area to its right is α\alpha/2. This value is found such that P(−zα/2≤Z≤zα/2)=1−αP(-z_{\alpha/2} \le Z \le z_{\alpha/2}) = 1 - \alpha 45 46.

This interval can be expressed as: [point estimate ±\pm z critical value ×\times standard error 46.

Example: For a 99% CI with a sample mean (xˉn\bar{x}_n) of 6.634, a population standard deviation (σ\sigma) of 1.4, and a sample size (nn) of 500:

  • α=1−0.99=0.01\alpha = 1 - 0.99 = 0.01 47.
  • zα/2=z0.005=2.58z_{\alpha/2} = z_{0.005} = 2.58 47 49.
  • The standard error is σn=1.4500≈0.063\frac{\sigma}{\sqrt{n}} = \frac{1.4}{\sqrt{500}} \approx 0.063 47.
  • The margin of error (ee) is zα/2×σn=2.58×0.063≈0.162z_{\alpha/2} \times \frac{\sigma}{\sqrt{n}} = 2.58 \times 0.063 \approx 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][\bar{x}_n - e, \bar{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\bar{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\bar{x}_n + margin of error
  • Lower bound = xˉn\bar{x}_n - margin of error
  • Width = (Upper bound) - (Lower bound) = 2×2 \times 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 - α\alpha) 52.
  • The population standard deviation (σ\sigma) 52.
  • The sample size (nn) 52.

20.2 When the population variance is unknown (σ\sigma unknown)

In most practical scenarios, the population standard deviation (σ\sigma) is unknown. In such cases, it is estimated using the sample standard deviation (ss). This leads to an estimated standard error (sf=sns_f = \frac{s}{\sqrt{n}}) 54.

20.2.1 The Student t-distribution

When σ\sigma is unknown, the distribution of the statistic Xˉn−μS/n\frac{\bar{X}_n - \mu}{S/\sqrt{n}} is no longer a standard normal distribution. Instead, it follows a Student t-distribution with n−1n-1 degrees of freedom, denoted as tn−1t_{n-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≥30n \ge 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 (rr) 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.

t-distribution densities 57.

20.2.2 Critical t-values

To construct a 100(1 - α\alpha)% CI using the t-distribution, we need critical t-values (tn−1,α/2t_{n-1, \alpha/2}) such that the area in the tail to the right of tn−1,α/2t_{n-1, \alpha/2} is α\alpha/2 (and similarly for the left tail). These values can be found in t-tables 58 59.

P(T>tn−1,α/2)=α2P(T > t_{n-1, \alpha/2}) = \frac{\alpha}{2} P(T<−tn−1,α/2)=α2P(T < -t_{n-1, \alpha/2}) = \frac{\alpha}{2} where T∼tn−1T \sim t_{n-1} 58.

Example of a t-table excerpt:

rr0.5000.2500.1000.0500.0250.0100.005
10.0001.0003.0786.31412.70631.82163.656
20.0000.8161.8862.9204.3036.9659.925
30.0000.7651.6382.3533.1824.5415.841
⋮\vdots⋮\vdots⋮\vdots⋮\vdots⋮\vdots⋮\vdots⋮\vdots⋮\vdots
370.0000.6831.3131.7012.0482.4672.763
∞\infty0.0000.6741.2821.6451.9602.3262.576

20.2.3 Constructing the confidence interval

When the population standard deviation (σ\sigma) is unknown, the (approximate) 100(1 - α\alpha)% CI for the population mean (μ\mu) is: [xˉn−tn−1,α/2sn,xˉn+tn−1,α/2sn][\bar{x}_n - t_{n-1, \alpha/2} \frac{s}{\sqrt{n}}, \bar{x}_n + t_{n-1, \alpha/2} \frac{s}{\sqrt{n}}] where:

  • xˉn\bar{x}_n is the sample mean 61.
  • ss is the sample standard deviation 61.
  • nn is the sample size 61.
  • tn−1,α/2t_{n-1, \alpha/2} is the critical t-value from the t-distribution with n−1n-1 degrees of freedom 61.

This formula is always valid if the population follows a normal distribution. For large samples (n≥30n \ge 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 σ\sigma, 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=38n=38 observations, a sample mean (xˉn\bar{x}_n) of 432 euros, and a sample standard deviation (ss) of 138 euros:

  • n−1=38−1=37n-1 = 38-1 = 37 64.
  • α=1−0.99=0.01\alpha = 1 - 0.99 = 0.01, so α/2=0.005\alpha/2 = 0.005 64.
  • The estimated standard error is sn=13838≈22.39\frac{s}{\sqrt{n}} = \frac{138}{\sqrt{38}} \approx 22.39 64.
  • From the t-table, t37,0.005t_{37, 0.005} is approximately t30,0.005=2.750t_{30, 0.005} = 2.750 65 66.
  • The margin of error (ee) is tn−1,α/2×sn=2.750×22.39≈61.56t_{n-1, \alpha/2} \times \frac{s}{\sqrt{n}} = 2.750 \times 22.39 \approx 61.56 66.
  • The 99% CI is [xˉn−e,xˉn+e=[432−61.56,432+61.56=[370.44,493.56][\bar{x}_n - e, \bar{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 (σ\sigma known)

When sampling from a normal distribution with a known population standard deviation σ\sigma, the sampling distribution of the sample mean Xˉn\bar{X}_n is normal with mean μ\mu and standard deviation σ/n\sigma/\sqrt{n}. The Z-score is used to determine the margin of error. The relationship is given by Z=Xˉn−μσ/nZ = \frac{\bar{X}_n - \mu}{\sigma/\sqrt{n}}, which follows a standard normal distribution N(0,1)N(0, 1) 22 24.

To construct a 95% confidence interval, we find a zz-value such that the area between −z-z and zz is 0.95. This zz-value is denoted as zα/2z_{\alpha/2} and for α=0.05\alpha = 0.05, z0.025=1.96z_{0.025} = 1.96 (#page=25,page=26). This means there's a 95% probability that the sample mean Xˉn\bar{X}_n deviates from the population mean μ\mu by at most 1.96×(σ/n)1.96 \times (\sigma/\sqrt{n}) 25 26 27.

The margin of error (ee) is defined as: e=zα/2×σne = z_{\alpha/2} \times \frac{\sigma}{\sqrt{n}} For a 95% confidence interval when σ\sigma is known, the interval is: [xˉn−1.96σn,xˉn+1.96σn][\bar{x}_n - 1.96 \frac{\sigma}{\sqrt{n}}, \bar{x}_n + 1.96 \frac{\sigma}{\sqrt{n}}] 29.

If the sample is not from a normal distribution but nn is sufficiently large (n≥30n \ge 30), the Central Limit Theorem (CLT) allows us to use an approximate normal distribution for Xˉn\bar{X}_n, resulting in an approximate confidence interval 30.

21.2.1 Example: Known variance

Consider a sample of n=500n=500 with a sample mean xˉn=6.634\bar{x}_n = 6.634 and a known population standard deviation σ=1.4\sigma = 1.4. The standard error is σ/n=1.4/500≈0.063\sigma/\sqrt{n} = 1.4/\sqrt{500} \approx 0.063. For a 95% confidence interval, z0.025=1.96z_{0.025} = 1.96. The margin of error is e=1.96×0.063≈0.123e = 1.96 \times 0.063 \approx 0.123. The 95% confidence interval is [6.634−0.123,6.634+0.123=[6.511,6.757][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 μ\mu (#page=32,page=33). It is crucial to understand that the population mean μ\mu 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 μ\mu 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−α1 - \alpha (or 100(1−α)%100(1 - \alpha)\%), the zz-value used is zα/2z_{\alpha/2}. This zz-value is such that the area to its right is α/2\alpha/2, and the area between −zα/2-z_{\alpha/2} and zα/2z_{\alpha/2} is 1−α1 - \alpha (#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α/2σn,xˉn+zα/2σn][\bar{x}_n - z_{\alpha/2} \frac{\sigma}{\sqrt{n}}, \bar{x}_n + z_{\alpha/2} \frac{\sigma}{\sqrt{n}}] 46.

21.4.1 Example: General confidence level

Continuing the example with xˉn=6.634\bar{x}_n = 6.634, σ=1.4\sigma = 1.4, and n=500n=500. For a 99% confidence interval (1−α=0.991 - \alpha = 0.99, so α=0.01\alpha = 0.01), α/2=0.005\alpha/2 = 0.005. The zz-value z0.005z_{0.005} is found to be approximately 2.58 (#page=47,page=48,page=49). The standard error remains 0.0630.063. The margin of error is e=2.58×0.063≈0.162e = 2.58 \times 0.063 \approx 0.162. The 99% confidence interval is [6.634−0.162,6.634+0.162=[6.472,6.800][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

  1. Symmetry: The confidence interval is always symmetric around the sample mean xˉn\bar{x}_n 51.
  2. Width: The width of the confidence interval is twice the margin of error: 2×e2 \times e (#page=51,page=52) 51 52.
  3. Factors affecting margin of error: The margin of error depends on the confidence level (1−α1 - \alpha), the population standard deviation (σ\sigma), and the sample size (nn): e=zα/2σne = z_{\alpha/2} \frac{\sigma}{\sqrt{n}} 52.

21.6 Confidence interval for the mean of a normal variable when the population variance is unknown (σ\sigma unknown)

In most practical situations, σ\sigma is unknown and is estimated by the sample standard deviation ss. The estimated standard error is s/ns/\sqrt{n}. When σ\sigma is unknown, the quantity Xˉn−μs/n\frac{\bar{X}_n - \mu}{s/\sqrt{n}} does not follow a standard normal distribution but rather a Student's t-distribution with n−1n-1 degrees of freedom (df=n−1df = n-1), denoted as tn−1t_{n-1}. This holds if the population is normally distributed, or for large sample sizes (n≥30n \ge 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−1r = 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−α)%100(1 - \alpha)\%-CI, we need t-values denoted as tn−1,α/2t_{n-1, \alpha/2}, which satisfy P(T>tn−1,α/2)=α/2P(T > t_{n-1, \alpha/2}) = \alpha/2 where TT follows a tt-distribution with n−1n-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 σ\sigma is unknown, the (1−α)(1 - \alpha) or 100(1−α)%100(1 - \alpha)\%-confidence interval for μ\mu is given by: [xˉn−tn−1,α/2sn,xˉn+tn−1,α/2sn][\bar{x}_n - t_{n-1, \alpha/2} \frac{s}{\sqrt{n}}, \bar{x}_n + t_{n-1, \alpha/2} \frac{s}{\sqrt{n}}] 61.

This interval is generally wider than the one calculated with a known σ\sigma 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≥30n \ge 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=38n=38 giving a sample mean rental price xˉn=432\bar{x}_n = 432 euros and a sample standard deviation s=138s = 138 euros. We want to calculate a 99% confidence interval 63. Here, n=38≥30n=38 \ge 30, and the data appears to have no strong outliers 64. The estimated standard error is s/n=138/38≈22.39s/\sqrt{n} = 138/\sqrt{38} \approx 22.39 64. For a 99% CI, α=0.01\alpha = 0.01, so α/2=0.005\alpha/2 = 0.005. The degrees of freedom are n−1=37n-1 = 37. Looking up t37,0.005t_{37, 0.005} in a t-table, we find it's approximately 2.7502.750 (often approximated by t30,0.005t_{30, 0.005} or t60,0.005t_{60, 0.005} if t37t_{37} 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.56e = 2.750 \times 22.39 \approx 61.56 euros. The 99% confidence interval is [432−61.56,432+61.56=[370.44,493.56][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\bar{x}_n = 6.634, s=1.479s = 1.479, and n=500n = 500. For a 95% confidence interval: n=500n=500 is large enough for the CLT. Degrees of freedom n−1=499n-1 = 499. α/2=0.025\alpha/2 = 0.025. The t-value t499,0.025t_{499, 0.025} is very close to z0.025z_{0.025}. Approximations like t100,0.025≈1.984t_{100, 0.025} \approx 1.984 are used (#page=67,page=68) 67 68. The standard error is s/n=1.479/500≈0.066s/\sqrt{n} = 1.479/\sqrt{500} \approx 0.066. The margin of error is e=1.984×0.066≈0.131e = 1.984 \times 0.066 \approx 0.131. The approximate 95% confidence interval is [6.634−0.131,6.634+0.131=[6.503,6.765][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^\hat{P}: A point estimator for the population proportion pp, with p^\hat{p} as the point estimate 9.
  • Xˉn\bar{X}_n: A point estimator for the population mean μ\mu, with xˉn\bar{x}_n as the point estimate 9.
  • S2S^2: A point estimator for the population variance σ2\sigma^2, with s2s^2 as the point estimate 9.
  • SS: A point estimator for the population standard deviation σ\sigma, with ss as the point estimate 9.

22.2.3 Properties of good point estimators

A good point estimator possesses two key properties:

  1. 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.
  • E(P^)=pE(\hat{P}) = p 10.
  • E(Xˉn)=μE(\bar{X}_n) = \mu 10.
  • E(S2)=σ2E(S^2) = \sigma^2 10.

Tip: The formula for sample variance (S2S^2) divides by n−1n-1 precisely to ensure it is an unbiased estimator of the population variance σ2\sigma^2 10.

  1. 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 (μ\mu) 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\bar{x}_n = 6.634) and sample standard deviation (s=1.479s = 1.479) from a sample of n=500n=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][\bar{x}_n - e, \bar{x}_n + e] such that P(Xˉn−e<μ<Xˉn+e)=0.95P(\bar{X}_n - e < \mu < \bar{X}_n + e) = 0.95. The margin of error (ee) is determined by the distribution of the sample mean (Xˉn\bar{X}_n) 21 22.

22.5.2 Case 1: Population variance (σ2\sigma^2) is known

If the population standard deviation (σ\sigma) is known, we can use the Z-distribution. The standardized sample mean follows a standard normal distribution: Z=Xˉn−μσ/n∼N(0,1)Z = \frac{\bar{X}_n - \mu}{\sigma/\sqrt{n}} \sim N(0, 1) 24.

For a 95% confidence interval, we find the z-value such that the area between −z-z and zz is 0.95. This value is z0.025=1.96z_{0.025} = 1.96, meaning P(−1.96≤Z≤1.96)=0.95P(-1.96 \le Z \le 1.96) = 0.95 24 26.

The margin of error (ee) for a 95% CI when σ\sigma is known is: e=1.96×standard error=1.96×σne = 1.96 \times \text{standard error} = 1.96 \times \frac{\sigma}{\sqrt{n}} 27 29.

The 95% confidence interval for μ\mu is: [xˉn−1.96σn,xˉn+1.96σn][\bar{x}_n - 1.96 \frac{\sigma}{\sqrt{n}}, \bar{x}_n + 1.96 \frac{\sigma}{\sqrt{n}}] 29.

If the population is not normal but the sample size (nn) is sufficiently large (n≥30n \ge 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\bar{x}_n = 6.634 with n=500n=500 and a known σ=1.4\sigma = 1.4: Standard error = 1.4500≈0.063\frac{1.4}{\sqrt{500}} \approx 0.063 31. Margin of error (ee) = 1.96×0.063≈0.1231.96 \times 0.063 \approx 0.123 31. The approximate 95% CI is [6.634−0.123,6.634+0.123=[6.511,6.757][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 μ\mu falls within the specific interval calculated, as μ\mu 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 - α\alpha)

For a general confidence level of 100(1−α)%100(1 - \alpha)\%, we use the critical z-value zα/2z_{\alpha/2}, where P(Z>zα/2)=α/2P(Z > z_{\alpha/2}) = \alpha/2 41 45.

The general formula for a (1−α)%(1-\alpha)\%-confidence interval for μ\mu (when σ\sigma is known or nn is large) is: [xˉn−zα/2σn,xˉn+zα/2σn][\bar{x}_n - z_{\alpha/2} \frac{\sigma}{\sqrt{n}}, \bar{x}_n + z_{\alpha/2} \frac{\sigma}{\sqrt{n}}] 46.

This can be expressed as: point estimate ± z_{\alpha/2} * standard error 46.

Example 6.1 (continued): For a 99% CI (α=0.01\alpha = 0.01, α/2=0.005\alpha/2 = 0.005), z0.005≈2.58z_{0.005} \approx 2.58 47 48. Margin of error (ee) = 2.58×0.063≈0.1622.58 \times 0.063 \approx 0.162 50. The approximate 99% CI is [6.634−0.162,6.634+0.162=[6.472,6.800][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

  1. Symmetry: The CI is always symmetric around the sample mean (xˉn\bar{x}_n) 51.
  2. Width: The width of the CI is twice the margin of error: 2 * margin of error 51.
  3. Factors affecting margin of error: The margin of error depends on:
  • The desired confidence level (1−α1 - \alpha) 52.
  • The population standard deviation (σ\sigma) 52.
  • The sample size (nn) 52. e=zα/2σne = z_{\alpha/2} \frac{\sigma}{\sqrt{n}} 52.

22.6 Case 2: Population variance (σ2\sigma^2) is unknown

In most practical situations, the population standard deviation (σ\sigma) is unknown. We estimate it using the sample standard deviation (ss), leading to an estimated standard error (s/ns/\sqrt{n}) 54.

22.6.1 The Student's t-distribution

When σ\sigma is unknown and the population is normally distributed (or nn is large), the ratio Xˉn−μS/n\frac{\bar{X}_n - \mu}{S/\sqrt{n}} follows a Student's t-distribution with n−1n-1 degrees of freedom (tn−1t_{n-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 (rr).
  • 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−α)%100(1 - \alpha)\%-CI, we need the t-values (tn−1,α/2t_{n-1, \alpha/2}) such that P(T>tn−1,α/2)=α/2P(T > t_{n-1, \alpha/2}) = \alpha/2, where T∼tn−1T \sim t_{n-1}. These values can be found in t-tables 58 59 60.

22.6.4 Formula for CI when σ\sigma is unknown

The (approximate) 100(1−α)%100(1 - \alpha)\%-confidence interval for the population mean μ\mu when σ\sigma is unknown is: [xˉn−tn−1,α/2sn,xˉn+tn−1,α/2sn][\bar{x}_n - t_{n-1, \alpha/2} \frac{s}{\sqrt{n}}, \bar{x}_n + t_{n-1, \alpha/2} \frac{s}{\sqrt{n}}] 61.

This interval is generally wider than the CI calculated when σ\sigma 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≥30n \ge 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=38n=38, so degrees of freedom r=n−1=37r = n-1 = 37 63. For a 99% CI, α=0.01\alpha = 0.01, so α/2=0.005\alpha/2 = 0.005. We need t37,0.005t_{37, 0.005}. From t-tables, this value is approximately 2.712 60 63. Estimated standard error = sn=13838≈22.39\frac{s}{\sqrt{n}} = \frac{138}{\sqrt{38}} \approx 22.39 dollars 63. Margin of error (ee) = t37,0.005×sn≈2.712×22.39≈60.68t_{37, 0.005} \times \frac{s}{\sqrt{n}} \approx 2.712 \times 22.39 \approx 60.68 dollars 63. The approximate 99% CI for the average rent price is [432−60.68,432+60.68=[371.32,492.68][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 (H0H_0): 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 (μ\mu), it can be stated as H0:μ=μ0H_0: \mu = \mu_0, H0:μ≤μ0H_0: \mu \leq \mu_0, or H0:μ≥μ0H_0: \mu \geq \mu_0 .
  • Alternative Hypothesis (H1H_1 or HaH_a): This hypothesis states that the population parameter lies in a different region, complementary to H0H_0. It generally represents the presence of an effect, influence, or change that the researcher aims to demonstrate. For tests concerning the mean (μ\mu), it can be stated as H1:μ≠μ0H_1: \mu \neq \mu_0 (two-sided), H1:μ>μ0H_1: \mu > \mu_0 (right-sided), or H1:μ<μ0H_1: \mu < \mu_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 (μ\mu) when σ\sigma is unknown

The focus is on testing hypotheses about the population mean (μ\mu) when the population standard deviation (σ\sigma) is unknown, and we rely on the sample standard deviation (ss).

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:μ=μ0H_0: \mu = \mu_0 versus H1:μ≠μ0H_1: \mu \neq \mu_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:μ≤μ0H_0: \mu \leq \mu_0 versus H1:μ>μ0H_1: \mu > \mu_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:μ≥μ0H_0: \mu \geq \mu_0 versus H1:μ<μ0H_1: \mu < \mu_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 (μ\mu) when σ\sigma is unknown:

22.1.3.1 Using confidence intervals

This method is applicable only for two-sided tests 78.

  1. Calculate a 100(1−α)%100(1 - \alpha)\%-confidence interval (CI) for μ\mu.
  2. Check if the hypothesized value (μ0\mu_0) falls within this CI.
  • If μ0\mu_0 is within the CI, we do not reject H0H_0. This means μ0\mu_0 is a plausible value for μ\mu 76.
  • If μ0\mu_0 is not within the CI, we reject H0H_0 in favor of H1H_1. This means μ0\mu_0 is unlikely to be the true population mean 76.

The significance level (α\alpha) of the test is equal to 11 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∣)2P(T > |t|) representing the probability of observing a test statistic as far from 0 as, or further than, the calculated test statistic (tt), under H0H_0 88 91 92.
  • For a right-sided test, the P-value is P(T>t)P(T > t) representing the probability of observing a test statistic greater than or equal to the calculated test statistic (tt), under H0H_0 .
  • For a left-sided test, the P-value is P(T<t)P(T < t) representing the probability of observing a test statistic less than or equal to the calculated test statistic (tt), under H0H_0 .

Decision Rule:

  • If P-value <α< \alpha (significance level), reject H0H_0. This indicates strong evidence against H0H_0 and in favor of H1H_1 100 .
  • If P-value ≥α\geq \alpha, do not reject H0H_0. This indicates insufficient evidence to reject H0H_0 100 .

Tip: "Not rejecting H0H_0" does not mean H0H_0 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:

  1. 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 .
  2. State hypotheses: Formulate the null (H0H_0) and alternative (H1H_1) hypotheses 100 .
  3. Determine the test statistic and its distribution under H0H_0: Calculate the test statistic and identify its sampling distribution assuming H0H_0 is true. For tests about the mean with unknown σ\sigma, this is typically a t-distribution 100 .
  • Test statistic: T=Xˉ−μ0S/nT = \frac{\bar{X} - \mu_0}{S/\sqrt{n}} 91.
  • Distribution under H0H_0: T∼tn−1T \sim t_{n-1} if the variable is normally distributed, or T≈tn−1T \approx t_{n-1} if n≥30n \geq 30 (by Central Limit Theorem) .
  • Test value: The observed value of the test statistic for the sample data: t=xˉ−μ0s/nt = \frac{\bar{x} - \mu_0}{s/\sqrt{n}} 91.
  1. Calculate the P-value and compare it to α\alpha: Determine the P-value and compare it with the pre-determined significance level (α\alpha) 100 .
  2. Formulate a nuanced conclusion: State the decision regarding H0H_0 (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 (μ\mu) when σ\sigma is unknown

When testing hypotheses about the population mean (μ\mu) with an unknown population standard deviation (σ\sigma), the sample standard deviation (ss) is used.

  • Test statistic: The general form of the test statistic is T=Xˉ−μ0S/nT = \frac{\bar{X} - \mu_0}{S/\sqrt{n}} where Xˉ\bar{X} is the sample mean, μ0\mu_0 is the hypothesized population mean, SS is the sample standard deviation, and nn is the sample size 91.
  • Distribution under H0H_0:
  • If the underlying variable is normally distributed, the test statistic TT follows a t-distribution with n−1n-1 degrees of freedom: T∼tn−1T \sim t_{n-1} .
  • If the underlying variable is not normally distributed but the sample size nn is sufficiently large (n≥30n \geq 30), the Central Limit Theorem (CLS) allows us to approximate the distribution of the test statistic as a t-distribution: T≈tn−1T \approx t_{n-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=xˉ−μ0s/nt = \frac{\bar{x} - \mu_0}{s/\sqrt{n}} 91.

Example: For Example 6.3, testing H0:μ=6.5H_0: \mu = 6.5, with xˉ=6.634\bar{x} = 6.634, s=1.479s = 1.479, and n=500n = 500, the test value is: t=6.634−6.51.479/500=0.1340.06613≈2.026t = \frac{6.634 - 6.5}{1.479/\sqrt{500}} = \frac{0.134}{0.06613} \approx 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∣)P_{\text{value}} = 2P(T > |t|), where T∼tn−1T \sim t_{n-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 tt 88 91.
  • Right-sided test: Pvalue=P(T>t)P_{\text{value}} = P(T > t), where T∼tn−1T \sim t_{n-1}. This is the probability of observing a test statistic value greater than or equal to tt .
  • Left-sided test: Pvalue=P(T<t)P_{\text{value}} = P(T < t), where T∼tn−1T \sim t_{n-1}. This is the probability of observing a test statistic value less than or equal to tt .

Tip: When the exact degrees of freedom (n−1n-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=499n-1 = 499, using the row for df=100df=100 is appropriate 95.

Example: For Example 6.3, with a test value t=2.026t = 2.026 and T≈t499T \approx t_{499}, using df=100df=100 for approximation, we find that t100,0.025=1.984t_{100, 0.025} = 1.984 and t100,0.010=2.364t_{100, 0.010} = 2.364. Since 1.984<2.026<2.3641.984 < 2.026 < 2.364, the probability P(T>2.026)P(T > 2.026) lies between 0.0100.010 and 0.0250.025. For the two-sided test, the P-value is 2×P(T>2.026)2 \times P(T > 2.026), which lies between 2×0.01=0.022 \times 0.01 = 0.02 and 2×0.025=0.052 \times 0.025 = 0.05 95 96 97 98.

22.1.8 Significance level (α\alpha)

The significance level (α\alpha) 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 <α< \alpha, reject H0H_0. Conclude that there is statistically significant evidence to support H1H_1 .
  • If P-value ≥α\geq \alpha, do not reject H0H_0. Conclude that there is not enough statistically significant evidence to support H1H_1 .

Important Note: Reporting the P-value provides more detailed information than just stating statistical significance at a given α\alpha level. A P-value of 0.001 provides stronger evidence against H0H_0 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\alpha = 0.05: Since P-value (0.02 to 0.05) <0.05< 0.05, we reject H0H_0 and conclude that the average well-being score of self-employed individuals in Belgium differs from 6.5 .
  • At α=0.01\alpha = 0.01: Since P-value (0.02 to 0.05) ≥0.01\geq 0.01, we do not reject H0H_0 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 (μ\mu)

Confidence intervals provide a range of plausible values for the population mean (μ\mu) based on sample data.

  • Formula (when σ\sigma is unknown and nn is large or data is normal): The confidence interval is of the form [xˉ−tn−1,α/2sn,xˉ+tn−1,α/2sn][\bar{x} - t_{n-1, \alpha/2} \frac{s}{\sqrt{n}}, \bar{x} + t_{n-1, \alpha/2} \frac{s}{\sqrt{n}}]. Here, xˉ\bar{x} is the sample mean, ss is the sample standard deviation, nn is the sample size, and tn−1,α/2t_{n-1, \alpha/2} is the critical t-value for n−1n-1 degrees of freedom and α/2\alpha/2 tail probability 64 66.

Example 6.1: For self-employed individuals, a sample of n=500n=500 yields a mean well-being score of xˉ=6.634\bar{x} = 6.634 and a standard deviation of s=1.479s = 1.479. A 95%-confidence interval for the average well-being score is calculated as: [6.634−t499,0.0251.479500,6.634+t499,0.0251.479500][6.634 - t_{499, 0.025} \frac{1.479}{\sqrt{500}}, 6.634 + t_{499, 0.025} \frac{1.479}{\sqrt{500}}] Using t499,0.025≈t100,0.025=1.984t_{499, 0.025} \approx t_{100, 0.025} = 1.984, the interval is approximately [6.503,6.765][6.503, 6.765] 67.

Example 6.2: For a sample of n=38n=38, xˉ=432\bar{x} = 432 and s=138s = 138. A 99%-confidence interval for the mean housing price is: [xˉ−t37,0.005sn,xˉ+t37,0.005sn][\bar{x} - t_{37, 0.005} \frac{s}{\sqrt{n}}, \bar{x} + t_{37, 0.005} \frac{s}{\sqrt{n}}] With t37,0.005≈t30,0.005=2.750t_{37, 0.005} \approx t_{30, 0.005} = 2.750, the standard error is s/n=138/38≈22.39s/\sqrt{n} = 138/\sqrt{38} \approx 22.39. The margin of error is e=2.750×22.39=61.56e = 2.750 \times 22.39 = 61.56. The 99%-CI is [432−61.56,432+61.56=[370.44,493.56][432 - 61.56, 432 + 61.56 = [370.44, 493.56] dollars 64 66.

22.2.2 Hypothesis testing for the mean (μ\mu)

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.5H_0: \mu = 6.5 vs H1:μ≠6.5H_1: \mu \neq 6.5 76.
  • Test statistic: T=Xˉ−6.5S/n≈t499T = \frac{\bar{X} - 6.5}{S/\sqrt{n}} \approx t_{499} 94.
  • Test value: t=2.026t = 2.026 94.
  • P-value: Between 0.02 and 0.05 98.
  • Conclusion at α=0.05\alpha = 0.05: Reject H0H_0. The average well-being score differs from 6.5 .
  • Conclusion at α=0.01\alpha = 0.01: Do not reject H0H_0. Cannot conclude the average well-being score differs from 6.5 .
  • Relationship with CI: The calculated 95%-CI is [6.503,6.765][6.503, 6.765] dollars, which does not contain 6.5 dollars, consistent with rejecting H0H_0 at α=0.05\alpha=0.05. The 99%-CI is [6.478,6.790][6.478, 6.790] dollars, which does contain 6.5 dollars, consistent with not rejecting H0H_0 at α=0.01\alpha=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=38n=38, xˉ=432\bar{x} = 432 dollars, s=138s = 138 dollars .
  • H0:μ≥500H_0: \mu \geq 500 vs H1:μ<500H_1: \mu < 500 dollars .
  • Test statistic: T=Xˉ−500S/n≈t37T = \frac{\bar{X} - 500}{S/\sqrt{n}} \approx t_{37} .
  • Test value: t=432−500138/38=−3.04t = \frac{432 - 500}{138/\sqrt{38}} = -3.04 .
  • P-value: P(T<−3.04)P(T < -3.04). From the t-table, t30,0.005=2.750t_{30, 0.005} = 2.750. Since −3.04<−2.750-3.04 < -2.750, P(T<−3.04)<P(T<−2.750)=0.005P(T < -3.04) < P(T < -2.750) = 0.005 .
  • Conclusion at α=0.05\alpha = 0.05: Since P-value <0.005<0.05< 0.005 < 0.05, reject H0H_0. 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:μ≤500H_0: \mu \leq 500 vs H1:μ>500H_1: \mu > 500 dollars .
  • Test value: t=−3.04t = -3.04 .
  • P-value: P(T>−3.04)P(T > -3.04). Since P(T<−3.04)<0.005P(T < -3.04) < 0.005, then P(T>−3.04)=1−P(T<−3.04)>1−0.005=0.995P(T > -3.04) = 1 - P(T < -3.04) > 1 - 0.005 = 0.995 .
  • Conclusion at α=0.05\alpha = 0.05: Since P-value ( >0.995> 0.995) >0.05> 0.05, do not reject H0H_0. 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.27t=2.27 with n=69n=69 students (degrees of freedom n−1=68n-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 σ\sigma is unknown

While the provided text primarily focuses on cases where σ\sigma 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 tt with T∼t68T \sim t_{68}, the P-value is P(T>t)P(T > t). If t=2.27t = 2.27, the P-value lies between 0.01 and 0.025, as 2.272.27 falls between the critical values for α=0.025\alpha = 0.025 and α=0.01\alpha = 0.01 with 60 degrees of freedom .
  • Left-tailed test: The P-value is P(T<t)P(T < t). If t=2.27t = 2.27, then P(T<2.27)=1−P(T>2.27)P(T < 2.27) = 1 - P(T > 2.27), placing the P-value between 1−0.0251 - 0.025 and 1−0.011 - 0.01, thus between 0.975 and 0.99 .
  • Two-tailed test: The P-value is 2P(T>∣t∣)2P(T > |t|). For t=2.27t = 2.27, the P-value is 2P(T>2.27)2P(T > 2.27), which lies between 2×0.012 \times 0.01 and 2×0.0252 \times 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 (H0H_0) when it is actually true. The probability of a Type I error is denoted by α\alpha, the significance level. This occurs when sample data yields an extreme result due to chance, leading to the rejection of a true H0H_0 .
  • Type II error (false negative): Failing to reject the null hypothesis (H0H_0) when it is actually false. The probability of a Type II error is denoted by β\beta. This error occurs when H0H_0 is not rejected, despite a true alternative hypothesis (H1H_1) .

The relationship between these errors can be summarized in a table:

Reject H0H_0Do not reject H0H_0
H0H_0 is trueType I errorNo error
H0H_0 is falseNo errorType II error

22.2.1 Factors influencing Type II error

The probability of a Type II error (β\beta) is influenced by:

  • The degree to which H0H_0 is false: A small relative deviation from H0H_0 leads to a higher probability of a Type II error than a large deviation. If the true population mean (μ1\mu_1) is closer to the hypothesized mean (μ0\mu_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, X‾n\overline{X}_n) leads to a smaller probability of a Type II error .

The calculation of β\beta is not typically required in practice .

22.2.2 Choosing the significance level α\alpha

The significance level α\alpha is chosen before conducting the hypothesis test and sets the maximum acceptable probability of a Type I error. Common choices for α\alpha are 0.1, 0.05, or 0.01 .

  • Too large α\alpha: Increases the risk of a Type I error.
  • Too small α\alpha: Increases the risk of a Type II error, as H0H_0 is less likely to be rejected .

The probabilities of Type I and Type II errors are not independent .

Tip: Think of α\alpha as the threshold for how "unusual" an observation needs to be before you are willing to reject the null hypothesis. A stricter threshold (α\alpha closer to 0) means you need a more extreme observation to reject H0H_0, 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 (α\alpha) and the confidence level (1−α1-\alpha):

| H0H_0 is true | α\alpha (Type I) | 1−α1 - \alpha (Confidence) | | H0H_0 is false | 1−β1 - \beta | β\beta (Type II) |

22.3 Hypothesis testing for the mean of a normal variable (σ\sigma known)

This section outlines the steps and considerations for hypothesis testing when the population standard deviation (σ\sigma) is known.

22.3.1 Conditions for testing

The following conditions must be met:

  1. The sample must be random .
  2. XX is a quantitative (or pseudo-metric) variable .
  3. The variable XX originates from a normal distribution, or the sample size is sufficiently large (n≥30n \geq 30) due to the Central Limit Theorem (CLT) .
  4. The sample should not contain outliers .

22.3.2 Setting up hypotheses

Hypotheses are formulated based on the research question:

  • Right-tailed test: H0:μ≤μ0H_0: \mu \leq \mu_0 vs. H1:μ>μ0H_1: \mu > \mu_0 .
  • Left-tailed test: H0:μ≥μ0H_0: \mu \geq \mu_0 vs. H1:μ<μ0H_1: \mu < \mu_0 .
  • Two-tailed test: H0:μ=μ0H_0: \mu = \mu_0 vs. H1:μ≠μ0H_1: \mu \neq \mu_0 .

22.3.3 Determining the test statistic

Given the conditions and that X1,…,XnX_1, \dots, X_n are from a normal distribution with known σ\sigma, the Central Limit Theorem (CLT) implies that the sample mean X‾n\overline{X}_n is normally distributed: X‾n∼N(μ,σ2n)\overline{X}_n \sim N(\mu, \frac{\sigma^2}{n}). The test statistic used is a Z-score: Z=X‾n−μ0σ/nZ = \frac{\overline{X}_n - \mu_0}{\sigma/\sqrt{n}} Under H0H_0, Z∼N(0,1)Z \sim N(0, 1). The test value, zz, is calculated as : If XX does not follow a normal distribution but the sample is large (n≥30n \geq 30), the CLT still allows us to approximate X‾n≈N(μ,σ2n)\overline{X}_n \approx N(\mu, \frac{\sigma^2}{n}) .

22.3.4 Calculating the P-value

The P-value is determined based on the test statistic zz and the alternative hypothesis:

  • Right-tailed test: P(Z>z)P(Z > z) .
  • Left-tailed test: P(Z<z)P(Z < z) .
  • Two-tailed test: 2P(Z>∣z∣)2P(Z > |z|) .

The P-value is then found using the standard normal distribution table (Z-table) .

22.3.5 Decision rule

Reject H0H_0 if the P-value is less than the chosen significance level α\alpha .

22.3.5.1 Example: Wellbeing score of self-employed individuals

Consider a sample of x‾n=6.634\overline{x}_n = 6.634 for the wellbeing score of self-employed individuals, with a known population standard deviation σ=1.4\sigma = 1.4. We want to test if the average wellbeing score is greater than 6.5 at a 5% significance level .

  1. Conditions: Random sample (given), pseudo-metric variable (wellbeing score), n=500n=500 (large enough, even if not strictly normal distribution), assume no outliers .
  2. Hypotheses: H0:μ≤6.5H_0: \mu \leq 6.5 vs. H1:μ>6.5H_1: \mu > 6.5 .
  3. Test statistic: Z=X‾n−μ0σ/nZ = \frac{\overline{X}_n - \mu_0}{\sigma/\sqrt{n}}. Test value z=6.634−6.51.4/500=2.14z = \frac{6.634 - 6.5}{1.4/\sqrt{500}} = 2.14 .
  4. P-value: P(Z>2.14)=1−P(Z≤2.14)=1−0.984=0.016P(Z > 2.14) = 1 - P(Z \leq 2.14) = 1 - 0.984 = 0.016 .
  5. Decision: Since 0.016<0.050.016 < 0.05, we reject H0H_0 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 σ\sigma known

H0:μ=μ0H_0: \mu = \mu_0Test StatisticP-value
H1:μ≠μ0H_1: \mu \neq \mu_0Z=X‾−μ0σ/n≈H0N(0,1)Z = \frac{\overline{X} - \mu_0}{\sigma/\sqrt{n}} \approx H_0 N(0, 1)$2P(Z >
H1:μ>μ0H_1: \mu > \mu_0(if σ2\sigma^2 is known)P(Z>z)P(Z > z)
H1:μ<μ0H_1: \mu < \mu_0P(Z<z)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 pp is typically of the form [point estimate ±\pm margin of error .

  • Point estimate: The sample proportion, p^\hat{p} .
  • Standard error: The standard error of the sample proportion P^\hat{P} is p(1−p)n\sqrt{\frac{p(1-p)}{n}}. Since pp is unknown, it is estimated using p^\hat{p}: p^(1−p^)n\sqrt{\frac{\hat{p}(1-\hat{p})}{n}} .
  • Margin of error: For a 95% CI, this is 1.96×standard error1.96 \times \text{standard error} .

Conditions for approximate normality: The sampling distribution of P^\hat{P} is approximately normal if np≥5np \geq 5 and n(1−p)≥5n(1-p) \geq 5. Since pp is unknown, we use p^\hat{p}: the condition becomes np^≥5n\hat{p} \geq 5 and n(1−p^)≥5n(1-\hat{p}) \geq 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−α)% CI100(1-\alpha)\% \text{ 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α/2z_{\alpha/2} is the quantile from the standard normal distribution such that P(Z>zα/2)=α/2P(Z > z_{\alpha/2}) = \alpha/2 .

Interpretation: A 100(1−α)% CI100(1-\alpha)\% \text{ CI} is an interval generated by a method that, on average, will contain the true population proportion pp in 100(1−α)%100(1-\alpha)\% 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=5000n = 5000, p^=0.64\hat{p} = 0.64.
  • Conditions: np^=3200≥5n\hat{p} = 3200 \geq 5 and n(1−p^)=1800≥5n(1-\hat{p}) = 1800 \geq 5.
  • Estimated standard error: 0.64(1−0.64)5000=0.007\sqrt{\frac{0.64(1-0.64)}{5000}} = 0.007.
  • Margin of error: e=1.96×0.007=0.0133e = 1.96 \times 0.007 = 0.0133.
  • 95% CI: 0.64±0.0133=[0.627,0.653]0.64 \pm 0.0133 = [0.627, 0.653] .

22.4.2 Hypothesis testing for a proportion (nn sufficiently large)

The general five steps of hypothesis testing apply here :

  1. Check conditions:
  • Random sample.
  • Discrete variable with two outcomes (e.g., success/failure).
  • Sufficiently large sample size: np0≥5np_0 \geq 5 and n(1−p0)≥5n(1-p_0) \geq 5, where p0p_0 is the proportion under the null hypothesis .
  1. Set up hypotheses:
  • Right-tailed: H0:p≤p0H_0: p \leq p_0 vs. H1:p>p0H_1: p > p_0 .
  • Left-tailed: H0:p≥p0H_0: p \geq p_0 vs. H1:p<p0H_1: p < p_0 .
  • Two-tailed: H0:p=p0H_0: p = p_0 vs. H1:p≠p0H_1: p \neq p_0 .
  1. Determine test statistic and value: The test statistic is: Z=P^−p0p0(1−p0)nZ = \frac{\hat{P} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}} Under H0H_0, Z≈N(0,1)Z \approx N(0, 1) if the sample size conditions are met. The test value is :
  2. Determine P-value and compare with α\alpha:
  • Right-tailed: P(Z>z)P(Z > z) .
  • Left-tailed: P(Z<z)P(Z < z) .
  • Two-tailed: 2P(Z>∣z∣)2P(Z > |z|) . If P-value <α< \alpha, reject H0H_0. Otherwise, do not reject H0H_0 .
  1. Formulate a nuanced conclusion: State the decision in the context of the problem .

Tip: When you fail to reject H0H_0, it does not prove that H0H_0 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.80p > 0.80). A sample of n=50n=50 refugees shows p^=0.84\hat{p} = 0.84 .

  1. Hypotheses: H0:p≤0.80H_0: p \leq 0.80 vs. H1:p>0.80H_1: p > 0.80 .
  2. Conditions: Random sample, binary variable, np0=50×0.80=40≥5np_0 = 50 \times 0.80 = 40 \geq 5 and n(1−p0)=50×0.20=10≥5n(1-p_0) = 50 \times 0.20 = 10 \geq 5 .
  3. Test statistic: Z=P^−p0p0(1−p0)nZ = \frac{\hat{P} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}. Test value z=0.84−0.800.80(1−0.80)50=0.71z = \frac{0.84 - 0.80}{\sqrt{\frac{0.80(1-0.80)}{50}}} = 0.71 .
  4. P-value: P(Z>0.71)=1−P(Z<0.71)=1−0.761=0.239P(Z > 0.71) = 1 - P(Z < 0.71) = 1 - 0.761 = 0.239 .
  5. Decision: Since 0.239>0.050.239 > 0.05 (assuming α=0.05\alpha = 0.05), we do not reject H0H_0. 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 .

  1. Hypotheses: H0:p=0.102H_0: p = 0.102 vs. H1:p≠0.102H_1: p \neq 0.102 .
  2. Conditions: Random sample, binary variable, np0=100×0.102=10.2≥5np_0 = 100 \times 0.102 = 10.2 \geq 5 and n(1−p0)=100×0.898=89.8≥5n(1-p_0) = 100 \times 0.898 = 89.8 \geq 5 .
  3. Test statistic: Z=P^−p0p0(1−p0)nZ = \frac{\hat{P} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}. Test value z=0.17−0.1020.102(1−0.102)100=2.24z = \frac{0.17 - 0.102}{\sqrt{\frac{0.102(1-0.102)}{100}}} = 2.24 .
  4. P-value: 2P(Z>2.24)=2×(1−P(Z<2.24))=2×0.013=0.0262P(Z > 2.24) = 2 \times (1 - P(Z < 2.24)) = 2 \times 0.013 = 0.026 .
  5. Decision: Since 0.026<0.050.026 < 0.05, we reject H0H_0 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 (nn large)

H0:p=p0H_0: p = p_0Test StatisticP-value
H1:p≠p0H_1: p \neq p_0Z=P^−p0p0(1−p0)/n≈H0N(0,1)Z = \frac{\hat{P}-p_0}{\sqrt{p_0(1-p_0)/n}} \approx H_0 N(0, 1)$2P(Z >
H1:p>p0H_1: p > p_0(if np0≥5np_0 \geq 5 and n(1−p0)≥5n(1-p_0) \geq 5)P(Z>z)P(Z > z)
H1:p<p0H_1: p < p_0P(Z<z)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.

See also