2000 Unit 1 Filled In
1. Introduction to statistical inference and review of basic concepts
This section introduces the fundamental principles of statistical inference, focusing on the distinction between population parameters and sample statistics, and reviews key concepts related to density curves and normal distributions.
1.1 Parameters versus statistics
A parameter is a numerical value that characterizes an entire population. Examples include the population mean (μ), population standard deviation (ω), population variance (ω2), and population proportion (p). In contrast, a statistic (or estimator) is a numerical value computed from sample data. Common examples are the sample mean (xˉ), sample standard deviation (s), sample variance (s2), and sample proportion (p^). The sample mean is calculated as xˉ=n∑xi, and the sample standard deviation is s=n−1∑(xi−xˉ)2, where n is the sample size and ∑xi=x1+x2+⋯+xn 3.
Note: Since populations are often very large, the values of parameters are usually unknown. Statistics are used as estimates for these unknown parameters.
1.2 Statistical inference
Statistical inference encompasses methods used to draw conclusions about a population based on sample data. This unit will revisit key inferential techniques learned previously, specifically confidence intervals and hypothesis testing 4.
1.3 Density curves
A density curve is a curve that describes the overall shape of a distribution. The area under a density curve above the x-axis represents the proportion of observations falling within a specific interval. The total area beneath any density curve is always equal to 1. Density curves can represent various distribution shapes, including symmetric, right-skewed, and left-skewed distributions 5.
1.4 Normal distributions
A significant family of density curves is the normal distributions. If a variable X follows a normal distribution with mean μ and standard deviation ω, this is denoted as X∼N(μ,ω) 6.
A normal distribution is fully defined by its mean (μ) and standard deviation (ω):
- The distribution is centered at μ and is perfectly symmetric around this mean.
- The standard deviation (ω) quantifies the spread or variability of the distribution. A larger ω results in a shorter and wider density curve 7.
1.5 Standard normal distribution
The standard normal distribution is a specific normal distribution with a mean of 0 and a standard deviation of 1, denoted as Z∼N(0,1) 8.
Any normal variable X can be transformed into a standard normal variable Z using the z-score formula: z=ωX−μ The z-score indicates how many standard deviations an observation is away from the mean 9.
1.6 Probability distributions and the normal curve
The probability distribution of a random variable X specifies the possible values X can take and the probabilities associated with those values. If X∼N(μ,ω), then X follows a normal probability distribution. The probability of X falling within a certain interval corresponds to the area under its density curve within that interval 10.
Probabilities for a normal distribution can be found by standardizing the variable X to Z using the z-score formula (z=ωx−μ) and then using a z-table to find the corresponding areas under the standard normal curve.
Example: If X∼N(10,5), the probability P(X<12.5) can be calculated as follows: P(X<12.5)=P(Z<512.5−10)=P(Z<0.50) Using a z-table, this probability is found to be 0.6915. The z-score of x=12.5 is 0.50, meaning 12.5 is 0.50 standard deviations above the mean 11.
2. Distribution of the sample mean and the Central Limit Theorem
This section explores the distribution of the sample mean, detailing its properties and how it is influenced by sample size, culminating in the foundational Central Limit Theorem.
2.1 The sampling distribution of the sample mean
When analyzing data, interest often shifts from individual observations to summary statistics derived from samples, such as the sample mean. To understand the probabilities associated with a sample mean falling within a certain interval, it is crucial to examine the distribution of the sample mean itself. This is achieved by conceptually taking numerous random samples of a fixed size (n) from a population, calculating the mean for each sample, and then observing the distribution of these calculated means.
2.1.1 Properties of the sampling distribution of the sample mean
Let Xˉ represent the mean of a simple random sample of size n drawn from a population with mean μ and standard deviation ω. The properties of the sampling distribution of Xˉ are as follows:
- Mean: The mean of the sampling distribution of Xˉ is equal to the population mean, μ. That is, E(Xˉ)=μ. This indicates that, on average, the sample mean is an unbiased estimator of the population mean.
- Standard Deviation (Standard Error): The standard deviation of the sampling distribution of Xˉ, often referred to as the standard error of the mean, is given by nω. This means that as the sample size (n) increases, the variability of the sample means decreases, and the standard error becomes smaller.
2.1.2 Distribution shape of the sample mean
The shape of the sampling distribution of Xˉ is directly related to the shape of the original population distribution and the sample size.
-
Normally Distributed Population: If the original population distribution X is normal with mean μ and standard deviation ω, denoted as X∼N(μ,ω), then the sampling distribution of the sample mean Xˉ is also exactly normal, regardless of the sample size n. The distribution is Xˉ∼N(μ,nω).
Important: This property holds true for any sample size when the population is normally distributed.
-
Non-Normally Distributed Population: When the original population distribution X is not normal (e.g., skewed), the shape of the sampling distribution of Xˉ is initially similar to the population distribution. However, as the sample size (n) increases, the sampling distribution of Xˉ begins to approximate a normal distribution.
Note: The degree to which the sampling distribution of Xˉ approximates normality depends on the initial skewness of the population distribution and the sample size. Symmetric distributions lead to a normal approximation more quickly than heavily skewed distributions.
2.1.3 Standardizing the sample mean
To calculate probabilities for the sample mean Xˉ using standard normal distribution tables (z-tables) or statistical software, it is necessary to standardize Xˉ by converting it to a z-score. The formula for the z-score of the sample mean is:
z=nωxˉ−μ
This formula represents the number of standard errors the sample mean xˉ is away from the population mean μ.
Tip: Always standardize your sample mean to a z-score before using a z-table to find probabilities. Remember that z-tables typically provide areas to the left of a given z-score.
2.2 The Central Limit Theorem
The Central Limit Theorem (CLT) is a cornerstone of inferential statistics. It provides a powerful framework for understanding the distribution of sample means, especially when the underlying population distribution is unknown or non-normal.
2.2.1 Statement of the Central Limit Theorem
The Central Limit Theorem states that for a simple random sample of size n drawn from any population with a finite mean μ and a finite standard deviation ω:
- As n becomes sufficiently large, the sampling distribution of the sample mean Xˉ will be approximately normally distributed.
- The mean of this approximate normal distribution will be μ.
- The standard deviation of this approximate normal distribution (the standard error) will be nω.
Mathematically, this is often expressed as: Xˉ∼˙N(μ,nω) when n is large.
Remember: The symbol "∼˙" denotes "approximately follows". The CLT allows us to make inferences about the population mean even if we do not know the shape of the population distribution, provided our sample size is large enough.
2.2.2 Rule of thumb for sample size
A commonly used rule of thumb for applying the Central Limit Theorem in practice is that a sample size of n≥30 is generally considered "large enough" for the sampling distribution of Xˉ to be approximately normal.
- If the population distribution is symmetric, the approximation to normality will be good even for smaller sample sizes.
- If the population distribution is severely skewed, a larger sample size than 30 might be needed for a reasonable approximation.
Example: If X∼anything(μ,ω) and n≥30, then Xˉ∼˙N(μ,nω).
2.2.3 Application of the Central Limit Theorem
The CLT is essential for hypothesis testing and confidence interval construction for population means when the population distribution is not known to be normal.
Important: If the sample size n were too small (e.g., less than 30) and the population distribution was not normal, we would not be able to use the normal distribution to calculate probabilities or construct intervals for the sample mean.
| Condition | Population Distribution (X) | Sample Size (n) | Sampling Distribution of Xˉ |
|---|---|---|---|
| Population is Normal | X∼N(μ,ω) | Any n | Xˉ∼N(μ,nω) |
| Population is Not Normal | X∼Any(μ,ω) | n≥30 (large) | Xˉ∼˙N(μ,nω) |
| Population is Not Normal | X∼Any(μ,ω) | n<30 (small) | Shape unknown, depends on X |
2.3 Summary of the distribution of the sample mean
In summary, understanding the distribution of the sample mean (Xˉ) is critical for statistical inference.
- The mean of the sampling distribution of Xˉ is always the population mean μ, and its standard deviation (standard error) is nω, irrespective of the population distribution's shape or the sample size.
- If the original population is normally distributed, the sampling distribution of Xˉ is exactly normal for any sample size n.
- If the original population is not normally distributed, the Central Limit Theorem assures us that the sampling distribution of Xˉ will be approximately normal for sufficiently large sample sizes (typically n≥30). This approximation allows us to use normal distribution theory for statistical inference about the population mean.
3. Confidence intervals and sample size determination
This section details the construction and interpretation of confidence intervals for a population mean, including the effects of confidence level and sample size, and methods for determining the necessary sample size to achieve a desired margin of error.
3.1 Understanding confidence intervals
A confidence interval provides a range of plausible values for an unknown population parameter, based on sample data. It quantizes the uncertainty inherent in using a sample to make inferences about a population. The construction of a confidence interval for the population mean, μ, when the population standard deviation, ω, is known and the population is normally distributed or the sample size is large (due to the Central Limit Theorem), is given by:
xˉ±z∗nω
Where:
- xˉ is the sample mean, serving as the point estimate for μ.
- z∗ is the critical value from the standard normal distribution, determined by the desired confidence level (C). It satisfies P(−z∗<Z<z∗)=C, often referred to as the (1−C)/2 critical value or the upper tail critical value.
- nω is the standard error of the mean.
- z∗nω is the margin of error (m).
Note: The confidence interval formula is exact when the population is normal and approximate for non-normal populations if the sample size is large.
3.1.1 Determining critical values
Critical values (z∗) are typically found using a Z-table or by referencing tables that provide critical values for common confidence levels. For a confidence level C, the critical value z∗ is such that P(Z<z∗)=1−21−C or P(Z<−z∗)=21−C. For example, for a 95% confidence interval (C=0.95), the upper tail probability is 21−0.95=0.025. The critical value z∗ such that P(Z<z∗)=0.975 is 1.96.
Tip: When the desired proportion is not exactly in the Z-table, use the closest proportion. If it's exactly halfway between two proportions, average the corresponding Z-values.
3.1.2 Interpretation of confidence intervals
The interpretation of a confidence interval is crucial. A C% confidence interval means that if we were to take many random samples of the same size and construct a confidence interval from each sample, then C% of those intervals would contain the true population mean, μ.
Important: The confidence level does not refer to the probability that the true population mean falls within a specific calculated interval. It refers to the long-run success rate of the method used to construct the intervals. The interval itself either contains the true mean or it does not.
3.1.3 Example of confidence interval construction
Consider a scenario where the standard deviation of sentence times for a particular crime is ω=25.8 months. A SRS of n=10 individuals yielded a sample mean xˉ=118.0 months.
To calculate a 95% confidence interval:
- Find the critical value for 95% confidence: z∗=1.96.
- Calculate the margin of error: m=1.96×1025.8≈15.99.
- Construct the interval: 118.0±15.99=(102.01,133.99) months.
This means we are 95% confident that the true mean sentence time for all people convicted of this crime lies between 102.01 and 133.99 months.
3.2 Factors influencing confidence interval width
The width of a confidence interval is directly related to the margin of error. Several factors influence this width:
3.2.1 Effect of confidence level
Increasing the confidence level leads to a wider confidence interval. To be more certain that the interval captures the true population mean, the interval must be expanded. This means there is a trade-off between confidence and precision: higher confidence requires sacrificing precision (a wider interval).
- For example, a 92% confidence interval for sentence times calculated with the same data as above was (103.72,132.28), while a 95% interval was (102.01,133.99). The 95% interval is wider.
3.2.2 Effect of sample size
Increasing the sample size decreases the margin of error and thus narrows the confidence interval. A larger sample provides more information about the population, leading to a more precise estimate.
- If the sample size is increased by a factor of k, the margin of error is reduced by a factor of k. Conversely, if the sample size is multiplied by k, the margin of error is divided by k.
- For instance, increasing the sample size from n=10 to n=40 (a factor of 4) for the sentence time example reduced the margin of error from approximately 15.99 to 8, effectively halving it.
Remember: A larger sample size leads to more accurate results by reducing random sampling error.
Warning: The margin of error only accounts for random sampling error. It does not address biases from non-random sampling, undercoverage, or nonresponse.
3.2.3 Combinations affecting interval width
To determine the widest interval, one must consider both the confidence level and the sample size. The widest interval will be produced by the combination of the highest confidence level and the smallest sample size.
Tip: To achieve the widest interval, prioritize a higher confidence level and a smaller sample size.
3.3 Sample size determination
A crucial aspect of study design is determining the appropriate sample size needed to achieve a desired level of precision (margin of error) at a specified confidence level. The formula for the minimum required sample size (n) can be derived from the margin of error formula:
m=z∗nω
Rearranging for n:
n=(mz∗ω)2
Where:
- m is the desired maximum margin of error.
- z∗ is the critical value corresponding to the desired confidence level.
- ω is the population standard deviation (or a reasonable estimate).
3.3.1 Calculating required sample size
When calculating sample size, the result is often a non-integer. It is standard practice to always round up to the next whole number. This ensures that the achieved margin of error is less than or equal to the desired margin of error.
Remember: Always round up the calculated sample size to ensure the desired margin of error is met or exceeded.
3.3.2 Impact of changing margin of error
Reducing the desired margin of error by a factor of k requires increasing the sample size by a factor of k2. Conversely, increasing the margin of error by a factor of k allows for a reduction in sample size by a factor of k2.
- Example: If a margin of error of 0.04 mg for nicotine content required n=34 cigarettes at 98% confidence, to achieve a margin of error of 0.02 mg (halving the error, k=2), the sample size becomes n=(2.326×0.1/0.02)2≈135.26, which rounds up to 136. This is 4×34, or 22×34, demonstrating the k2 relationship.
3.3.3 Practical considerations
The formula for sample size determination relies on knowing the population standard deviation ω. In practice, ω is often unknown. In such cases, an estimate for ω can be obtained from previous studies, a pilot study, or by using the range rule of thumb (Range ≈4ω, so ω≈Range/4). Later sections will cover methods for constructing confidence intervals when only the sample standard deviation (s) is known.
Caution: Using the population standard deviation ω is an assumption for establishing the framework. In real-world applications, the sample standard deviation s is typically used.
4. Hypothesis testing using z and t distributions (part 1)
Hypothesis testing is a statistical method used to make decisions about a population parameter based on sample data, by assessing the evidence for or against a specific claim.
4.1 The logic of hypothesis testing
The core idea of hypothesis testing is to evaluate the plausibility of an initial assumption (the null hypothesis) by examining the sample data. If an observed outcome is highly improbable under the assumption that the null hypothesis is true, it provides strong evidence to reject that assumption in favor of an alternative claim. This process allows us to draw conclusions about population parameters with a reasonable degree of certainty, though absolute proof is rarely attainable 74.
Example: Consider a parent council claiming the average speed of motorists at an intersection exceeds the 60 km/h speed limit. If a sample of 50 motorists shows a mean speed of 66 km/h, and we know speeds are normally distributed with a standard deviation of 15 km/h, we use hypothesis testing to determine if this sample mean provides sufficient evidence to support the council's claim. We ask: if the true mean speed were 60 km/h, what is the probability of observing a sample mean of 66 km/h or higher? A low probability suggests strong evidence against the 60 km/h assumption and in favor of the claim that the mean speed is greater than 60 km/h 76 77.
4.2 Formulating hypotheses
Hypothesis testing involves two competing statements about a population parameter: the null hypothesis and the alternative hypothesis.
4.2.1 The null hypothesis (H0)
The null hypothesis, denoted as H0, represents the statement being tested. It is typically an assertion of "no difference" or "no effect" and is always expressed as an equality. It serves as our initial assumption.
- Symbolic form: H0:μ=μ0
- Example: H0:μ=60 (The true mean speed is 60 km/h) 83.
4.2.2 The alternative hypothesis (Ha)
The alternative hypothesis, denoted as Ha, is the statement making the claim we are trying to support. It is always an inequality.
- Symbolic forms:
- Ha:μ<μ0 (one-sided, lower tail)
- Ha:μ>μ0 (one-sided, upper tail)
- Ha:μ=μ0 (two-sided)
- Example: Ha:μ>60 (The true mean speed is greater than 60 km/h) 82.
Note: The hypothesized value μ0 in the null hypothesis must match the value used in the alternative hypothesis when expressed in symbols 88.
4.3 The P-value
The P-value is a crucial component of hypothesis testing, quantifying the strength of evidence against the null hypothesis.
- Definition: If we assume the null hypothesis is true, the P-value is the probability of observing a sample statistic as extreme as, or more extreme than, the one actually observed. The direction of "extreme" depends on the alternative hypothesis.
- For Ha:μ>μ0, the P-value is P(Xˉ≥xˉ∣H0 is true).
- For Ha:μ<μ0, the P-value is P(Xˉ≤xˉ∣H0 is true).
- For Ha:μ=μ0, the P-value is P(∣Xˉ−μ0∣≥∣xˉ−μ0∣∣H0 is true).
Interpretation: A low P-value indicates that the observed sample data is unlikely if the null hypothesis were true, thus providing strong evidence in favor of the alternative hypothesis 84.
4.4 Level of significance (ϵ)
The level of significance, denoted by ϵ, is a pre-determined threshold that helps us decide whether to reject the null hypothesis.
- Decision Rule:
- If P-value ≤ϵ, reject H0.
- If P-value >ϵ, fail to reject H0.
- Choosing ϵ: The choice of ϵ depends on the context and the stakes involved. Higher stakes necessitate stronger evidence, leading to a lower ϵ. Common values for ϵ are 0.10, 0.05, and 0.01 85.
Tip: For this course, you will typically be provided with the level of significance to use for a test 86.
4.5 Steps in hypothesis testing (P-value method)
A systematic approach ensures a rigorous hypothesis test. The P-value method involves the following steps:
- State the level of significance (ϵ): Choose the probability of a Type I error before conducting the test.
- State the hypotheses: Formulate the null (H0) and alternative (Ha) hypotheses clearly, both in words and symbols.
- State the decision rule: This is a precise statement of the condition under which H0 will be rejected, typically based on the P-value and ϵ.
- Calculate the test statistic: This quantifies the compatibility between the null hypothesis and the sample data. For now, this is often a z-score calculated assuming H0 is true. The formula for the z-test statistic for a sample mean is:
z=σ/nxˉ−μ0
where:
- xˉ is the sample mean
- μ0 is the hypothesized population mean under H0
- σ is the population standard deviation
- n is the sample size 89.
- Calculate the P-value: Determine the probability of observing a test statistic as extreme as, or more extreme than, the one calculated, assuming H0 is true 90.
- Conclusion: Compare the P-value to ϵ and state whether you reject or fail to reject H0. Interpret the conclusion in the context of the problem, stating whether there is sufficient statistical evidence to support the alternative hypothesis 87 91.
4.6 Conditions for hypothesis testing
For hypothesis tests concerning the mean using z-scores, certain conditions must be met.
- Normality of Xˉ: The sampling distribution of the sample mean, Xˉ, must be approximately normal.
- If the population distribution of X is normal, then Xˉ is exactly normal for any sample size n.
- If the population distribution is not normal, the Central Limit Theorem (CLT) states that Xˉ will be approximately normal if the sample size n is sufficiently large (typically n≥30).
Remember: The accuracy of the P-value depends on the normality assumption for Xˉ. If the population is not normal and n is small, the P-value will be approximate 92.
5. Hypothesis testing using z and t distributions (part 2)
This section delves deeper into hypothesis testing by focusing on the interpretation of results, the calculation of p-values for different types of tests (one-sided and two-sided), and an alternative method for conducting hypothesis tests using confidence intervals.
5.1 Statistical significance and hypothesis test types
Statistical significance refers to results so extreme that they are unlikely to occur by random chance alone. Hypothesis tests are often called tests of significance because they aim to determine if observed data provide enough evidence to reject the null hypothesis.
- Right-sided test: The alternative hypothesis (Ha) is of the form Ha:μ>μ0. This type of test is used when there is suspicion that the population mean has increased.
- Left-sided test: The alternative hypothesis (Ha) is of the form Ha:μ<μ0. This is used when there is suspicion that the population mean has decreased.
- Two-sided test: The alternative hypothesis (Ha) is of the form Ha:μ=μ0. This test is conducted when there is suspicion that the population mean differs from the hypothesized value in either direction (greater than or less than).
Note: Hypotheses are always stated in terms of population parameters (e.g., μ), not sample statistics (e.g., Xˉ). .
5.1.1 Formulating hypotheses
When formulating hypotheses, it's crucial to identify the parameter of interest and the specific claim being tested.
- Example: A supervisor suspects the mean response time has increased from a target of 30 minutes.
- Null Hypothesis (H0): μ=30 (The mean response time is still 30 minutes).
- Alternative Hypothesis (Ha): μ>30 (The mean response time has increased). 95.
5.1.2 Test statistic calculation
The test statistic quantifies how far the sample result deviates from the null hypothesis. For tests involving a known population standard deviation (σ) or a large sample size, the z-statistic is used.
The formula for the z-test statistic is: z=σ/nxˉ−μ0 Where:
-
xˉ is the sample mean.
-
μ0 is the hypothesized population mean under the null hypothesis.
-
σ is the population standard deviation.
-
n is the sample size.
-
Example: For a sample mean of 33.8 minutes, population standard deviation of 10 minutes, and sample size of 25, with H0:μ=30: z=10/2533.8−30=10/53.8=23.8=1.90 96.
5.2 Calculating P-values for different tests
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.
5.2.1 P-values for left-sided and right-sided tests
The calculation of the P-value depends on the direction of the inequality in the alternative hypothesis.
- Right-sided test (Ha:μ>μ0): The P-value is the probability of observing a z-score greater than the calculated test statistic. P-value=P(Z>z)
- Left-sided test (Ha:μ<μ0): The P-value is the probability of observing a z-score less than the calculated test statistic. P-value=P(Z<z)
Rule of thumb: The direction of the inequality in the P-value calculation matches the direction of the inequality in the alternative hypothesis. 101.
-
Example (Left-sided): For a test statistic of z=−1.33 and Ha:μ<75, the P-value is: P-value=P(Z<−1.33)≈0.0918 This indicates that if the true mean drying time was 75 minutes, there's about a 9.18% chance of observing a sample mean of 73 minutes or less. [ 99] 98.
-
Example (Left-sided Practice Question): A physician suspects the mean body temperature is lower than 37.0°C (Ha:μ<37). With a sample mean of 36.9°C, population standard deviation of 0.2°C, and sample size of 16:
- Test statistic: z=0.2/1636.9−37=0.2/4−0.1=0.05−0.1=−2.00
- P-value: P(Z<−2.00)≈0.0228 102.
5.2.2 P-values for two-sided tests
For a two-sided test (Ha:μ=μ0), the P-value is the probability of observing a test statistic at least as extreme as the one calculated, in either direction (greater than or less than). This is calculated by doubling the tail probability associated with the absolute value of the test statistic.
P-value=2×P(Z>∣z∣)or2×P(Z<−∣z∣)
-
Example (Two-sided): For a test statistic of z=1.81 and Ha:μ=500: P-value=2×P(Z>∣1.81∣)=2×P(Z>1.81) Using a standard normal table or calculator, P(Z>1.81)≈0.0351. P-value=2×0.0351=0.0702 This means that if the true mean fill volume was 500 ml, there's about a 7.02% chance of observing a sample mean as far from 500 ml as 502 ml (or further) in either direction. [ 107] 106.
-
Example (Two-sided Practice Question): For H0:μ=15 vs. Ha:μ=15, and a test statistic of z=−1.19:
- P-value: P-value=2×P(Z>∣−1.19∣)=2×P(Z>1.19)
- 2×P(Z<−1.19)=2×0.1170=0.2340 110.
Summary of P-value Calculations:
Alternative Hypothesis (Ha) P-value Calculation Ha:μ>μ0 P(Z>z) Ha:μ<μ0 P(Z<z) Ha:μ=μ0 $2P(Z > These P-values are exact for normal populations or approximate for non-normal populations with large sample sizes due to the Central Limit Theorem. 109.
Important Reminder: We never "accept H0". Instead, we "fail to reject H0" if there isn't enough evidence to support the alternative hypothesis. 100.
Analogy to Legal Trials: In a jury trial, the null hypothesis is "Defendant is innocent." A P-value of 0.35 means there is insufficient evidence to conclude the defendant is guilty. This implies that there is insufficient evidence that the alternative hypothesis (guilty) is true. Therefore, the jury would fail to reject the null hypothesis. 111.
5.3 The confidence interval method for hypothesis testing
An alternative approach to conducting a two-sided hypothesis test is using a confidence interval. This method requires two conditions to be met:
- The hypothesis test must be two-sided (Ha:μ=μ0).
- The confidence level of the interval and the significance level (ω) of the hypothesis test must sum to 100% (i.e., Confidence Level + ω=1, or 100(1−ω)%+ω=100%).
5.3.1 Decision rule using confidence intervals
-
If the hypothesized population mean (μ0) falls outside the 100(1−ω)% confidence interval, we reject the null hypothesis (H0).
-
If the hypothesized population mean (μ0) falls inside the 100(1−ω)% confidence interval, we fail to reject the null hypothesis (H0).
-
Example: For a two-sided test with a significance level ω=0.05, we would use a 95% confidence interval (100(1−0.05)%=95%). If the hypothesized mean μ0 is not within this 95% confidence interval, we reject H0. 112.
6. Hypothesis testing using z and t distributions (part 3)
This section delves into alternative methods for conducting hypothesis tests, specifically the Confidence Interval method and the Critical Value method, and demonstrates their application for various test types.
6.1 Confidence interval method
The Confidence Interval (CI) method offers an alternative approach to hypothesis testing by leveraging the relationship between confidence intervals and hypothesis tests. The core principle is that if the hypothesized population parameter (μ0) falls within the calculated confidence interval for the true population parameter (μ), then it is considered plausible that H0 is correct, and we fail to reject H0. Conversely, if μ0 falls outside the CI, it suggests that μ0 is unlikely to be the true population parameter, leading to the rejection of H0.
The steps involved in the CI method are similar to the p-value method, with the primary difference being the decision rule and the primary calculation:
- Level of significance (ω): Determine the significance level for the test.
- Hypotheses: Formulate the null (H0) and alternative (Ha) hypotheses.
- Decision Rule: Reject H0 if μ0 falls outside the (1−ω)% confidence interval for μ. Otherwise, fail to reject H0.
- Confidence Interval Calculation: Calculate the (1−ω)% confidence interval for the population mean μ. For a known population standard deviation (σ), this is given by: xˉ±zα/2nσ where zα/2 is the critical value from the standard normal distribution corresponding to the desired confidence level.
- Conclusion: Draw a conclusion based on whether μ0 is within the calculated confidence interval.
Example: For the root beer example with H0:μ=500 and Ha:μ=500 at a 5% significance level (ω=0.05), a 95% confidence interval was calculated as (499.83,504.17). Since μ0=500 is within this interval, we fail to reject H0, indicating insufficient evidence to conclude the mean volume differs from 500 ml 115.
Note: The significance level ω for a two-sided hypothesis test corresponds to 1−confidence level. For instance, a 5% significance level relates to a 95% confidence interval.
6.2 Critical value method
The Critical Value method offers another approach to hypothesis testing, bypassing the calculation of the p-value. Instead, it directly compares the calculated test statistic to a pre-determined "critical value."
The fundamental idea is to establish a threshold (the critical value) that defines the boundary between the "rejection region" and the "non-rejection region." If the test statistic falls into the rejection region, H0 is rejected.
The steps for the Critical Value method are:
- Level of significance (ω): Define the significance level for the test.
- Hypotheses: State the null (H0) and alternative (Ha) hypotheses.
- Decision Rule: Formulate a decision rule based on the type of test (left-sided, right-sided, or two-sided) and the critical value(s).
- Test Statistic: Calculate the appropriate test statistic (e.g., z-statistic).
- Conclusion: Compare the test statistic to the critical value(s) to make a decision about rejecting or failing to reject H0.
6.2.1 Right-sided test
For a right-sided test (Ha:μ>μ0), the decision rule is to reject H0 if the test statistic (z) is greater than the upper critical value (zω). This upper critical value is the value such that the probability of observing a value greater than it is equal to ω. P(Z>zω)=ω The test statistic is compared to this critical value: reject H0 if z≥zω.
Example: For the speeding vehicle example with H0:μ=60 and Ha:μ>60 at ω=0.05, the upper critical value z0.05 is 1.645. The calculated test statistic was z=2.83. Since 2.83≥1.645, we reject H0 and conclude that the mean speed is greater than 60 km/hr 122 123.
6.2.2 Left-sided test
For a left-sided test (Ha:μ<μ0), the decision rule is to reject H0 if the test statistic (z) is less than the lower critical value (−zω). This lower critical value is the value such that the probability of observing a value less than it is equal to ω. P(Z<−zω)=ω The test statistic is compared to this critical value: reject H0 if z≤−zω.
Example: For the paint drying example with H0:μ=75 and Ha:μ<75 at ω=0.01, the lower critical value −z0.01 is -2.326. The calculated test statistic was z=−1.33. Since −1.33>−2.326, we fail to reject H0, indicating insufficient evidence that the mean drying time is less than 75 minutes 127 128.
6.2.3 Two-sided test
For a two-sided test (Ha:μ=μ0), the decision rule involves two critical values, −zω/2 and zω/2. We reject H0 if the absolute value of the test statistic (∣z∣) is greater than the upper critical value (zω/2), or equivalently, if z≤−zω/2 or z≥zω/2. The critical values are determined such that: P(Z<−zω/2)=ω/2andP(Z>zω/2)=ω/2
Example: For the root beer example with H0:μ=500 and Ha:μ=500 at ω=0.05, the critical values are ±z0.025=±1.96. The calculated test statistic was z=1.81. Since ∣1.81∣<1.96, we fail to reject H0, meaning there's insufficient evidence to suggest the mean volume differs from 500 ml 130 131.
Important: The critical value method and the p-value method should always lead to the same conclusion for a given hypothesis test. The choice between them often depends on personal preference or specific statistical software output.
7. Hypothesis testing using z and t distributions (part 4)
This section delves into the crucial aspects of making decisions in hypothesis testing, focusing on the types of errors that can occur and the concepts of power and Type II errors.
7.1 Decisions in hypothesis testing and types of errors
When conducting a hypothesis test, it is impossible to achieve 100% certainty regarding the conclusion. Instead, conclusions are drawn with a high probability of being correct. There are four possible scenarios when making a decision:
- H0 is true, and we reject H0: This is a Type I error.
- H0 is true, and we fail to reject H0: This is a correct decision.
- H0 is false, and we reject H0: This is a correct decision.
- H0 is false, and we fail to reject H0: This is a Type II error.
The desired outcomes are cases 2 and 3, where correct decisions are made. Cases 1 and 4 represent incorrect conclusions.
Note: The probability of making a correct decision when H0 is false (rejecting H0 when Ha is true) is known as the power of the test.
7.2 Type I error
A Type I error occurs when we reject the null hypothesis (H0) when it is actually true. The probability of making a Type I error is denoted by α (alpha), which is also known as the level of significance of the test.
α=P(Type I error)=P(reject H0∣H0 true)
This probability is controlled directly by the chosen significance level (α). For instance, if a test is conducted at the 5% level of significance, the probability of incorrectly rejecting a true H0 is 5%. When using the critical value method, H0 is rejected if the calculated test statistic falls within the rejection region. The probability of the test statistic falling into this region, assuming H0 is true, is precisely α.
Example: For a right-sided test, we reject H0 if the test statistic Z is greater than a critical value z∗. The probability of this occurring when H0 is true is P(Z>z∗)=α.
7.3 Type II error
A Type II error occurs when we fail to reject the null hypothesis (H0) when the alternative hypothesis (Ha) is actually true (meaning H0 is false). The probability of making a Type II error is denoted by β (beta).
β=P(Type II error)=P(fail to reject H0∣Ha true)
The goal is to keep β as low as possible. Instead of examining β directly, statisticians often focus on its complement, which is the power of the test.
7.4 Power of a hypothesis test
The power of a hypothesis test is the probability of correctly rejecting the null hypothesis when the alternative hypothesis is true. It is the complement of the probability of a Type II error.
Power=P(reject H0∣Ha true)=1−β
If the power can be calculated, the probability of a Type II error can be easily determined: β=1−Power.
To find the power of a hypothesis test, the following steps are generally followed:
- Determine the rejection rule in terms of the sample statistic (e.g., Xˉ) using the critical value method.
- Calculate the probability of rejecting H0 under the assumption that the alternative hypothesis (Ha) is correct. This involves using a specific value from the alternative hypothesis distribution.
7.4.1 Power calculation example: Right-sided test
Consider a pharmaceutical company producing pills intended to contain 25 mg of an active ingredient. The standard deviation of the ingredient amount is known to be 1.2 mg. A hypothesis test is conducted at a significance level of α=0.01 to determine if the mean amount of the active ingredient exceeds 25 mg.
- Null Hypothesis: H0:μ=25
- Alternative Hypothesis: Ha:μ>25
- Sample size: n=5
- Population standard deviation: σ=1.2 mg
The goal is to calculate the power of this test if the true mean amount is 27 mg.
1. Rejection Rule in terms of Xˉ:
For a right-sided test with α=0.01 and a known population standard deviation, the critical value z∗ for the standard normal distribution is approximately 2.326.
The rejection rule in terms of the sample mean Xˉ is: Xˉ>μ0+z∗(nσ) Xˉ>25+2.326(51.2) Xˉ>25+2.326(0.536656) Xˉ>25+1.248 Xˉ>26.248 So, we reject H0 if Xˉ>26.248 147.
2. Probability of rejecting H0 assuming Ha is correct:
We want to find the probability of rejecting H0 (i.e., Xˉ>26.248) when the true mean is μ=27 mg.
Power=P(reject H0∣μ=27) Power=P(Xˉ>26.248∣μ=27)
To calculate this, we standardize Xˉ using the true mean under Ha: Z=σ/nXˉ−μ Power=P(Z>1.2/526.248−27) Power=P(Z>0.536656−0.752) Power=P(Z>−1.40)
Using a standard normal table or calculator: P(Z>−1.40)=1−P(Z<−1.40)=1−0.0808=0.9192 The power of the test is approximately 0.9192 149.
Now, we can find the probability of a Type II error: β=1−Power=1−0.9192=0.0808 So, the probability of a Type II error is approximately 0.0808.
Important: The power of a test is influenced by several factors, including the significance level (α), the sample size (n), the population standard deviation (σ), and the magnitude of the true effect size (the difference between μ0 and the true μ under Ha). A larger sample size or a larger difference between μ0 and the true mean generally leads to higher power.
The following visualizations illustrate the distributions under H0 and Ha, and how the rejection region defined by H0 overlaps with the distribution under Ha:
- Under H0 (μ=25): The rejection region is Xˉ>26.248 150.
- Under Ha (μ=27): The distribution of Xˉ is shifted. The power is the area in this distribution's tail that falls into the rejection region defined under H0 151.
8. Hypothesis testing using z and t distributions (part 5)
This section delves into the practical aspects of hypothesis testing, specifically focusing on the concepts of statistical power, Type II errors, and the trade-offs involved when setting the significance level (ω).
8.1 Understanding statistical power
Statistical power is the probability that a hypothesis test correctly rejects the null hypothesis (H0) when the alternative hypothesis (Ha) is true. To calculate power, we must assume a specific value for the population mean under the alternative hypothesis, denoted as μa.
The calculation of power involves two main steps:
-
Determine the rejection rule: This rule, expressed in terms of the sample mean (Xˉ), remains the same as it is derived solely from the null hypothesis (μ0) and the significance level (ω).
- The rejection region is defined by a critical value for Xˉ. For a right-tailed test, we reject H0 if Xˉ is greater than or equal to a critical value. For a left-tailed test, we reject H0 if Xˉ is less than or equal to a critical value.
-
Calculate the probability of rejecting H0 given Ha is true: This is the power of the test.
- Power =P(Reject H0∣Ha is true)
- This probability is calculated by finding the probability of the sample mean falling into the rejection region, assuming the true population mean is μa. This is done by converting the critical value of Xˉ to a z-score (or t-score, though z-scores are used when the population standard deviation is known or the sample size is large) based on the assumed true mean μa.
- The probability of a Type II error (ϑ) is the complement of power: ϑ=1−power.
Example: Consider testing H0:μ=25 against Ha:μ=28 with ω=0.01 and σ=1.2, n=25.
Rejection Rule: For a right-tailed test, the critical value for Xˉ is Xˉcrit=μ0+zαnσ=25+1.645251.2=25+1.645(0.24)=25.3964. Thus, reject H0 if Xˉ≥25.3964.
Power Calculation: Power =P(Xˉ≥25.3964∣μ=28) =P(Z≥1.2/2525.3964−28) =P(Z≥0.24−2.6036) =P(Z≥−10.848) =1−P(Z<−10.848)≈1−0=1 The probability of a Type II error is ϑ=1−1=0.
8.1.1 Effect of changing μa on power
The power of a test is influenced by how far the true mean (μa) is from the hypothesized mean (μ0).
- When the distance between μa and μ0 increases (i.e., μa moves further away from μ0), the power of the test increases, and the probability of a Type II error (ϑ) decreases. This means it becomes easier to detect that H0 is false.
- Conversely, if μa is closer to μ0, the power decreases, and ϑ increases, making it harder to detect a false null hypothesis.
Example: In a mining operation testing H0:μ=5 vs. Ha:μ<5 with σ=0.4 and n=12 at ω=0.05.
- If μa=4.5, the power is 0.9963 and ϑ=0.0037.
- If we were interested in detecting a true mean of μa=4.8 (closer to 5), the power would be lower.
8.1.2 Power for left-sided tests
The principles for calculating power are the same for left-sided tests, with adjustments to the direction of inequalities and the critical z-values.
Example: Testing H0:μ=5 vs. Ha:μ<5 for water radioactivity, with σ=0.4 pc/l, n=12, and ω=0.05. Assume the true mean is μa=4.5 pc/l.
Rejection Rule: Reject H0 if Xˉ≤μ0−zαnσ. z0.05 for a left-tailed test is approximately −1.645. Critical Xˉ=5−1.645120.4≈5−1.645(0.1155)≈5−0.190=4.81. Reject H0 if Xˉ≤4.81.
Power Calculation: Power =P(Xˉ≤4.81∣μ=4.5) =P(Z≤0.4/124.81−4.5) =P(Z≤0.11550.31) =P(Z≤2.68) =0.9963 The probability of a Type II error is ϑ=1−0.9963=0.0037.
8.2 Relationship between significance level (ω) and Type II error rate (ϑ)
There is an inherent trade-off between the significance level (ω, the probability of a Type I error) and the probability of a Type II error (ϑ).
- Decreasing ω (e.g., from 0.05 to 0.01): This makes the rejection region smaller, requiring stronger evidence to reject H0. Consequently, the power of the test decreases, and ϑ increases.
- Increasing ω (e.g., from 0.01 to 0.05): This makes the rejection region larger, making it easier to reject H0. Consequently, the power of the test increases, and ϑ decreases.
Example (Mining): Testing H0:μ=5 vs. Ha:μ<5 with σ=0.4 and n=12. Assume μa=4.5.
- With ω=0.05, power ≈0.9963, ϑ≈0.0037.
- With ω=0.01, the critical value becomes more extreme (e.g., Xˉ↓4.731). The power is approximately 0.9772, and ϑ≈0.0228.
As ω decreased from 0.05 to 0.01, the power decreased, and ϑ increased.
For a fixed sample size, choosing the significance level ω requires careful consideration to balance the risk of Type I and Type II errors. The goal is to select an ω that results in a reasonably low ϑ while maintaining the desired control over Type I errors.
9. Hypothesis testing using z and t distributions (part 6)
This section delves into the crucial concepts of statistical power and Type II errors within hypothesis testing, illustrating how factors like significance level, effect size, and sample size influence the probability of making correct decisions.
9.1 Understanding statistical power and Type II errors
Statistical power is defined as the probability of correctly rejecting a false null hypothesis (1−β). Conversely, a Type II error (β) occurs when we fail to reject a false null hypothesis. High power is desirable as it indicates a greater likelihood of detecting a true effect.
Note: The power of a test is directly related to the probability of a Type II error (β). A higher power means a lower probability of a Type II error, and vice versa.
9.2 Calculating power and Type II error probability for a two-sided z-test
The calculation of power involves determining the probability of observing a test statistic that falls within the rejection region, given that the alternative hypothesis is true. This process is demonstrated with a two-sided test scenario.
The steps involved are:
- Determine the rejection rule: This involves identifying the critical values for the test statistic (e.g., zα/2) based on the significance level (ω) and the sample size (n). The rejection region is defined by the critical values. For a two-sided test, we reject H0 if Z<−zα/2 or Z>zα/2.
- Calculate the critical values for X: These are derived from the z-scores using the formula X=μ0±zα/2nϵ, where μ0 is the hypothesized mean under the null hypothesis, ϵ is the population standard deviation, and n is the sample size.
- Calculate the power: This is the probability of the sample mean (X) falling into the rejection region when the true mean is the value specified by the alternative hypothesis (μa). This involves standardizing X using the true mean μa and the standard error nϵ, and then summing the probabilities of X falling into each part of the rejection region. Mathematically, power is calculated as: Power=P(reject H0∣Ha is true) For a two-sided test, this translates to: Power=P(X<xlower or X>xupper∣μ=μa) Power=P(Z<ϵ/nxlower−μa)+P(Z>ϵ/nxupper−μa)
- Calculate the probability of a Type II error (β): This is simply 1−Power.
Example: For H0:μ=1.5 vs. Ha:μ=1.5, with n=10, ϵ=0.04, and ω=0.05. If the true mean is μa=1.51:
- The rejection rule is X<1.4752 or X>1.5248.
- The power is P(X<1.4752 or X>1.5248∣μ=1.51).
- Standardizing using μa=1.51 and ϵ/n≈0.0126: P(Z<0.01261.4752−1.51)+P(Z>0.01261.5248−1.51) P(Z<−2.75)+P(Z>1.17)≈0.00297+0.12112=0.1240.
- The probability of a Type II error is β=1−0.1240=0.8760. This indicates a high chance of failing to detect the true mean of 1.51.
9.3 Relationship between sample size and power
A smaller sample size often leads to lower statistical power and a higher probability of a Type II error. Increasing the sample size can significantly enhance the power of a test, making it more likely to detect a true effect.
Example: Continuing the previous example with n=100 instead of n=10:
- The rejection rule becomes X<1.49216 or X>1.50784.
- The power, when μa=1.51, is calculated as: P(X<1.49216 or X>1.50784∣μ=1.51)
- Standardizing using μa=1.51 and ϵ/n=0.04/100=0.004: P(Z<0.0041.49216−1.51)+P(Z>0.0041.50784−1.51) P(Z<−4.46)+P(Z>0.54)≈0.000004+0.2946=0.2946.
- The probability of a Type II error is β=1−0.2946=0.7054.
Comparing the two sample sizes:
- With n=10: Power = 0.1240, β=0.8760.
- With n=100: Power = 0.7054, β=0.2946.
This clearly demonstrates that increasing the sample size from 10 to 100 dramatically increases the power of the test and reduces the probability of a Type II error.
9.4 Summary of factors affecting power
Several factors influence the power of a hypothesis test:
- Distance between μa and μ0: A larger absolute difference between the alternative mean (μa) and the hypothesized mean (μ0) leads to higher power (and thus lower β). This is also known as the effect size.
- Significance level (ω): Decreasing the significance level (ω, e.g., from 0.05 to 0.01) will decrease the power of the test and increase the probability of a Type II error, for a fixed sample size. This is because a lower ω leads to a wider rejection region.
- Sample size (n): Increasing the sample size (n) for a fixed significance level (ω) and effect size will increase the power of the test and decrease the probability of a Type II error.
| Factor | Change | Effect on Power | Effect on β (Type II Error) |
|---|---|---|---|
| Distance between μa and μ0 | Increases | Increases | Decreases |
| Significance level (ω) | Decreases | Decreases | Increases |
| Sample size (n) | Increases | Increases | Decreases |
Tip: In real-world applications, before conducting a hypothesis test, it is advisable to specify the desired significance level (ω), the effect size (μa−μ0) you wish to detect, and the desired power. Tables or software can then be used to determine the necessary sample size to achieve these specifications.
9.5 Seriousness of Type I vs. Type II errors
The relative seriousness of Type I and Type II errors depends heavily on the context of the hypothesis test.
Example Analysis:
(I) Slowing down to the speed limit:
- H0: The car behind you is not a police car.
- Ha: The car behind you is a police car.
- Type I error: Concluding the car is a police car when it is not. (Consequence: unnecessary slowing down, minor inconvenience).
- Type II error: Failing to conclude the car is a police car when it is. (Consequence: speeding ticket, more serious).
- In this scenario, a Type II error is generally more serious.
(II) Studying a topic for an exam:
- H0: The topic will be on the exam.
- Ha: The topic will not be on the exam.
- Type I error: Concluding the topic will not be on the exam when it will be. (Consequence: missing potential exam material).
- Type II error: Failing to conclude the topic will not be on the exam when it will not be. (Consequence: studying material that is not on the exam, time inefficiency).
- The seriousness here can be debated, but often, preparing for the exam effectively means focusing on likely topics, making the Type I error (thinking it's NOT on the exam when it IS) potentially more detrimental to the exam score. If the question is phrased as
H0: Topic IS on examvsHa: Topic is NOT on exam, then Type II (failing to detect topic is on exam) is more serious. The provided text implies the former, making Type II more serious. However, the provided text phrasing for II actually flips this.The provided document's interpretation for (II):
- H0: The topic will be on the exam.
- Ha: The topic will not be on the exam.
- Type I error: Concluding the topic will not be on the exam, when it actually will be. (Serious if you skip studying it).
- Type II error: Failing to conclude that the topic will not be on the exam, when it actually will not be. (This is slightly confusingly phrased).
Reinterpreting (II) based on typical hypothesis formulation:
- H0: The topic will not be on the exam.
- Ha: The topic will be on the exam.
- Type I error: Concluding the topic will be on the exam, when it will not be. (You waste study time).
- Type II error: Failing to conclude the topic will be on the exam, when it actually will be. (You fail to study a topic that appears on the exam).
Based on the document's specific wording for (II) and its implied consequences, a Type II error is often considered more serious in situations where missing a critical piece of information (like a police car or an important exam topic) can lead to significant negative outcomes.
10. Hypothesis testing using z and t distributions (part 7)
This section transitions from hypothesis testing with known population standard deviation to the more realistic scenario where the population standard deviation is unknown, introducing the t-distribution for statistical inference.
10.1 The t-distribution
When the population standard deviation, denoted by ϵ, is unknown, it is estimated using the sample standard deviation, s. This leads to the definition of a new standardized variable, the t-statistic.
The t-statistic is defined as: T=s/nXˉ−μ where:
- Xˉ is the sample mean.
- μ is the population mean.
- s is the sample standard deviation.
- n is the sample size.
The quantity s/n is referred to as the standard error of the sample mean, representing the estimated standard deviation of the sample mean.
The t-statistic follows a t-distribution, characterized by its degrees of freedom (df). The t-distribution for a sample of size n has n−1 degrees of freedom, denoted as T(n−1). Each possible value of n corresponds to a unique t-distribution.
Note: The t-distribution is symmetric about its mean of 0. Its spread is slightly greater than that of the standard normal (Z) distribution because estimating ϵ with s introduces additional variability.
10.2 Comparing t and Z distributions
The t-distribution shares similarities with the standard normal distribution (Z-distribution) due to the similar form of their respective test statistics. However, t-distributions exhibit less area in the center and more area in the tails compared to the Z-distribution, indicating a wider spread.
As the degrees of freedom (n−1) increase, the t-distribution progressively approaches the standard normal distribution. This convergence occurs because, with larger sample sizes (n), the sample standard deviation (s) becomes a more accurate estimate of the population standard deviation (ϵ), making the t-statistic closer to the z-statistic.
| Distribution | Shape Characteristics | Behavior as Degrees of Freedom Increase |
|---|---|---|
| Z-distribution | Standardized normal curve, symmetric about 0. | N/A |
| t-distribution | Wider spread than Z, heavier tails, symmetric about 0. | Approaches Z-distribution |
Important: Critical values for selected t-distributions are typically found in t-tables, which provide values for various upper tail probabilities and degrees of freedom.
10.3 Confidence intervals using the t-distribution
When ϵ is unknown, a level C confidence interval for the population mean μ is constructed using the t-distribution: xˉ±t∗ns Here, t∗ is the upper tail critical value from the t-distribution with n−1 degrees of freedom, corresponding to an upper tail probability of (1−C)/2. This value can be found in the t-table.
This formula provides an exact confidence interval when the population is normally distributed. For non-normal populations, it serves as an approximation, particularly effective for large sample sizes due to the Central Limit Theorem.
Example: To construct a 95% confidence interval for the mean response time of emergency calls, given a sample of n=7 calls with xˉ=8.29 minutes and s=2.69 minutes, assuming response times are normally distributed:
- Degrees of freedom: df=n−1=7−1=6.
- Upper tail probability: (1−0.95)/2=0.025.
- From the t-table, the critical value t∗ for df=6 and upper tail probability 0.025 is 2.447.
- The 95% confidence interval is: 8.29±2.447(72.69)=8.29±2.447(1.016)=8.29±2.488 This results in an interval of (5.802,10.778) minutes.
Interpretation: We are 95% confident that the true mean response time for all emergency calls in the city lies between 5.802 and 10.778 minutes.
10.4 Hypothesis tests using the t-distribution
The t-distribution is also employed for hypothesis testing when the population standard deviation is unknown. The steps involved are largely the same as those for z-tests, with the primary difference being the use of the t-statistic and its corresponding p-value calculations.
The general process includes:
- Stating the hypotheses: Formulate the null (H0) and alternative (Ha) hypotheses.
- Determining the level of significance (ω): Set the threshold for rejecting H0.
- Establishing the decision rule: Based on the p-value or critical value.
- Calculating the test statistic: Use the t-statistic formula: t=s/nxˉ−μ0 where μ0 is the hypothesized population mean from H0.
- Determining the P-value: This is the probability of observing a test statistic as extreme as, or more extreme than, the one calculated, assuming H0 is true. For a right-tailed test, it's P(T(n−1)>t). For a left-tailed test, it's P(T(n−1)<t). For a two-tailed test, it's 2×P(T(n−1)>∣t∣).
- Making a conclusion: Compare the p-value to ω. If p-value ≤ω, reject H0. Otherwise, fail to reject H0.
Example (Right-tailed test): A police chief wants to know if the mean response time has increased from a known previous mean of 6.5 minutes. A sample of n=7 calls yielded xˉ=8.29 and s=2.69. The significance level is ω=0.10.
- Hypotheses: H0:μ=6.5, Ha:μ>6.5.
- Test statistic: t=2.69/78.29−6.50=1.0161.79≈1.76
- P-value: With df=6, we look at the t-table. We find that P(T>1.440)=0.10 and P(T>1.943)=0.05. Since 1.440<1.76<1.943, the p-value is between 0.05 and 0.10 6.
- Conclusion: Since the p-value (between 0.05 and 0.10) is less than or equal to ω=0.10, we reject H0. There is sufficient evidence to conclude that the department's true mean response time has increased.
P-value Interpretation: If the true mean response time were 6.5 minutes, the probability of observing a sample mean of at least 8.29 minutes would be between 0.05 and 0.10.
11. Hypothesis testing using z and t distributions (part 8)
This section details the practical application of hypothesis testing using the t-distribution for situations where the population standard deviation is unknown, covering both the critical value and p-value approaches for one-sided and two-sided tests.
11.1 Hypothesis testing with the t-distribution: Critical value approach
The critical value approach for hypothesis testing with the t-distribution mirrors the process used with the z-distribution. It involves establishing hypotheses, determining a decision rule based on critical t-values, calculating the test statistic, and comparing the two to draw a conclusion.
11.1.1 Example: Upper-tailed test
Consider a scenario where the mean response time for a department was previously 6.5. A hypothesis test is conducted to see if the mean response time has increased, using a sample of 7 individuals with a sample mean response time of 8.29 and a sample standard deviation of 2.69. The significance level is set at ω=0.10.
-
Hypotheses:
- Null Hypothesis (H0): μ=6.5
- Alternative Hypothesis (Ha): μ>6.5
-
Decision Rule: Reject H0 if the calculated t-statistic is greater than the upper critical t-value for a t-distribution with n−1=6 degrees of freedom at ω=0.10. The critical value t→ is found to be 1.440 213.
-
Test Statistic: The t-statistic is calculated using the formula: t=s/nxˉ−μ0 Plugging in the values: t=2.69/78.29−6.5=1.76
-
Conclusion: Since the calculated t-statistic (t=1.76) is greater than the critical value (t→=1.440), we reject the null hypothesis. There is sufficient evidence to conclude that the department's true mean response time has increased 214.
Note: R code can be used to find the critical value and perform the t-test.
qt(0.90, 6)yields the critical value, andt.test(times, mu=6.5, alternative="greater")provides the test results 215.
11.1.2 Example: Lower-tailed test
A fast-food restaurant claims its drive-through average waiting time is less than one minute (60 seconds). A sample of 30 customers yields a sample mean waiting time of 55 seconds and a sample standard deviation of 15 seconds. The waiting times are known to be normally distributed. We conduct a hypothesis test at the 1% level of significance (ω=0.01) using the critical value method.
-
Hypotheses:
- Null Hypothesis (H0): μ=60 seconds
- Alternative Hypothesis (Ha): μ<60 seconds
-
Decision Rule: Reject H0 if the calculated t-statistic is less than the lower critical t-value for a t-distribution with n−1=29 degrees of freedom at ω=0.01. The critical value t→ is -2.462 220.
-
Test Statistic: t=s/nxˉ−μ0 t=15/3055−60=−1.83
-
Conclusion: Since the calculated t-statistic (t=−1.83) is greater than the critical value (t→=−2.462), we fail to reject the null hypothesis. There is insufficient evidence to conclude that the true mean waiting time is less than one minute 221.
Tip: R code can be used to calculate the t-statistic and find the critical value.
qt(0.01, 29)provides the lower critical value 222.
11.2 Hypothesis testing with the t-distribution: P-value approach
The p-value approach involves calculating the probability of observing a test statistic as extreme as, or more extreme than, the one computed from the sample, assuming the null hypothesis is true. This p-value is then compared to the significance level (ω).
11.2.1 Example: Lower-tailed test
Using the same drive-through waiting time scenario as above (sample mean xˉ=55 seconds, sample standard deviation s=15 seconds, n=30, ω=0.01, H0:μ=60,Ha:μ<60), we calculate the p-value.
-
Test Statistic: As calculated previously, t=−1.83 with df=29 217.
-
P-value Calculation: The p-value is the probability of observing a t-statistic less than or equal to -1.83 from a t-distribution with 29 degrees of freedom: P(T≤−1.83). Due to the symmetry of the t-distribution, this is equal to P(T≥1.83). Using a t-table, we find that P(T≤−1.699)=0.05 and P(T≤−2.045)=0.025. Since 1.699<1.83<2.045, the p-value is between 0.025 and 0.05 218 29.
-
Conclusion: Since the p-value (between 0.025 and 0.05) is greater than the significance level (ω=0.01), we fail to reject the null hypothesis. There is insufficient evidence to support the restaurant's claim 219.
Important: When using a t-table for a lower-tailed test, rephrase the problem in terms of the area to the right of the absolute value of the calculated t-statistic.
11.2.2 Example: Two-sided test
A machine fills automobile tires to a mean air pressure of 30 pounds per square inch (psi). A sample of 25 tires has a sample mean of 30.9 psi and a sample standard deviation of 1.8 psi. Air pressure is normally distributed. We want to test if the true mean fill pressure differs from 30 psi at a 5% significance level (ω=0.05).
-
Hypotheses:
- Null Hypothesis (H0): μ=30 psi
- Alternative Hypothesis (Ha): μ=30 psi
-
Decision Rule: Reject H0 if the p-value is less than ω=0.05.
-
Test Statistic: t=s/nxˉ−μ0 t=1.8/2530.9−30=0.360.9=2.50 The degrees of freedom are df=n−1=24 228.
-
P-value Calculation: For a two-sided test, the p-value is 2×P(T≥∣t∣). We need to find 2×P(T≥2.50). From the t-table, P(T≥2.492)=0.01 and P(T≥2.797)=0.005. Since 2.492<2.50<2.797, it follows that 0.005<P(T≥2.50)<0.01. Thus, the p-value falls between 2×0.005=0.01 and 2×0.01=0.02 229 24.
-
Conclusion: Since the p-value (between 0.01 and 0.02) is less than the significance level (ω=0.05), we reject the null hypothesis. There is sufficient evidence to conclude that the true mean fill pressure differs from 30 psi.
Remember: For a two-sided test, the p-value is double the area in one tail. This means you must double the bounds obtained from the t-table.
11.3 Relationship between confidence intervals and hypothesis tests
A confidence interval can be used to conduct a two-sided hypothesis test. For a significance level ω, a (1−ω)×100% confidence interval is constructed. If the hypothesized mean value (μ0) falls outside this interval, the null hypothesis is rejected. Conversely, if μ0 is within the interval, we fail to reject the null hypothesis.
- Example: For the tire pressure test (ω=0.05), a 95% confidence interval was calculated as (30.157 psi, 31.643 psi). Since the hypothesized mean μ0=30 psi is not within this interval, we reject H0, aligning with the conclusion from the p-value method 225 230.
11.4 Practice Questions
11.4.1 Practice Question 1
A car manufacturer needs to test if a new engine meets air pollution standards, requiring the mean emission to be less than 20 parts per million (ppm). A sample of 25 engines shows a sample mean of 19.6 ppm and a sample standard deviation of 2.0 ppm. Emission levels are normally distributed with a standard deviation of 1.6 ppm. What are the appropriate hypotheses?
-
Analysis: The safety regulation states the mean must be less than 20 ppm. We want to test if the engine meets these standards. If the mean is less than 20, it meets the standard. If it's 20 or more, it doesn't.
- H0:μ=20 (This represents the boundary condition of the standard)
- Ha:μ<20 (This is the condition we are testing for evidence of, i.e., meeting the standard)
-
Answer: C H0:μ=20 vs Ha:μ<20 223.
11.4.2 Practice Question 2
Using the same scenario as Practice Question 1, and knowing that emission levels are normally distributed with a known standard deviation of 1.6 ppm, what is the test statistic?
-
Analysis: Since the population standard deviation (σ=1.6 ppm) is known, a z-test is appropriate, not a t-test.
- H0:μ=20
- Ha:μ<20
- Sample mean xˉ=19.6 ppm
- Sample size n=25
- Population standard deviation σ=1.6 ppm
The z-test statistic formula is: z=σ/nxˉ−μ0 z=1.6/2519.6−20=1.6/5−0.4=0.32−0.4=−1.25
-
Answer: D z=−1.25 224.
11.4.3 Practice Question 3
A random variable X follows a normal distribution with unknown mean μ and unknown standard deviation σ. A sample of 15 individuals is taken. A test of H0:μ=100 vs Ha:μ=100 is conducted at ω=0.05. The test statistic is t=2.25. What is the conclusion?
-
Analysis:
- H0:μ=100
- Ha:μ=100 (Two-sided test)
- Significance level ω=0.05
- Sample size n=15, so degrees of freedom df=n−1=14.
- Test statistic t=2.25.
We need to find the p-value for t=2.25 with df=14. From the t-table:
- P(T≥2.145)=0.025.
- P(T≥2.264)=0.02.
Since 2.145<2.25<2.264, the probability for the right tail is between 0.02 and 0.025: 0.02<P(T≥2.25)<0.025.
For a two-sided test, the p-value is 2×P(T≥2.25). Therefore, the p-value is between 2×0.02=0.04 and 2×0.025=0.05 14. 0.04<p-value<0.05.
Since the p-value is less than the significance level ω=0.05, we reject H0.
-
Answer: D reject H0 since the P-value is between 0.04 and 0.05 231 232.
12. Hypothesis testing using z and t distributions (part 9)
This final part of hypothesis testing details the practical application of the critical value method for two-sided tests and introduces the concept and calculation of P-values, along with important considerations for using t-procedures.
12.1 Two-sided hypothesis test: critical value method
The critical value method for a two-sided hypothesis test involves comparing the calculated test statistic to critical values derived from the chosen distribution (z or t) at a specified significance level.
Example: Air pressure test
- 1. Level of significance (ω): 0.05
- 2. Hypotheses:
- Null Hypothesis (H0): μ=30 psi
- Alternative Hypothesis (Ha): μ=30 psi (two-sided)
- 3. Decision Rule: Reject H0 if the absolute value of the test statistic ∣t∣ is greater than the critical value tα/2 with appropriate degrees of freedom. For this example, with α=0.05 and n=25 (degrees of freedom = 24), the upper 0.025 critical value for T is t→=2.064. Thus, reject H0 if t>2.064 or t<−2.064 233.
- 4. Test statistic: The formula for the t-test statistic is t=s/nxˉ−μ0. Given sample data, xˉ=30.9, s=1.8, n=25, and μ0=30, the calculated test statistic is t=1.8/2530.9−30=1.8/50.9=0.360.9=2.50.
- 5. Conclusion: Since the absolute value of the test statistic ∣t∣=∣2.50∣=2.50 is greater than the critical value t→=2.064, we reject the null hypothesis. At the 5% significance level, there is sufficient evidence to conclude that the true mean fill pressure differs from 30 psi.
The associated rejection regions for this two-sided test are visualized on a t-distribution curve, where the area in the tails beyond the critical values represents the rejection zones 234.
12.2 P-values
The P-value is the probability of observing a test statistic as extreme as, or more extreme than, the one calculated from the sample data, assuming the null hypothesis is true. It provides a measure of the evidence against the null hypothesis.
Example: One-sided upper tail test (Ha:μ>μ0)
Example: One-sided lower tail test (Ha:μ<μ0)
- Sample size n=16, degrees of freedom = 15.
- Calculated test statistic t=−0.43.
- The P-value is P(T≤−0.43). By symmetry of the t-distribution, this is equal to P(T≥0.43).
- From the t-table, P(T≥0.691)=0.25. Since 0.43<0.691, the P-value must be greater than 0.25. A P-value greater than the significance level suggests retaining H0 15 236.
The decision rule using P-values is: If the P-value is less than or equal to the significance level (α), reject H0. Otherwise, fail to reject H0.
12.3 Cautions about t-procedures
While robust, t-procedures have certain assumptions and sensitivities that users should be aware of.
-
Influence of Outliers: The t-statistic is calculated using the sample mean and sample standard deviation. Both of these statistics are highly influenced by outliers. Therefore, t-procedures can be sensitive to the presence of extreme values in the data, potentially leading to misleading conclusions.
-
Robustness to Non-normality: t-procedures are generally robust to violations of the normality assumption, especially with larger sample sizes. This means that even if the population distribution is not perfectly normal, the probability calculations for t-tests remain reasonably accurate.
-
Importance of Random Sampling: The most critical assumption for the validity of t-procedures, aside from sample size considerations, is that the data originate from a simple random sample (SRS) of the population. A non-random sample can introduce bias and invalidate the inferential statistics derived from the test 237.
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.