Confindence interval
Table of contents
- Confindence interval
- The Logic of Hypothesis Testing
- The Four Steps of a Hypothesis Test
- Uncertainty and Errors in Hypothesis Testing
- More About Hypothesis Tests
- Directional (One-Tailed) Hypothesis Tests
- Concerns about Hypothesis Testing: Measuring Effect Size
- Statistical Power
- Learning objectives
- Hypothesis Testing Example
- The Influence of Sample Size and Sample Variance
- Confidence Intervals for Estimating μ
- Reporting the Results of a T Test
- Directional Hypothesis and One-Tailed Tests
1. Confindence interval
1.1 Confidence interval
A confidence interval provides a range of scores within which the population mean is likely to lie, serving as an interval estimate. This contrasts with a point estimate, which is a single value.
If numerous random samples were drawn from a population, the point estimate would vary between samples, whereas a confidence interval is constructed to contain the true population parameter in repeated sampling.
Typically, 95% or 99% confidence intervals are used. These intervals are defined such that, for a specified percentage of samples (e.g., 95%), the true population parameter falls within the calculated limits.
For instance, if 100 samples were taken and confidence intervals calculated for each, 95 of these intervals would contain the population mean, while 5 would not.
2.
📝 If the heights of 40 randomly chosen men yielded a mean height of 175 cm and the population standard deviation is known to be 20 cm, this information can be used to calculate a confidence interval for the mean height of all men 6.
1.2 Misconception about confidence intervals
A common misconception is that a 95% confidence interval means there is a 95% probability that a specific sample contains the true population value. Instead, it signifies that if repeated samples were taken and confidence intervals constructed for each, 95% of these intervals would successfully capture the population value 5.
1.3 Computing confidence interval
To compute a confidence interval for a population mean, one typically uses the sample mean, a z-score corresponding to the desired confidence level, the standard deviation, and the sample size.
The general formula for a confidence interval for the population mean is: xˉ±zns where:
- xˉ is the sample mean.
- z is the z-score corresponding to the confidence level.
- s is the sample standard deviation.
- n is the sample size.
6.
7.
For example, if the heights of 40 randomly chosen men yielded a mean height of 175 cm and the population standard deviation is known to be 20 cm, this information can be used to calculate a confidence interval for the mean height of all men 6.
Another scenario involves determining if apples are sufficiently large. If a random sample of 46 apples yields a mean size of 86 and a standard deviation of 6.2, these values can be used in the confidence interval formula to assess the apple size 7.
2. The Logic of Hypothesis Testing
2.1 The purpose of hypothesis testing
Hypothesis testing is a statistical method used to evaluate a hypothesis about a population by examining sample data. It aims to determine if observed patterns in data are likely due to a genuine relationship or simply random chance 12.
The process involves several key steps:
- Formulate a hypothesis: This is a prediction about the relationship between variables or differences between populations.
- Measure variables and examine relationships: Data is collected to assess the variables of interest.
- Calculate probability: The probability of obtaining the observed results is calculated under the assumption that there is no actual relationship in the population (i.e., the null hypothesis is true).
- Interpret probability: If the calculated probability is sufficiently small, it suggests the findings are unlikely to be due to chance and likely reflect a real effect in the population 12.
2.2 Null and alternative hypotheses
The null hypothesis (H0) is a statement of no effect in the underlying population. This means there is no relationship between variables, no difference between populations, or no difference in responses under different conditions.
It represents the default status quo, which is accepted unless evidence leads to its rejection 13.

The research hypothesis (often denoted as H1 or Ha) is the prediction that there is an effect or a relationship between variables. The burden of proof lies with the research hypothesis to demonstrate that the null hypothesis is unlikely to be true 13 17.
2.3 The significance level (alpha)
The significance level, denoted by alpha (α), is a pre-determined probability threshold used to decide whether to reject the null hypothesis. Conventionally, a probability of 5% (or 0.05) is used as a cut-off point 15.

The p-value is the probability of obtaining an observed effect, assuming the null hypothesis is true. If the p-value is less than or equal to the significance level (α), the null hypothesis is rejected 16.
2.4 Hypothesis testing procedure
Hypothesis testing can be conducted using a standard four-step procedure to make a statistical decision about the effect of a treatment or intervention 10.
- State the hypotheses: Formulate the null (H0) and alternative (H1) hypotheses.
- Set the significance level (α): Choose the probability threshold for rejecting the null hypothesis (commonly 0.05).
- Calculate the test statistic and p-value: Use sample data to compute a test statistic and its associated p-value.
- Make a decision: Compare the p-value to α. If p≤α, reject H0; otherwise, fail to reject H0 10.
2.5 Hypothesis testing for differences
Hypothesis testing is not limited to investigating relationships between variables. It can also be used to study differences between groups 17.

