Skip to content
Polyma Edu

Chapter 16 · Research Methods, Capstone Project, and Workplace Problem Solving

16.3 Statistical Data Analysis: Distributions, Hypothesis Tests (Chi-Squared, t-Test) & Regression

Syllabus: M08.5 · M08.6Textbook p. 227Check against current regulations
Study notes

1. Learning Goal

After this section you will be able to summarise data, test a hypothesis with a t-test or chi-squared test, and fit and interpret a simple regression line.

2. Core Explanation

Descriptive statistics summarise data. The mean is the average, the median is the middle value, and the standard deviation (s) measures typical spread about the mean, calculated as s = √[Σ(x − x̄)² ÷ (n − 1)]. The square of s is the variance. A distribution shows how values are spread. Many measurements, such as concrete strength or indoor temperature, follow a normal distribution: symmetrical and bell-shaped, with about 68% of values within one standard deviation of the mean and about 95% within two. A z-score, z = (x − mean) ÷ s, tells how many standard deviations a value lies from the mean. Cost data are often right-skewed, so the mean exceeds the median.

Inferential statistics use a sample to judge a population. A hypothesis test begins with H₀ and H₁ (Section 16.1), computes a test statistic, and compares it with a critical value at a chosen significance level (α, usually 0.05). Equivalently, the p-value is the probability of results at least as extreme as those observed if H₀ were true. If p < α, we reject H₀; otherwise we fail to reject it. Failing to reject is not proof that H₀ is true. Rejecting a true H₀ is a Type I error; failing to reject a false one is a Type II error.

The t-test compares means of numerical data in small samples. A two-sample (independent) t-test compares two groups. With a pooled variance sp² = [(n₁ − 1)s₁² + (n₂ − 1)s₂²] ÷ (n₁ + n₂ − 2), the statistic is t = (x̄₂ − x̄₁) ÷ √[sp²(1/n₁ + 1/n₂)] with n₁ + n₂ − 2 degrees of freedom. It assumes roughly normal data and similar variances. A paired t-test compares before-and-after readings on the same units.

The chi-squared (χ²) test of independence tests whether two categorical variables are related. For each cell, the expected count = (row total × column total) ÷ grand total, and χ² = Σ(O − E)² ÷ E, with df = (rows − 1)(columns − 1). Expected counts should generally be at least 5. It uses counts, never percentages.

Regression models how a dependent variable y changes with an independent variable x. Simple linear regression fits y = a + bx by least squares, where slope b = Sxy ÷ Sxx, with Sxy = Σ(x − x̄)(y − ȳ) and Sxx = Σ(x − x̄)², and intercept a = ȳ − b·x̄. The correlation coefficient r (−1 to +1) measures the strength of linear association, and R² = r² is the share of variation in y explained by x. Correlation does not prove causation, and extrapolating beyond the data range is unreliable.

3. Worked Example

Scenario: figures follow the insulation study of Section 16.1 and are illustrative assumptions.

  1. Data (°C). Insulated: 31.2, 32.0, 30.5, 31.8, 32.4, 31.1. Uninsulated: 34.0, 35.1, 33.2, 34.6, 35.5, 34.4.
  2. Descriptives. Insulated: x̄ = 31.50, s² = 0.480. Uninsulated: x̄ = 34.47, s² = 0.663.
  3. Pooled variance. sp² = (5 × 0.480 + 5 × 0.6627) ÷ 10 = 0.5713. Standard error = √[0.5713 × (1/6 + 1/6)] = 0.436.
  4. t statistic. Difference = 34.467 − 31.500 = 2.967; t = 2.967 ÷ 0.436 = 6.80, df = 10.
  5. Decision. The two-tailed critical value at α = 0.05 is 2.228. Since 6.80 > 2.228 (p < 0.001), reject H₀: the uninsulated houses were hotter.
  6. Chi-squared. Thirty occupants of houses with old steel windows and 30 with new windows were asked if they felt too hot. Observed "yes/no": old 18/12, new 9/21. Row totals are 30 and 30; column totals 27 and 33. Expected counts: 13.5 and 16.5 in each row. χ² = 2 × [4.5² ÷ 13.5 + 4.5² ÷ 16.5] = 2 × (1.500 + 1.227) = 5.45, df = 1, critical value 3.841. Reject H₀: window type and discomfort are associated (p ≈ 0.02).
  7. Regression. For six houses, floor area x (m²) = 60, 80, 100, 120, 150, 180 and cost y (US$ thousand) = 22.0, 26.5, 34.5, 37.0, 48.5, 53.0. Then x̄ = 115, ȳ = 36.92, Sxy = 2 672.5, Sxx = 9 950.
  8. Line. b = 2 672.5 ÷ 9 950 = 0.2686 (about US$269 per extra m²); a = 36.92 − 0.2686 × 115 = 6.03. So cost = 6.03 + 0.2686x. Here r = 0.992 and R² = 0.984.
  9. Predict. For 130 m², cost = 6.03 + 0.2686 × 130 = US$40.9 thousand, inside the data range (60–180 m²).

4. Common Misconception

Students often think that "fail to reject H₀" means H₀ has been proved, or that a significant result proves one factor causes the other. Both are wrong: a test only measures how compatible the data are with H₀, and a small sample may simply lack power to detect a real effect. Likewise, a strong correlation between two variables can arise from a third factor. Avoid the mistake by writing conclusions as "the data provide (or do not provide) sufficient evidence that…" and by explaining plausible causes from building science, not from the statistic alone.

Check against current regulations. This section uses figures that the book marks as illustrative or to be confirmed:
  • Scenario: figures follow the insulation study of Section 16.1 and are illustrative assumptions.