Statistical analysis
Table of contents
- Descriptive Statistics
- Inferential Statistics: Making The Leap from Sample to Population
- Inferential Statistics: Making the Leap from sample to population 2 – 09/28/26
- t-tests for Independent Groups and Paired Designs
1. Descriptive Statistics
1.1 Variable types
Variables in research can be classified into two main categories: continuous and discrete. This classification helps in understanding the nature of the data and choosing appropriate statistical methods.
- Continuous variable: A variable that can take on any value within a given range. There are an unlimited number of possible values between any two given values.
- Examples include height, weight, time, and temperature.
- Discrete variable: A variable that can only take on specific, distinct, or separated values. These are often whole numbers and cannot have fractional values between them.
- Examples include the number of eggs in a basket, the number of children in a family, or the number of toys in a box.
1.2 Pictures of data: Histograms
Histograms are graphical tools used to visualize the distribution of data, particularly for continuous variables. They help in understanding the shape, center, and spread of the data.
- Histogram: A graphical representation that displays the distribution of numerical data. The data is divided into bins (intervals), and the height of each bar represents the number of observations that fall within that bin.
- Histograms are useful for depicting the frequency distribution of a dataset.
- They allow for quick visual assessment of data patterns, such as skewness and modality.
1.3 Measures of central tendency
Measures of central tendency provide a single value that represents the center or typical value of a dataset. The most common measures are the mean, median, and mode.
- Mean: The average of a dataset, calculated by summing all values and dividing by the number of values.
- Represented by μ for a population and M for a sample.
- It is sensitive to outliers, especially in smaller datasets.
- Median: The middle value in a dataset when the data is ordered from least to greatest.
- If there is an even number of data points, the median is the average of the two middle values.
- It is less affected by outliers than the mean and can be used for ordinal data.
- Mode: The value that appears most frequently in a dataset.
- It can be used for any level of measurement, including nominal data.
- A dataset can have one mode (unimodal), two modes (bimodal), or more (multimodal).
1.4 Measures of spread
Measures of spread, also known as measures of variability or dispersion, describe how spread out or clustered the data points are. Key measures include range, standard deviation, variance, and interquartile range.
| Measure | Description | Sensitivity to Outliers |
|---|---|---|
| Range | The difference between the maximum and minimum scores in a dataset. | High |
| Standard Deviation (s or σ) | The average or typical deviation of data points from the mean. | High |
| Variance (s² or σ²) | The average of the squared deviations from the mean; expressed in squared units. | High |
| Interquartile Range (IQR) | The difference between the third quartile (Q3) and the first quartile (Q1). | Low |
- Quartiles: These divide the data into four equal parts.
- Q1: The 25th percentile.
- Q2: The 50th percentile (same as the median).
- Q3: The 75th percentile.
- Interquartile Range (IQR): Calculated as Q3 - Q1, it represents the spread of the middle 50% of the data and is resistant to extreme values.
1.5 Individual data points: Z-scores
A z-score standardizes an individual's score by expressing it in terms of standard deviation units from the mean. This allows for comparisons across different datasets with varying scales and units.
- Z-score: A measure of how many standard deviations an individual score is away from the mean.
- The formula for a z-score is z=σX−μ for a population, or z=sX−M for a sample, where X is the individual score, μ or M is the mean, and σ or s is the standard deviation.
- Z-scores provide standardization, enabling comparisons between scores from different measurement scales.
- Standard Normal Distribution: A normal distribution with a mean of 0 and a standard deviation of 1. Transforming all scores in a population to z-scores results in this distribution.
📝 If a student scores 85 on a test where the class mean is 70 and the standard deviation is 10, their z-score is z=1085−70=1.5. This means their score is 1.5 standard deviations above the mean.
2. Inferential Statistics: Making The Leap from Sample to Population
2.1 Z-scores and the Standard Normal Distribution
- A z-score indicates how many standard deviations a data point is away from the mean.
- The standard normal distribution is a normal distribution with a mean of 0 and a standard deviation of 1.
- The percentage of the distribution lying below a specific z-score can be determined. For instance, 50% of the distribution is below a z-score of 0.
- A z-score can also represent a percentile; a z-score below which a certain percentage of the distribution falls is the corresponding percentile.
📝 If 84% of the distribution lies below a certain z-score, that z-score represents the 84th percentile.
2.2 From Samples to the Population
- Sample statistics (M for mean, s for standard deviation) are used to estimate population parameters (μ for population mean, σ for population standard deviation).
- Sample statistics are expected to vary from sample to sample due to sampling variability.
- Population parameters (μ, σ) are consistent for an entire population.
- Sample means (M) are useful for predicting population means (μ).
2.3 The Dance of the Means: Sampling Distributions
- Taking the means of many samples helps visualize the differences between samples and how they relate to the population mean.
- Due to sampling variability, a range of sample means is expected, but they generally cluster around the population mean (μ).
- Larger sample sizes (N) typically result in sample means that are closer to the population mean, leading to a narrower distribution of sample means.
- Smaller sample sizes lead to more dramatic variations in sample means.
2.4 The Mean Heap: Sampling Distribution of Sample Means
- The sampling distribution of sample means, often visualized as a "mean heap," is the empirical distribution of sample means.
- This distribution approximates a normal distribution, even if the population distribution is not normal, especially with larger sample sizes.
- The mean of the sampling distribution of sample means estimates the population mean (μ).
- The standard deviation of the sampling distribution of sample means is called the standard error of the mean (SEM).
2.5 The Standard Error of the Mean (SEM)
- The SEM quantifies the precision of the sample mean (M) as an estimate of the population mean (μ).
- A smaller SEM indicates a more precise estimate of μ.
- A larger SEM indicates a less precise estimate of μ.
- The SEM is calculated as the standard deviation of the sampling distribution of sample means.
| Statistic | Represents |
|---|---|
| SD (Standard Deviation) | Descriptive statistic describing variability within a sample |
| SEM (Standard Error of the Mean) | Inferential statistic capturing variability in the estimate of the population mean |
- To reduce the SEM by half, the sample size (N) must be multiplied by four.
- As the sample size (N) decreases, the precision of the estimate decreases, leading to a larger SEM.
2.6 The Central Limit Theorem
- The Central Limit Theorem states that the sampling distribution of sample means will be approximately normal, regardless of the shape of the original population distribution.
- A larger sample size (N) results in a sampling distribution of sample means that is more closely normal.
2.7 Errors of Estimation
- Estimation error is the difference between a sample mean (M) and the population mean (μ), represented as (M−μ).
- This error reflects the distance between the point estimate from the sample and the true population parameter.
- Estimation error varies for each individual sample mean.
- Similar to how individual observations can be expressed as z-scores, estimation error can also be expressed as a z-score within the sampling distribution.
3. Inferential Statistics: Making the Leap from sample to population 2 – 09/28/26
3.1 Margin of error (MoE)
The margin of error (MoE) quantifies the largest likely error in an estimation. This "likely" is typically set at 95%, meaning that 95% of sample means are expected to fall within this margin around the true population mean.
- The MoE is calculated by combining the sample mean with a Z-score that corresponds to the desired confidence level.
- For a 95% confidence level, the Z-score is 1.96.
- The formula for the standard error of the mean (SEM) is used in conjunction with the Z-score to determine the MoE.
3.2 Confidence intervals (CI)
A confidence interval (CI) provides a range of values within which the true population parameter is likely to lie. It is constructed by adding and subtracting the margin of error from the sample statistic.
- When the population standard deviation (σ) is known, the MoE is calculated using the Z-score for the desired confidence level multiplied by the SEM.
- A 95% CI is calculated as: Sample Mean ± (Z-score for 95% × SEM).
- The Z-score of 1.96 is used for a 95% confidence level, as it captures 95% of the area under a normal distribution curve.
3.3 The dance of the CIs
The "dance of the CIs" illustrates that while random sampling means most sample means do not exactly equal the population mean (μ), most calculated confidence intervals do contain μ. However, some intervals will inevitably fail to capture μ, meaning 100% certainty is not achievable.
3.4 When the population standard deviation (σ) is unknown
When the population standard deviation (σ) is unknown, the sample standard deviation (s) is used as its best estimate. This necessitates a shift from the Z-distribution to the t-distribution.
3.5 The t-distribution
The t-distribution is similar to the normal distribution but has higher tails. This is because both the sample mean and the sample standard deviation are estimates, introducing additional variability.
- Calculating a t-score requires an additional piece of information: degrees of freedom (df).
- The t-distribution allows for the calculation of confidence intervals when σ is unknown.
3.6 Degrees of freedom (df)
Degrees of freedom (df) represent the number of independent pieces of information available in a dataset.
- The formula for df is typically N−1, where N is the sample size.
- Knowing the df is crucial for selecting the correct t-distribution curve and finding the appropriate critical t-values.
3.7 Confidence intervals when σ is unknown
When σ is unknown, confidence intervals are calculated using the sample standard deviation (s) and critical t-values instead of Z-scores.
- The length of the CI becomes more dependent on the sample's standard deviation (s), which can vary more between samples than the known population standard deviation.
- The general formula for a CI when σ is unknown is: Sample Mean ± (t-value for desired confidence level and df × SEM using s).
3.8 Null Hypothesis Significance Testing (NHST)
Null Hypothesis Significance Testing (NHST) is a dominant framework for testing hypotheses about population means.
- Null Hypothesis (H0): The skeptical hypothesis, stating there is no effect or difference (e.g., "The mean IQ of UoG students is equal to 100").
- Alternative Hypothesis (Ha): Mutually exclusive with the null, predicting a difference (e.g., "The mean IQ of UoG students is NOT equal to 100").
3.9 NHST Steps
- Formulate Hypotheses: State the null and alternative hypotheses.
- Collect Data: Gather a sample from the population of interest.
- Evaluate Likelihood: Determine the probability of obtaining the sample data if the null hypothesis were true.
3.10 NHST and Confidence Intervals
- If the value specified by the null hypothesis falls within the 95% CI calculated from the sample, the null hypothesis is accepted (we cannot conclude the population mean is different).
- If the null hypothesis value falls outside the 95% CI, the null hypothesis is rejected (we conclude the population mean is likely different).
3.11 p-values
A p-value indicates the probability of observing the obtained results, or more extreme results, if the null hypothesis were true.
- A common threshold for statistical significance is α=0.05.
- If p<α, the null hypothesis is rejected.
- If p≥α, the null hypothesis is not rejected.
3.12 One-sample t-test
This test compares a sample mean to a known or hypothesized population mean when σ is unknown.
- The obtained t-value is compared to critical t-values that define the rejection regions based on the chosen alpha level (α).
- Example: N=40, M=106, SD=12. The calculated t-value would be compared to the critical t-value for df=39 and α=0.05.
3.13 Decision Making with NHST
- Type I Error: Rejecting the null hypothesis when it is actually true (false positive). The probability of this error is α.
- Type II Error: Failing to reject the null hypothesis when it is actually false (false negative). The probability of this error is β.
3.14 p-values and CIs for One-Sample Designs
- A lower p-value indicates that the null hypothesis is further from the sample's point estimate.
- When the null hypothesis value is outside the CI, the result is statistically significant at the α level, where α=1−confidence level.
3.15 Alpha (α) and Beta (β)
- α (Alpha): Protects against Type I errors. A lower α reduces the chance of a false positive but increases the risk of a Type II error.
- β (Beta): The probability of a Type II error. It is influenced by sample size, effect size, and α.
3.16 NHST Planning: Power
Power is the probability of correctly rejecting a false null hypothesis.
- Increasing the sample size (N) is a primary way to increase power.
- Power is influenced by:
- Effect size: Larger effects are easier to detect.
- N (Sample size): Larger samples increase the likelihood of detecting an effect.
- α (Alpha): A higher α increases power but also Type I error risk.
3.17 Planning with Precision
Sample size (N) can also be determined by the desired precision of the estimates, often defined by the target margin of error.
- A larger N leads to a narrower CI and higher precision, but may be more costly or difficult to achieve.
- The target MoE specifies the desired precision for a study's estimates.
3.18 Independent Groups Design
An independent groups design involves assigning participants to two separate conditions or groups.
- The goal is to compare the means of these independent groups.
- Example: Assigning participants to either a "pen" group or a "laptop" group for note-taking to study the effect on learning.
3.19 Difference Between Two Means
This analysis focuses on the difference between the mean scores of the two independent groups (M2−M1).
| Design Type | Comparison Focus |
|---|---|
| Independent Groups Design | Difference between the means of two separate groups |
| Paired Designs | Difference between related measurements within the same group or matched pairs |
4. t-tests for Independent Groups and Paired Designs
4.1 Confidence Interval for the Difference Between Two Means
A confidence interval (CI) for the difference between two means provides a range of plausible values for the true difference between population means. This interval is calculated by taking the observed difference between sample means and adding or subtracting a margin of error (MoE).
The MoE incorporates variability within the groups and the sample sizes.
- Calculation of the 95% CI for the difference:
- The MoE is calculated as:
MoEdiff = t_0.95(df) * S_pooled * (1/n1 + 1/n2)^0.5 - The
t_0.95(df)component is derived from the t-distribution, with degrees of freedom (df) typically calculated asN1 + N2 - 2assuming homogeneity of variance. - The
S_pooledcomponent reflects the pooled variability across both groups, assuming equal variances in the populations. - The
(1/n1 + 1/n2)^0.5component represents the sample size component. - Example: For a study with M1=8.81 and M2=14.52, and a calculated MoEdiff of 3.02, the mean difference is 14.52−8.81=5.71. The 95% CI for the difference is [5.71−3.02,5.71+3.02], which is [2.69,8.73].
4.2 The Independent Groups t-test
The independent groups t-test is used to determine if there is a statistically significant difference between the means of two independent groups. It tests the null hypothesis that the difference between population means is zero.
The test statistic, tobt, is compared to a critical value, tcrit, or a p-value is calculated to assess significance.
- Calculating the t-statistic for two independent groups:
- The formula for the t-statistic is: t=Spooled(n11+n21)(M2−M1)
- Where M1 and M2 are the sample means, Spooled is the pooled standard deviation, and n1 and n2 are the sample sizes.
- Interpretation: If the calculated tobt is greater than tcrit (or if the p-value is less than the chosen alpha level, e.g., 0.05), the null hypothesis is rejected, suggesting a significant difference between the group means.
- Example: In the PenLaptop example, the calculated t-statistic (tobt) was 3.78. With 63 degrees of freedom, the critical t-value (tcrit) for a two-tailed test at α=0.05 is approximately 1.99. Since 3.78>1.99, the null hypothesis is rejected.
- Relationship with CI: A CI that does not include zero suggests a statistically significant difference, corresponding to a low p-value. The extent of overlap between CIs for individual group means is related to the p-value for the difference between those means.
4.3 Effect Size: Cohen's d
Cohen's d is a standardized measure of effect size that quantifies the difference between two means in terms of standard deviation units. It is useful for comparing the magnitude of effects across different studies or variables.
- Calculation of Cohen's d:
- d=Standardizer (a chosen standard deviation)Difference between means
- For independent groups, the standardizer is often the pooled standard deviation.
- Interpretation:
- Cohen's reference values for psychology: small = 0.2, medium = 0.5, large = 0.8.
- In social psychology, an average d is around 0.4.
- In education, an average d for learning influences is around 0.4.
- In medicine, many treatments show small effects with d between 0.05 and 0.2.
- Example: The mean height difference between male and female humans is 14 cm, while for dogs it is 3 cm. To compare these, Cohen's d would standardize these differences by dividing by the respective standard deviations for human and dog heights.
| Hypothesis | Decision | Outcome |
|---|---|---|
| H0 is true | Fail to reject H0 | Correct Decision (1 - α) |
| H0 is true | Reject H0 | Type I Error (α) |
| H0 is false | Fail to reject H0 | Type II Error (β) |
| H0 is false | Reject H0 | Correct Decision (1 - β, POWER) |
4.4 Comparing Mean Differences Across Groups
Comparing mean differences across different groups requires standardization to account for varying scales of measurement. While raw differences are informative, standardized measures like Cohen's d allow for a more direct comparison of effect magnitudes.
| Group | Mean Difference | Standardized Difference (Cohen's d) |
|---|---|---|
| Male lab (at shoulder) | 3 cm | d_dogs |
| Female lab (at shoulder) | 3 cm | d_dogs |
| Male human | 14 cm | d_humans |
| Female human | 14 cm | d_humans |
© 2026 Maeve. All rights reserved. This content is protected by copyright.