3. The Four Steps of a Hypothesis Test
3.1 Overview of Hypothesis Testing
The core of inferential statistics involves making generalizations about a population based on sample data. Hypothesis testing specifically focuses on making predictions about population parameters using this sample information 19.
3.2 Step 1: State the hypotheses
This step involves formulating two opposing hypotheses about population parameters.
- Null hypothesis (H0): This hypothesis posits no change, no difference, or no relationship in the general population. In experimental contexts, it predicts that the independent variable has no effect on the dependent variable. It is identified by the symbol H0, where the subscript zero signifies a "zero-effect" hypothesis.
- Example: H0: μ=16 (non-directional).
- Alternative hypothesis (H1): This hypothesis states that there is a change, a difference, or a relationship in the general population. In experiments, it predicts that the independent variable does have an effect on the dependent variable.
- Example: H1: μ=16 (non-directional)
- Example: H1: μ>16 (directional) 20.
📝 For a non-directional alternative hypothesis, if the null hypothesis is H0: μ=16, the alternative hypothesis is H1: μ=16 20.
3.3 Step 2: Set the criteria for a decision
This step involves determining which sample means are likely to occur if the null hypothesis is true and which are very unlikely.
- Likely sample means: These are values close to the null hypothesis prediction.
- Unlikely sample means: These are values very different from the null hypothesis prediction 21.
The alpha level (α) is set to define the boundaries between likely and unlikely outcomes. For instance, with α=0.05, the extreme 5% of possible outcomes are considered unlikely.
This 5% is typically split between the two tails of the distribution, meaning 2.5% (or 0.0250) falls into each tail. For a normal distribution, a z-score of ±1.96 marks these boundaries, defining the critical region for a hypothesis test at α=0.05 22.

The set of potential samples is divided into those that are likely to be obtained and those that are very unlikely to be obtained if the null hypothesis is true 21.
📝 With α=0.05, the critical region for a two-tailed test is defined by z-scores beyond ±1.96 22.
3.4 Step 3: Collect data and compute sample statistics
This stage involves gathering data and summarizing it to evaluate the hypothesis.
- Record data: Data must be evaluated honestly and objectively, without altering decision criteria after the outcome is known.
- Summarize data: This typically involves computing the sample mean and comparing it to the hypothesized population mean 23.
- Compute the test statistic: A z-score is calculated to determine the location of the sample mean within the hypothesized distribution.
The formula for the z-score of a sample mean is: z=σMM−μ where:
- M is the sample mean.
- μ is the hypothesized population mean.
- σM is the standard error of the mean, calculated as σ/n 23.

3.5 Step 4: Make a decision
The computed z-score is used to decide whether to reject or fail to reject the null hypothesis, based on the criteria established in Step 2.
- Sample data in the critical region: If the calculated z-score falls within the critical region (i.e., it is more extreme than the critical values), it indicates that the sample outcome is very unlikely if H0 were true. The decision is to reject the null hypothesis, suggesting evidence of a treatment effect. For example, if the computed z-score is +2.40 and the critical values are ±1.96, +2.40 falls in the critical region 24.
- Sample data not in the critical region: If the computed z-score is not in the critical region (i.e., it is closer to zero than the critical values), the sample mean is reasonably close to the hypothesized population mean. The conclusion is to fail to reject the null hypothesis, meaning there is no evidence for a treatment effect. For example, if the computed z-score is 0.80 and the critical values are ±1.96, 0.80 is not in the critical region 25.
When rejecting the null hypothesis, it is stated that there is evidence for an effect, not proof. This is because there's a possibility of a Type I error (rejecting H0 when it is true).
Conversely, failing to reject H0 does not prove it true; it simply means the data did not provide sufficient evidence to reject it, and a Type II error (failing to reject H0 when it is false) might have occurred. The conclusion in this case is that there is no evidence for an effect 26.
3.6 Try This: Evaluate a treatment effect
A normal population has a mean μ=40 and a standard deviation σ=8. After a treatment, a sample of n=16 individuals yields a sample mean M=45.
Evaluate the treatment effect using a hypothesis test with α=0.05 for a two-tailed (non-directional) test 27.
3.7 Solution
- State the hypotheses and select an alpha level:
- H0: μ=40
- H1: μ=40
- α=0.05.
- Locate the critical region:
- The critical values for a two-tailed test at α=0.05 are ±1.96.
- Compute the test statistic (the z-score):
- Standard error of the mean: σM=σ/n=8/16=8/4=2.
- Z-score: z=(M−μ)/σM=(45−40)/2=5/2=+2.50.
- Make a decision about the null hypothesis:
- The computed z-score of +2.50 falls within the critical region (since +2.50 > +1.96). Therefore, we reject H0 28.
4. Uncertainty and Errors in Hypothesis Testing
4.1 Type I error
A Type I error occurs when a researcher incorrectly rejects a null hypothesis that is actually true. This means concluding there is evidence for a treatment effect when, in reality, the treatment has no effect.
The probability of committing a Type I error is determined by the alpha level (α) set for the hypothesis test. This alpha level represents the probability of obtaining sample data that falls within the critical region, even when the null hypothesis is true 32 33.

4.2 Probability of Type I error
The alpha level (α) is the predetermined probability that a hypothesis test will result in a Type I error. It dictates the likelihood of observing sample data in the critical region when the null hypothesis is, in fact, true.
Researchers typically select very small alpha levels to minimize the risk of a Type I error, as its consequences can be significant 33.
📝 The alpha level (α) is the predetermined probability that a hypothesis test will result in a Type I error, meaning you might conclude a treatment has an effect when it actually doesn't 33.
4.3 Type II error
A Type II error occurs when a researcher fails to reject a null hypothesis that is actually false. In practical terms, this means the hypothesis test misses detecting a real treatment effect.
The probability of a Type II error is denoted by the Greek letter beta (β) 34 36.

4.4 Selecting an alpha level
When selecting an alpha level, the primary goal is to minimize the risk of a Type I error. Consequently, alpha levels are typically set at very small probability values.
By convention, the maximum acceptable alpha level is 0.05 37.
Due to the potentially serious consequences of a Type I error, many researchers and publications opt for more conservative alpha levels, such as 0.01 or 0.001 37.
Using an extremely small alpha level, like 0.000001, would drastically reduce the risk of a Type I error. However, this would shift the critical region so far that it would become nearly impossible to reject the null hypothesis.
This scenario would necessitate an exceptionally large treatment effect or sample size for the sample data to reach the critical boundaries 38.

4.5 Possible outcomes of a statistical decision
The outcomes of a statistical decision can be categorized based on the researcher's decision and the actual state of affairs in the population. This leads to four possibilities: a correct decision, a Type I error, a Type II error, or another correct decision 34 35.
| Decision of Experimenter | Actual State of Affairs in the Population: The independent variable had no effect; the null hypothesis is true. | Actual State of Affairs in the Population: The independent variable had an effect; the null hypothesis is false. |
|---|---|---|
| Reject null hypothesis | Type I error—a false decision that an effect exists, which occurs with probability α. | Correct decision—this is determined by the power of the experiment. |
| Do not reject null hypothesis | Correct decision | Type II error—a failure to detect that the treatment had an effect. |
5. More About Hypothesis Tests
5.1 Reporting the results of the statistical test
When reporting the results of a hypothesis test, it is important to clearly state whether the null hypothesis (H0) was rejected or not rejected. The format for reporting these results typically includes the test statistic and the p-value.
- If H0 is rejected: This indicates a significant or statistically significant result, meaning the observed outcome is unlikely to have occurred by chance if the null hypothesis were true. The report should include the test statistic (e.g., z-score) and the p-value, often presented as p<.05 in older conventions or an exact p-value. For example, "Wearing a red shirt had a significant effect on the size of the tips left by male customers, z=2.40, p<.05." 41.
- If H0 is not rejected: This indicates that the treatment or effect was not significant. The report should reflect this, for instance: "The red shirt did not have a significant effect on the size of the tips left by male customers, z=0.75, p>.05." 42.
- Exact p-values: When using statistical software, an exact p-value is often provided. Researchers are encouraged to report this exact value. For a result to be considered statistically significant, the p-value must be less than the chosen alpha level (commonly.05). For example, a significant result might be reported as z=2.40, p=.0164.
- The p-value represents the probability that the observed result would occur if the null hypothesis were true. It is also the probability of a Type I error 43.
5.2 Factors that influence a hypothesis test
Several factors influence the outcome of a hypothesis test, affecting the likelihood of rejecting the null hypothesis. These factors primarily impact the test statistic's value, particularly the z-score.
- Difference between sample mean and hypothesized population mean: A larger difference increases the likelihood of finding a significant result.
- Standard error: This is determined by the variability of scores (standard deviation or variance) and the sample size (n).
- High variability: Increases the standard error, leading to a smaller z-score (closer to zero) and reducing the chance of finding a significant effect.
- Decreasing sample size: Increases the standard error, resulting in a smaller z-score (closer to zero) 44.
5.3 Assumptions for hypothesis tests with z-scores
For hypothesis tests using a z-score test statistic to be valid, several assumptions must be met.
- Random Sampling: The data must be collected using a random sampling method to ensure the sample is representative of the population.
- Independent Observations: Each observation in the sample must be independent of all other observations.
- The value of σ is unchanged by the treatment: The population standard deviation (σ) should remain constant and unaffected by any experimental treatment or manipulation.
- Normal Sampling Distribution: The sampling distribution of the test statistic (e.g., the distribution of sample means) should be approximately normal. This is often assumed when the population is normally distributed or when the sample size is sufficiently large (typically n≥30) due to the Central Limit Theorem 45.
The figure above illustrates the normal distribution curve and how critical regions are defined based on different significance levels (alpha). These critical regions help determine whether a test statistic falls into the range that leads to rejecting the null hypothesis 38.
The choice between a one-tailed and a two-tailed hypothesis test depends on the research question. A one-tailed test predicts a specific direction of the effect (e.g., the mean will increase), while a two-tailed test predicts that there will be a difference, without specifying the direction .
A two-tailed hypothesis test involves examining the probability in both tails of the sampling distribution. This is commonly used when comparing two group means to see if there is any significant difference between them, regardless of which group has the higher mean .
6. Directional (One-Tailed) Hypothesis Tests
6.1 One-tailed versus two-tailed hypothesis tests
A one-tailed hypothesis specifies the direction of the relationship between variables or the difference between two conditions. In contrast, a two-tailed hypothesis predicts a relationship or difference but does not specify its direction 47 48.
When using a significance level (alpha) of 0.05:
- A two-tailed test divides alpha equally between testing for significance in both directions (positive and negative). This means 0.025 of alpha is allocated to each tail of the distribution 49.
- A one-tailed test allocates the entire alpha to testing for significance in the single direction of interest. This means the entire 0.05 alpha is in one tail of the distribution 50.

6.2 When to use a one-tailed test
A one-tailed test is appropriate when the consequences of missing an effect in the untested direction are negligible, irresponsible, or unethical 51.
6.3 When not to use a one-tailed test
It is inappropriate to choose a one-tailed test solely to achieve statistical significance. Similarly, it is not appropriate to switch to a one-tailed test after a two-tailed test failed to reject the null hypothesis, regardless of how close the result was to significance 52.
6.4 Directional (one-tailed) hypothesis test
A directional hypothesis test, also known as a one-tailed test, allows for the statistical hypotheses (H0 and H1) to specify an increase or decrease in a population mean, thereby stating the direction of the effect. The critical region for a directional test is defined by sample outcomes that are highly unlikely if the null hypothesis is true, providing convincing evidence of a treatment effect in the predicted direction 53 57.
6.5 Example 8.3: Red shirts and tips
This example examines whether waitresses wearing red shirts increase tips from male customers. The general population of male customers, served by waitresses in white shirts, has a mean tip of μ=15.8 percent with a standard deviation of σ=2.4 percentage points.
A sample of n=36 participants served by waitresses in red shirts yielded a sample mean of M=16.5 percent 54.
The hypotheses for this directional test are:
- Null Hypothesis (H0): Tips are not increased. The treatment does not work. In symbols, H0:μ≤15.8.
- Alternative Hypothesis (H1): Tips are increased. The treatment works as predicted. In symbols, H1:μ>15.8 55 56.
The standard error of the mean (σM) is calculated as σ/n=2.4/36=2.4/6=0.4 58.
The sample mean of M=16.5 percent corresponds to a z-score of: z=(M−μ)/σM=(16.5−15.8)/0.4=0.7/0.4=1.75 59.
This z-score of 1.75 falls within the critical region for a one-tailed test, indicating a very unlikely outcome if H0 were true 58 59.

Therefore, the null hypothesis is rejected, concluding that the red shirt significantly increases tips from male customers. This result would be reported as: "Wearing a red shirt produced a significant increase in tips, z=1.75, p<.05, one tailed." 59.
📝 The hypotheses for a directional test examining if red shirts increase tips are H0:μ≤15.8 and H1:μ>15.8. A sample mean of M=16.5 percent with a standard error of 0.4 yields a z-score of 1.75, leading to the rejection of the null hypothesis 55 59.
6.6 Comparison of one-tailed vs. two-tailed tests
The primary goal of hypothesis testing is to determine if a treatment has any effect on a population. The key difference between one-tailed and two-tailed tests lies in their criteria for rejecting the null hypothesis (H0) 60.
| Test Type | Criteria for Rejecting H0 |
|---|---|
| One-tailed test | Allows rejection of H0 when the difference between the sample and population is relatively small, provided the difference is in the specified direction. |
| Two-tailed test | Requires a relatively large difference between the sample and the population, regardless of direction. |
7. Concerns about Hypothesis Testing: Measuring Effect Size
7.1 Concerns about hypothesis testing
Hypothesis testing is widely used, but it has limitations. A statistically significant result does not guarantee a large or meaningful treatment effect.
Statistical significance alone does not inform about the absolute magnitude of an effect.
- Statistical significance does not equate to a large effect size.
- Hypothesis testing outcomes do not provide information on the absolute size of a treatment effect 63.
7.2 Effect size
Effect size measures the absolute magnitude of a treatment effect, independent of sample size. Cohen's d is a common method for standardizing this measurement by expressing the mean difference in terms of the standard deviation 64.
The formula for Cohen's d is:

Estimated Cohen's d is computed by dividing the mean difference between groups by the standard deviation. This measure quantifies the distance between two means and is typically reported as a positive value 65.

7.3 Evaluating effect size 66
Cohen's d provides a standardized way to evaluate the magnitude of an effect. Different values of Cohen's d are categorized to indicate the size of the effect.
| Magnitude of d | Evaluation of Effect Size |
|---|---|
| d = 0.2 | Small effect (mean difference around 0.2 standard deviation) |
| d = 0.5 | Medium effect (mean difference around 0.5 standard deviation) |
| d = 0.8 | Large effect (mean difference around 0.8 standard deviation) |

8. Statistical Power
8.1 Definition of statistical power
The power of a statistical test is the probability that the test will correctly reject a false null hypothesis. This means power is the probability that the test will identify a treatment effect if one truly exists.
It is calculated as 1 minus the probability of a Type II error (beta, β). Researchers typically calculate power before conducting a study to determine if the research is likely to be successful 69.
8.2 Calculating power
To calculate power, assumptions must be made about factors influencing the hypothesis test outcome. Consider a population with a mean of μ=80 and a standard deviation of σ=10.
A researcher plans to sample n=25 individuals and administer a treatment expected to add 8 points to each score, resulting in a new mean of μ=88 71.
The distribution of sample means for n=25 under the null hypothesis (no effect) is centered at μ=80. If the treatment has an 8-point effect, the distribution of sample means is centered at μ=88.
Both distributions have a standard error of the mean (σM) 71 74.
The standard error of the mean is calculated as: σM=nσ With σ=10 and n=25, the standard error is: σM=2510=510=2 74.
To find the exact power, we determine the portion of the distribution under the alternative hypothesis (treatment effect) that falls into the critical region defined by the null hypothesis. The critical boundary for a two-tailed test with α=0.05 is z=±1.96 76 77.
For the null hypothesis distribution (μ=80, σM=2), the critical boundary of z=+1.96 corresponds to a sample mean of: M=μ+zσM=80+(1.96×2)=80+3.92=83.92 Any sample mean greater than 83.92 would lead to rejecting the null hypothesis 77 78.
Next, we find the z-score for this critical mean (83.92) within the distribution of sample means under the alternative hypothesis (μ=88, σM=2): z=σMM−μ=283.92−88=2−4.08=−2.04 78.
Looking up z=−2.04 in the unit normal table, the area greater than this value (p>−2.04) is 0.9793. Therefore, the power of the test is 97.93%. This indicates that if the treatment has an 8-point effect, the study is almost certain to detect it 79.

📝 A researcher plans a study with a population mean μ=80 and standard deviation σ=10. They will sample n=25 individuals and expect a treatment to increase scores by 8 points (μ=88). The standard error of the mean is σM=2510=2. For a two-tailed test with α=0.05, the critical boundary is z=±1.96. A sample mean of 83.92 would lead to rejecting the null hypothesis. The z-score for this mean under the alternative hypothesis is z=283.92−88=−2.04, resulting in a power of 97.93% 71 78.
8.3 Factors that affect power
Several factors influence the power of a hypothesis test:
- Sample size (n): Larger sample sizes increase power.
- Effect size: Larger effect sizes increase power.
- Alpha level (α): Higher alpha levels increase power.
- Type of test: One-tailed tests generally have higher power than two-tailed tests, assuming the effect is in the predicted direction 80.
8.4 Power and effect size
Power and effect size are directly related. A larger effect size means the distribution of sample means under the alternative hypothesis is further from the null hypothesis distribution.
This results in a greater overlap with the critical region, increasing the probability of rejecting the null hypothesis and thus increasing power. Measures like Cohen's d quantify effect size and, like power, indicate the magnitude of a treatment effect 81.
8.5 Sample size
Increasing the sample size significantly influences power. For instance, if the sample size in the previous example were reduced from n=25 to n=4, the standard error would increase 83.
The standard error of the mean is calculated as: σM=nσ With n=4 and σ=10: σM=410=210=5 83.

📝 If the sample size in the previous example were reduced from n=25 to n=4, the standard error of the mean would increase from 2 to σM=410=5 83.
8.6 Alpha level
Reducing the alpha level (α) for a hypothesis test decreases the test's power. A lower alpha level requires a more extreme result to reject the null hypothesis, shifting the critical boundary further into the distribution of sample means under the alternative hypothesis.
This reduces the proportion of the treatment distribution falling within the critical region, lowering the probability of rejecting the null hypothesis 84.

8.7 One-tailed vs. two-tailed tests
If the treatment effect is in the predicted direction, changing from a two-tailed test to a one-tailed test increases the power of the hypothesis test. This is because a one-tailed test moves the critical boundary to a more extreme value, capturing a larger proportion of the treatment distribution within the critical region 85.

9. Learning objectives
9.1 Circumstances for using a t statistic
The t statistic is used for hypothesis testing when the population standard deviation (σ) is unknown, which is a common scenario in research. In contrast, the z-score requires knowledge of the population standard deviation.
The fundamental difference lies in the denominator of the test statistic: the z-score uses the population standard error (σM), while the t statistic uses the estimated standard error (sM).
The z-score formula is: z=σMM−μ 88.
Where:
- M is the sample mean.
- μ is the population mean.
- σM is the population standard error.
The t statistic formula is: t=sMM−μ 92.
Where:
- M is the sample mean.
- μ is the population mean.
- sM is the estimated standard error of the mean.
9.2 Problems with z scores
The primary limitation of using z-scores for hypothesis testing is the requirement to know the population standard deviation (σ). This value is often not available in real-world research situations, making the z-score formula impractical 88.
9.3 Sample variance and standard deviation 89
Sample variance (s2) and sample standard deviation (s) are used to estimate population variance and standard deviation when these population parameters are unknown.
| Statistic | Formula |
|---|---|
| Sample variance (s2) | s2=n−1SS=dfSS |
| Sample standard deviation (s) | s=n−1SS=dfSS |
Where:
- SS is the sum of squares.
- n is the sample size.
- df is the degrees of freedom.
📝 For a sample of n=9 scores with SS=288, the sample variance is s2=36 and the sample standard deviation is s=6 93.
9.4 Estimated standard error 90
When the population standard deviation (σ) is unknown, the estimated standard error (sM) is used as an estimate of the true standard error. It quantifies the standard distance between a sample mean (M) and the population mean (μ).
The estimated standard error can be calculated using the sample standard deviation or sample variance:
| Formula | Description |
|---|---|
| sM=ns | Estimated standard error using sample standard deviation |
| sM=ns2 | Estimated standard error using sample variance |
The shift from using standard deviation to variance in estimating standard error is made because the sample variance (s2) provides an unbiased estimate of the population variance (σ2). This approach also standardizes the formulas for various t statistics that will be encountered 91.
📝 If the sample standard deviation is s=6 and the sample size is n=9, the estimated standard error is sM=96=2 90.
9.5 What is the t statistic
The t statistic is a test statistic used to test hypotheses about an unknown population mean (μ) when the population standard deviation (σ) is unknown. It shares the same structure as the z-score formula but incorporates the estimated standard error (sM) in the denominator 92.
9.6 Degrees of freedom and the t statistic
Degrees of freedom (df) represent the number of scores in a sample that are free to vary. For a sample of size n, there are n−1 degrees of freedom because the sample mean imposes a restriction on one of the scores 93.
The greater the degrees of freedom, the better the sample variance represents the population variance, and the more closely the t statistic approximates the z-score 93.
For a sample of n=9 scores with SS=288, compute the sample variance and the estimated standard error for the sample mean 93.
9.7 The t distribution
A t distribution is the complete set of t values calculated from all possible random samples of a specific size (n) or degrees of freedom (df). Similar to the normal distribution, the t distribution approximates its shape. 94 95.
As the sample size (n) increases, the degrees of freedom (n−1) also increase, causing the t distribution to more closely resemble the normal distribution 94.
9.8 The shape of the t distribution
The shape of a t distribution varies with its degrees of freedom (df). As df increases, the t distribution becomes more similar to a normal z-score distribution.
However, the t distribution exhibits more variability than a normal distribution, particularly with small df values. It tends to be flatter and more spread out, while the normal distribution has a more pronounced central peak 96.

The increased variability in the t distribution compared to the normal distribution arises because the denominator of the t statistic, the estimated standard error (sM), varies from sample to sample as the sample variance changes. In contrast, the standard error in the z-score formula is constant for samples of the same size from the same population. 97 98.
9.9 Determining proportions and probabilities for t distributions
A t distribution table is used to find proportions (probabilities) associated with t statistics 99.
- Proportion in One Tail: 0.25, 0.10, 0.05, 0.025, 0.01, 0.005
- Proportion in Two Tails Combined: 0.50, 0.20, 0.10, 0.05, 0.02, 0.01
- df=1: 1.000, 3.078, 6.314, 12.706, 31.821, 63.657
- df=2: 0.816, 1.886, 2.920, 4.303, 6.965, 9.925
- df=3: 0.765, 1.638, 2.353, 3.182, 4.541, 5.841
- df=4: 0.741, 1.533, 2.132, 2.776, 3.747, 4.604
- df=5: 0.727, 1.476, 2.015, 2.571, 3.365, 4.032
- df=6: 0.718, 1.440, 1.943, 2.447, 3.143, 3.707 99.
As the degrees of freedom (df) increase, the proportions in a t distribution become more similar to those in a normal distribution. When the sample size and degrees of freedom are sufficiently large, the difference between the t distribution and the normal distribution becomes negligible 100.
For example, with a 5% proportion in one tail, the critical t-value approaches the z-score value as df increases 100.

📝 With df=3, a proportion of 0.05 in one tail corresponds to a t-value of 2.353, while a proportion of 0.05 in two tails combined corresponds to a t-value of 3.182 99.
9.10 Hypothesis tests with the t-statistic
In hypothesis testing using the t-statistic, the null hypothesis (H0) specifies a value for the unknown population mean (μ). The sample data provide the sample mean (M), and the sample variance and estimated standard error are computed from these data.
These values are then substituted into the t-statistic formula 101.
The formula for the t-statistic in hypothesis testing is: t=estimated standard errorsample mean−population mean 101.
Where:
- The numerator is the difference between the sample mean and the hypothesized population mean.
- The denominator is the estimated standard error computed from the sample data.
9.11 The unknown population
Hypothesis tests involving the t-statistic often examine the effect of a treatment on a population. The mean of the population before treatment is typically known.
The research question is whether the treatment alters the scores and consequently changes the population mean. In such cases, the unknown population is the one that exists after the treatment has been administered.
The null hypothesis posits that the treatment does not change the population mean 102.
For instance, if a treatment is expected to change a population mean from μ=30, the null hypothesis might state that the mean remains at 30 after treatment, while the alternative hypothesis suggests it changes to some other value (μ=?) 102.
10. Hypothesis Testing Example
10.1 Stating Hypotheses and Selecting an Alpha Level
This section details a hypothesis testing example concerning infant facial preference. Researchers investigated whether infants prefer to look at attractive faces.
A sample of nine infants was observed, with data showing an average of 13 seconds spent looking at the attractive face, and a sum of squares (SS) of 72. The study aims to determine if this preference is statistically significant, given that the population mean and standard deviation are unknown.
The null hypothesis (H0) posits that the mean looking time for the attractive face is 10 seconds, while the alternative hypothesis (H1) suggests it is not equal to 10 seconds. A significance level (α) of 0.05 is chosen for a two-tailed test.
- Null Hypothesis (H0): μattractive=10 seconds.
- Alternative Hypothesis (H1): μattractive=10 seconds.
- Significance Level (α): 0.05 (two-tailed) 103 104.
10.2 Locating the Critical Region
To locate the critical region, the degrees of freedom (df) must first be calculated. For this sample size of n=9, the degrees of freedom are n−1.
- Degrees of Freedom (df): n−1=9−1=8 104.
With 8 degrees of freedom and a two-tailed test at the α=0.05 significance level, the critical region is defined by t values greater than +2.306 or less than -2.306.
105.
10.3 Calculating the Test Statistic
The calculation of the test statistic involves several steps, beginning with the sample variance.
- Sample Variance (s2): Calculated using the sum of squares (SS) and degrees of freedom (df). s2=n−1SS=872=9 106.
Next, the estimated standard error of the mean (sM) is computed using the sample variance and sample size.
Finally, the t statistic is computed by dividing the difference between the sample mean and the hypothesized population mean by the estimated standard error.
- t Statistic: t=sMM−μhypothesized=113−10=3.00 107.
10.4 Making a Decision Regarding H0
The obtained t statistic of 3.00 is compared to the critical region to make a decision about the null hypothesis. Since 3.00 falls into the critical region on the right-hand side (t > 2.306), the null hypothesis is rejected.
- Decision: Reject H0.
- Conclusion: The statistical decision is to reject H0, concluding that babies do show a preference when given a choice between an attractive and an unattractive face 107.
10.5 Assumptions of the t Test
For the t test to be valid, certain assumptions about the data and the population sampled must be met.
- Independent Observations: The values within the sample must be independent of each other.
- Normality of Population: The population from which the sample is drawn must be approximately normal 108.
11. The Influence of Sample Size and Sample Variance
11.1 The t-statistic formula
The t-statistic is a crucial measure in statistical analysis, and its value is directly influenced by both the sample size and the sample variance. Understanding the structure of the t-statistic formula reveals how these factors impact statistical decisions.
- t-statistic: This value quantifies the difference between a sample mean and a hypothesized population mean, relative to the variability within the sample.
t=sMM−μ M: The sample mean.\mu: The hypothesized population mean.s_M: The standard error of the mean.- Standard error of the mean (
s_M): This represents the standard deviation of the sampling distribution of the mean. It is calculated by dividing the sample standard deviation (s) by the square root of the sample size (n). sM=ns2 s^2: The sample variance.n: The sample size 109.
11.2 Measuring effect size for the t statistic
Effect size measures quantify the magnitude of a treatment's impact, independent of sample size. For t-statistic tests, Cohen's d is a commonly used measure, representing the difference between means in terms of standard deviation units.
- Cohen's d: This is a standardized measure of the difference between two means. It is calculated by dividing the difference between the means by the standard deviation.
d=standard deviationmean difference - Estimating Cohen's d: When population parameters are unknown, sample statistics are used as estimates. The estimated Cohen's d uses the sample mean (
M), the hypothesized population mean (\mu), and the sample standard deviation (s).
estimated d=sM−μ - Sample standard deviation (
s): This is calculated using the sum of squared deviations (SS) divided by the degrees of freedom (df), with the result then square-rooted.
s=dfSS 110 111 112.
📝 For a study where babies spent an average of 13 seconds looking at an attractive face, with a hypothesized population mean of 10 seconds and a sample standard deviation of 3 seconds, the estimated Cohen's d is calculated as d=313−10=1 112 113.
11.3 Example of Cohen's d calculation
In a study on infant face preference, babies spent an average of 13 seconds looking at an attractive face. The null hypothesis suggested no preference, meaning the population mean would be 10 seconds.
The sample standard deviation was calculated to be 3 seconds.
- Mean difference: The difference between the observed sample mean (13 seconds) and the hypothesized population mean (10 seconds) is 3 seconds.
- Estimated Cohen's d: Using the formula, the estimated Cohen's d is calculated as the mean difference (3 seconds) divided by the sample standard deviation (3 seconds).
d=313−10=33=1 This result of 1 indicates a large treatment effect.
112 113.
11.4 Measuring the percentage of variance explained
Another method to assess effect size is by determining the proportion of variability in the scores that can be attributed to the treatment effect. This is often reported as r², the percentage of variance accounted for.
- Concept of variance explained: The treatment effect causes scores to deviate from the null hypothesis mean. Measuring this deviation and comparing it to the total variability helps quantify the treatment's impact.
- Calculating SS: The sum of squared deviations (SS) is calculated in two ways: first, with the original scores relative to the hypothesized mean (
\mu = 10), and second, with adjusted scores where the treatment effect is removed, also relative to the hypothesized mean. - Original SS (with treatment effect): 153
- Adjusted SS (without treatment effect): 72
- Variability accounted for: The difference between the original SS and the adjusted SS represents the variability explained by the treatment. 153−72=81
- Proportion of variance explained (
r²): This is calculated by dividing the variability accounted for by the treatment by the original total variability. r2=Original total variabilityVariability accounted for=15381≈0.5294 This means the treatment effect explains approximately 52.94% of the variance in the scores 114 115 116 117 118.
11.5 Calculating r² from the t-statistic
The percentage of variance accounted for (r²) can also be directly calculated from the t-statistic and degrees of freedom, providing a convenient alternative to comparing SS values.
- Formula for
r²: The relationship betweenr², the t-statistic (t), and degrees of freedom (df) is given by:
r2=t2+dft2 - Application: For a t-statistic of 3.00 with 8 degrees of freedom,
r²is calculated as: r2=32+832=9+89=179≈0.5294 This yields the same result of approximately 52.94% variance explained 119.
📝 For a t-statistic of 3.00 with 8 degrees of freedom, r2 is calculated as r2=32+832=179≈0.5294 119.
11.6 Criteria for evaluating r² 120
Cohen proposed guidelines for interpreting the magnitude of treatment effects based on the r² value. These criteria help in understanding whether an observed effect size is small, medium, or large .
| Percentage of Variance Explained, r² | Effect Size |
|---|---|
| 0.01 | Small effect |
| 0.09 | Medium effect |
| 0.25 | Large effect |
12. Confidence Intervals for Estimating μ
12.1 Introduction to confidence intervals
An alternative method for describing the size of a treatment effect is to compute an estimate of the population mean after treatment. Estimating an unknown population mean involves constructing a confidence interval.
A confidence interval is an interval or range of values centered around a sample statistic, based on the logic that a sample statistic should be relatively near to the corresponding population parameter 121.
12.2 Constructing a confidence interval
The construction of a confidence interval begins with the observation that every sample mean has a corresponding t value. To construct a confidence interval for the population mean (μ), we plug the estimated t value into the t equation and then calculate μ.
The basic equation for a confidence interval is 122 123:

The equation shows how to calculate the confidence interval for a population mean (μ). It involves a sample mean (M), a t-score (t), and the standard error of the mean (sM).
The plus-minus symbol indicates the range of the confidence interval 123.
The formula for calculating the t-value, used in constructing a confidence interval, is:

12.3 Example for confidence intervals
Consider a study where infants showed a preference for a more attractive face. A sample of n=9 infants spent an average of M=13 seconds looking at the more attractive face, with an estimated standard error of sM=1.
We will construct an 80% confidence interval to estimate the mean time the population of infants spends looking at the more attractive face 124 125.
The estimation formula is: μ=M±tsM 124.
Using the sample data (M=13, sM=1) and an 80% confidence level, we estimate the t statistic. With degrees of freedom (df=n−1=8), the middle 80% of the t distribution is bounded by t values of +1.397 and –1.397 125 126.
Plugging these values into the formula: μ=13±1.397(1.00)=13±1.397 126.
This yields an interval from μ=13−1.397=11.603 seconds to μ=13+1.397=14.397 seconds. We are 80% confident that the true population mean lies within this range 127.
The formula for calculating a confidence interval for a population mean is:

📝 In a study, n=9 infants spent an average of M=13 seconds looking at an attractive face, with a standard error sM=1. An 80% confidence interval was calculated as μ=13±1.397(1.00), resulting in an interval of 11.603 to 14.397 seconds 126.
12.4 Factors affecting the width of a confidence interval
The width of a confidence interval is influenced by two main factors: the level of confidence and the sample size 128.
- Level of confidence: To increase confidence in the estimate, the width of the interval must be increased.
- Sample size: A larger sample size (n) results in a smaller interval width. This is because a larger sample provides more information about the population 128.
13. Reporting the Results of a T Test
13.1 Reporting t-test results
In scientific reports, the term "significant" indicates that the null hypothesis (H₀) has been rejected, while "not significant" means there was a failure to reject H₀. The reporting format for a t-test includes the calculated test statistic, degrees of freedom, and the alpha level.
A concise statement conveys this information, typically including the sample mean (M), standard deviation (SD), the t-statistic with its degrees of freedom in parentheses, the p-value, and an effect size measure like r2. For example, "The infants spent an average of M = 13 out of 20 seconds looking at the attractive face, with SD = 3.00. Statistical analysis indicates that the time spent looking at the attractive face was significantly greater than would be expected if there were no preference, t(8)=3.00, p<.05, r2=0.5294." 130.
If an 80% confidence interval is reported to describe effect size, it is added after the hypothesis test results 131.
The exact probability (p-value) associated with the t-value is often calculated by statistical software and should be used in research reports when available 131.
| Component | Description |
|---|---|
| t-statistic | The calculated value of the test statistic. |
| Degrees of freedom (df) | The number of independent pieces of information used to estimate a parameter. For a t-test, df = n-1, where n is the sample size. |
| p-value | The probability of obtaining the observed results (or more extreme results) if the null hypothesis were true. |
| Alpha level (α) | The significance level, typically set at.05, representing the threshold for rejecting the null hypothesis. |
| Effect size (e.g., r²) | A measure of the magnitude of the observed effect, indicating the proportion of variance explained by the independent variable. 130 |
| Confidence Interval (CI) | A range of values that is likely to contain the true population parameter. 126 131 |
14. Directional Hypothesis and One-Tailed Tests
14.1 Directional hypothesis and one-tailed tests
A directional (one-tailed) test is used in research when there is a specific, a priori reason to predict an effect in a particular direction. This contrasts with a non-directional (two-tailed) test, which is more common and does not specify a direction.
Directional tests are often employed in exploratory investigations, pilot studies, or when prior research strongly supports a predicted outcome 132.
The process for conducting a directional hypothesis test involves several steps:
- Step 1: State the hypotheses and select an alpha level. The null hypothesis (H0) posits that the predicted effect will not occur, while the alternative hypothesis (H1) states that the treatment will have the predicted effect in a specific direction. The level of significance (α) is then chosen, typically at.01 or.05 133.
- Step 2: Locate the critical region. This involves identifying the area in the distribution of the test statistic that would lead to the rejection of the null hypothesis. For a one-tailed test, this region is entirely in one tail of the distribution (either left or right).
- Step 3: Calculate the test statistic. The computation of the test statistic (e.g., a t statistic) is the same whether the test is one-tailed or two-tailed.
- Step 4: Make a decision. If the calculated test statistic falls within the critical region, the null hypothesis (H0) is rejected. This indicates that the observed effect is statistically significant in the predicted direction 134.

14.2 Example of a one-tailed test
Consider a research question investigating whether attractiveness influences infant behavior when viewing photographs of women's faces. The researcher hypothesizes that infants will spend more than half of a 20-second observation period looking at the more attractive face.
For this study, a sample of n=9 infants was observed. The mean time spent looking at the attractive face was M=13 seconds, with a sum of squares (SS) of 72. The significance level was set at α=.01 132.
The hypotheses are stated as:
- Null Hypothesis (H0): The infants will not spend more than half of the time looking at the attractive face.
- Alternative Hypothesis (H1): The infants will spend more than half of the time looking at the attractive face 133.
The computed t statistic for this experiment was t=3.00. Since the test statistic falls within the critical region (which is in the right-hand tail of the distribution for this directional test), the null hypothesis is rejected 134.
This decision means that the infants spent a significantly greater amount of time looking at the attractive face compared to the unattractive face, supporting the directional hypothesis. The results can be reported as: t(8)=3.00, p<.01, one-tailed 135.

📝 A researcher hypothesized that infants would spend more than half of a 20-second period looking at an attractive face. With n=9 infants, the mean time was M=13 seconds, and the computed t statistic was t=3.00. This led to rejecting the null hypothesis, indicating a significant preference for the attractive face (t(8)=3.00, p<.01, one-tailed) 132.
14.3 The critical region for a one-tailed test
The critical region for a one-tailed test is located entirely in one tail of the distribution, either the right-hand tail (for a positive predicted effect) or the left-hand tail (for a negative predicted effect). Determining which tail contains the critical region is crucial for correctly interpreting the test statistic 136.
| Hypothesis Type | Critical Region Location |
|---|---|
| Directional (Right-tailed) | Entirely in the right tail of the distribution |
| Directional (Left-tailed) | Entirely in the left tail of the distribution |
| Non-directional (Two-tailed) | Split between both the left and right tails of the distribution |
© 2026 Maeve. All rights reserved. This content is protected by copyright.